Skip to content

Instantly share code, notes, and snippets.

View jnulzl's full-sized avatar

jnulzl jnulzl

View GitHub Profile
@jnulzl
jnulzl / Qwen2.5-VL GPTQ.md
Created February 27, 2025 07:01
Qwen2.5-VL GPTQ量化教程

Qwen2.5-VL GPTQ量化教程

环境

  • 系统&软件:Ubuntu 20.04 + GTX 3090 + CUDA 11.8 + Python 3.10

依赖库

安装以下依赖库

@jnulzl
jnulzl / effective_modern_cmake.md
Created April 17, 2024 01:45 — forked from mbinna/effective_modern_cmake.md
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@jnulzl
jnulzl / get_perspective_transform.cpp
Last active August 16, 2022 13:07
get_perspective_transform using native c++
#include <iostream>
#include <vector>
//ref to : https://web.archive.org/web/20150222120106/xenia.media.mit.edu/~cwren/interpolator/
std::vector<float> getPerspectiveTransformJnulzl(const std::vector<float>& src,
const std::vector<float>& dst)
{
float a1 = src[0];
float b1 = src[1];
float a2 = src[2];
@jnulzl
jnulzl / opencv_cross_compile.md
Last active August 2, 2022 08:22
opencv cross compile

opencv cross compile

  • opencv mini lib(only include "core highgui imgcodecs imgproc video videoio")
## CMAKE_TOOLCHAIN_FILE from https://github.com/Tencent/ncnn/tree/master/toolchains
cmake ../ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./opencv_mini \     
    -DCMAKE_TOOLCHAIN_FILE=$NCNN_ROOT/toolchains/arm-linux-gnueabihf.toolchain.cmake \
    -DBUILD_JPEG=ON -DBUILD_TIFF=ON -DBUILD_PNG=ON -DBUILD_ZLIB=ON \
 -DBUILD_opencv_calib3d=OFF -DBUILD_opencv_features2d=OFF -DBUILD_opencv_flann=OFF \
import os
import sys
import argparse
def convert_func(src_path, des_path, upper, align_byte = 16, step = 12):
array_name = os.path.basename(src_path).replace('.', '_')
count = 1
with open(des_path, 'wb') as result_file:
result_file.write(b'#ifndef __%s__H__\n' % array_name.upper().encode('utf-8'))
@jnulzl
jnulzl / libtorch_all_version.md
Created January 21, 2022 01:44
Win && Linux libtorch 1.4.0 ~ 1.10.1 gpu&&cpu version url

Linux libtorch 1.4.0 ~ 1.10.1 gpu version url

  • cxx11 ABI
libtorch-cxx11-abi-shared-with-deps-1.4.0+cu92.zip : https://download.pytorch.org/libtorch/cu92/libtorch-cxx11-abi-shared-with-deps-1.4.0%2Bcu92.zip
libtorch-cxx11-abi-shared-with-deps-1.4.0+cu100.zip : https://download.pytorch.org/libtorch/cu100/libtorch-cxx11-abi-shared-with-deps-1.4.0%2Bcu100.zip
libtorch-cxx11-abi-shared-with-deps-1.4.0.zip : https://download.pytorch.org/libtorch/cu101/libtorch-cxx11-abi-shared-with-deps-1.4.0.zip
libtorch-cxx11-abi-shared-with-deps-1.5.0+cu92.zip : https://download.pytorch.org/libtorch/cu92/libtorch-cxx11-abi-shared-with-deps-1.5.0%2Bcu92.zip