-
Obtain the CLIP model
-
Use clip2onnx to convert it from pt to onnx
-
(Options) PTQ quantification model
-
By the way: Multiple batch preprocessing can refer to this
- You can refer to clip_tokenizer
-
Dynamic batchsize code like reference_1
Note: Please refer to reference_2 for the solution to the issue where the BufferManager of TensorRT samples does not support engines with dynamic dimensions
-
Modify and correctly configure dependency paths in CmakeLists at all levels of directories
Note: The code uses the filesystem library of C++17. If C++17 is not supported, the corresponding functions and modules need to be downgraded and replaced
-
Perform the following actions in the root directory of the project
mkdir build cd build cmake .. make
-
The executable file will be generated in the build/bin directory, and specific runtime parameters can refer to main.cpp and argsParser.h