GPU PyTorch TOP in TouchDesigner with CUDA-enabled OpenCV

Overview

PyTorchTOP

This project demonstrates how to use OpenCV with CUDA modules and PyTorch/LibTorch in a TouchDesigner Custom Operator. Building this project is moderately complex and time-consuming, so read all the instructions to get a general overview before getting started.

Background Matting Project

PyTorchTOP uses Background Matting v2 as a foundation because their project is MIT-licensed (thank you!). Their research paper focuses on the speed and quality of the matting operation. For their quantitative results, they preprocess the images with OpenCV and don't add this computational cost to their numbers. It is ok to not preprocess the images but only if the frozen background image does not need to be transformed to match the live foreground images. This optional transformation is called homography in OpenCV. To see how the researchers do it, look at their HomographicAlignment class. PyTorchTOP has a toggle for using CUDA contrib modules from OpenCV to do the same homography efficiently on the GPU.

PyTorchTOP uses TorchScript models that can be downloaded from Background Matting V2. Download their "TorchScript" models and place them in this repo's models folder. More information on exporting models in this format is available here.

Python

Install Python 3.7 or higher and make sure it's in your system path. This will help later when building OpenCV.

Download LibTorch

From https://pytorch.org/ download, 1.7.1 (stable), Windows, LibTorch, C++/Java, CUDA 11.0

CUDA and cuDNN

From NVIDIA, install CUDA which will create C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0. Check that this creates a system environment variable: CUDA_TOOLKIT_ROOT_DIR holding C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.0. Download the cuDNN version that corresponds to the CUDA version and place the files in the CUDA folder too.

OpenCV and the Contrib modules.

Use git to clone OpenCV and OpenCV Contrib. It would be good to place them next to each other. Use CMake-GUI to select the source folder of OpenCV. In CMake-GUI, for the box Where is the source code, select the path to OpenCV. For Where to build the binaries, one suggestion is to create a build folder inside the OpenCV repo. You should permanently edit your system environment variables so that OpenCV_DIR holds this path. In CMake-GUI, press Configure. In the pop-up, select the latest version of Visual Studio, possibly Visual Studio 16 2019, and Finish. It will take less than a minute, and a table with lots of options will appear. Make the following modifications:

  • Enable the checkbox BUILD_opencv_world.
  • For OPENCV_EXTRA_MODULES_PATH, enter the path to modules folder in the opencv_contrib repository which you cloned earlier.
  • Enable the checkbox WITH_CUDA.

Click Generate.

Check the entries in the table again. You should see a new entry for CUDA_TOOLKIT_ROOT_DIR, holding C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.0. If you don't, you may add the entry yourself, but this isn't guaranteed to work. You should probably check your CUDA installation, delete the CMake-GUI cache and restart the CMake-GUI steps.

If CUDA_TOOLKIT_ROOT_DIR is valid, then click Open Project. Build in Release mode. This will take between 1 to 2 hours. When it's complete, look for the "world" dll (opencv_world451.dll or equivalent) in the build's bin\Release folder and move it to %USERPROFILE%\Documents\Derivative\Plugins. If this folder doesn't already exist, create it.

Building the PyTorchTOP Project.

To get started, we must first make sure several environment variables are correct. The process of installing CUDA and cuDNN should have already put them in your system path. If you have multiple versions of CUDA installed, you can temporarily modify your path to make sure the right one is found first. For example, since we're using CUDA 11.0, in a command window, do the following:

set CUDA_HOME=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.0
set CUDA_PATH=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.0
set PATH=%CUDA_HOME%;%CUDA_PATH%;%PATH%

This changes your system path but only in this command window. Furthermore, we need an environment variable OpenCV_DIR to be set to the path where OpenCV was built, such as C:/opencv/build. If you haven't set this variable, you can do it temporarily with the right path.

set OpenCV_DIR=C:/opencv/build

With the same window, inside the root of PyTorchTOP create a build folder:

mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=/path/to/libtorch ..

where /path/to/libtorch should be the full path to the unzipped LibTorch distribution. Expected output:

-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.
x64 architecture in use
-- Caffe2: CUDA detected: 11.0
-- Caffe2: CUDA nvcc is: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.0/bin/nvcc.exe
-- Caffe2: CUDA toolkit directory: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.0
-- Caffe2: Header version is: 11.0
-- Found cuDNN: v8.0.5  (include: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.0/include, library: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.0/lib/x64/cudnn.lib)
-- Autodetected CUDA architecture(s):  7.5
-- Added CUDA NVCC flags for: -gencode;arch=compute_75,code=sm_75
-- Configuring done
-- Generating done
-- Build files have been written to: /path/to/PyTorchTOP/build

If it works, you should end up with a Visual Studio solution build/PyTorchTOP.sln. Open it, select the Release build and press F5 to build the DLL and launch TouchDesigner. When you build, the newly built plugin and the necessary LibTorch DLLs will be copied to your C++ TouchDesigner plugin folder at %USERPROFILE%\Documents\Derivative\Plugins.

Debugging

The steps to build a debug-mode Visual Studio solution are similar. You should download the debug version from PyTorch and use its path for CMake. Instead of build, make a folder build_debug.

mkdir build_debug
cd build_debug
set DEBUG=1
cmake -DCMAKE_PREFIX_PATH=/path/to/debug/libtorch ..

Now you can build build_debug\PyTorchTOP.sln in Debug mode. You can manually copy the .pdb files from the LibTorch folder to the Plugins folder in order to help with stack traces during debugging. You may also consider duplicating the steps for building OpenCV in debug mode.

Using the TouchDesigner project

When the project opens, check the Model path parameter on the plugin. If you select a 32-bit model, then the custom parameter for Bytes Per Model Input should be 4 because 4 bytes is 32 bits. If the model is 16-bit, then select 2. Then toggle the "Unload Plugin" parameter to load the plugin. The first input to the plugin is the live video and the second input is the static background image.

Extra Notes

This example project has been tested with TouchDesigner 2020.28110 and libtorch with CUDA 11.0. At the time of writing this, TouchDesigner is using 10.1, so it's risky to use 11.0. Luckily it works. Choose your versions of the various components in this project at your own discretion. TouchDesigner's Release Notes often mention changes to their CUDA version.

Comments
  • Fatal Errors During OpenCV Build

    Fatal Errors During OpenCV Build

    Hello again, thank you so much for opening a branch for the style transfer! I've been trying to build the OpenCV to get the world .dll for a few days now, each time getting different errors and finding a fix for errors along the way. I've used Visual Studio only once before and to be honest I'm a little lost around here I've googled my last error but can't fix it...

    I'm getting lots of this " LNK1181 cannot open input file '....\lib\Release\opencv_world451.lib' "and FAILED Building reports so I ended up building 3 of 4 times without getting any .dll in the release folder... all of this takes time and I was wondering maybe you got a quick fix for this :)

    I'm only getting an "opencv_videoio_ffmpeg451_64.dll" in the release folder after building with lots of errors

    Thanks

    opened by NairoDorian 8
  • Fatal Error when building PytorchTOP using cmake in cmd

    Fatal Error when building PytorchTOP using cmake in cmd

    Hi David,

    I am getting this error below:

    fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory

    my setup is:

    VS 2019 cmake version 3.19.2

    Is there anyway to fix it?

    Thank you

    opened by majinshaoyuindustry 7
  • Failed to load DLL

    Failed to load DLL

    Hi, I just compiled all with success (it seems), but as soon as TD opens the project the cplusplus comp says "failed to load DLL" even if paths are right. Opening the project it says that some DLL dependence is missing, but I have not clue on what is missing. Any idea? Thank you Simone

    opened by simplo 5
  • CMake Error: The source directory

    CMake Error: The source directory "foo:/libtorch" does not appear to contain CMakeLists.txt.

    Hi David After some digging and cross referencing I managed to get OpenCV compiled. One issue was using 64bit version of Python.

    Now however I am stuck on compiling libtorch. There doesn't seem to be a CMakeLists.txt file in the download. Get the same error whether running CMake from cmd or using binary "CMake Error: The source directory "D:/libtorch" does not appear to contain CMakeLists.txt."

    There is of course a CMakeLists.txt file inside the downloaded PyTorchTOP repo but how is this referenced from the libtorch repo which is totally separate?

    On the cmd line (inside PyTorchTOP/build)

    D:\PyTorchTOP\build>cmake -DCMAKE_PREFIX_PATH= D:/libtorch
    CMake Error: The source directory "D:/libtorch" does not appear to contain CMakeLists.txt.
    

    Does this have to be manually created or am I missing something in your instructions? Thanks!

    opened by jBachalo 4
  • Error loading model file not found constants.pkl

    Error loading model file not found constants.pkl

    After loading the plugin in the 'cplusplus_background_matting' TOP, I receive an error loading the model file on that TOP: Error: Error loading model: [enforce fail at ..\..\caffe2\serialize\inline_container.cc:222] . file not found: archive/constants.pkl (/project1/cplusplus_background_matting)

    I am using the 'pytorch_mobilenetv2.pth' model, but no matter which model I try this occurs. cpperror2

    opened by launchd 4
  • torchscript_mobilenetv2_fp32.pth

    torchscript_mobilenetv2_fp32.pth

    After install the cplusplus_background_matting top gives an error saying it is missing this file... "PyTorchTop/models/torchscript_mobilenetv2_fp32.pth" anyone know why that wouldn't generate?

    opened by ryansimrell 3
  • No compositing visible in GLSL TOP

    No compositing visible in GLSL TOP

    First thanks David for your patience in getting this up and running. Spent the day compiling OpenCV and libtorch. Everything compiled without errors and copied to my Plugins folder. Inside the .toe network configured the C++ TOP to target a 32 bit model file and also set my Bytes Per Model Input Channel to 4. Toggled the 'Unload Plugin' switch.

    I am feeding a live webcam video to the foreground input and using the default static cached image (candy) for the background.

    However, all I see in the GLSLMultiTOP preview is the foreground live video. I assume that this is a simple compositing operation. But no alpha is being created in the foreground video. If there is a recognizable person, shouldn't compositing automatically take place?

    Is there a way to check if your hardware (ie GPU) is compatible with the framework? Not running actual RTX card but RTX compatible (twin Titan Volta GPUs) which work for RTX based Ray Tracing stuff.

    Any troubleshooting steps welcome and thanks again for sharing this amazing resource.

    opened by jBachalo 2
  • No output in TouchDesigner

    No output in TouchDesigner

    I'm unable to get matting to work in TouchDesigner, despite everything running smoothly. I've checked Touch for errors, added the .dll to plugins, and downloaded the models. I've added the freeze frame to perform the matte as well, but I feel like I'm missing something.

    Is there anything else I should check? td

    opened by launchd 2
  • Warnings during running PyTorchTOP in MVSC 16.8.3 (Reference Mode)

    Warnings during running PyTorchTOP in MVSC 16.8.3 (Reference Mode)

    I am able to run the solution and the matting works so far, but I get following warnings during running it:

    Severity Code Description Project File Line Suppression State Warning C4102 'cv': unreferenced label PyTorchTOP *mypath*\src\PyTorchTOP.cpp 470 Warning C4005 'NOMINMAX': macro redefinition PyTorchTOP *mypath*\src\CPlusPlus_Common.h 26 Message see previous definition of 'NOMINMAX' PyTorchTOP *mypath*\src\PyTorchTOP.cpp 1

    /edit: After aborting and reinitialiszing the Warnings don't occur anymore.

    opened by vrtx-voiod 2
  • In your other

    In your other "PyTorchTOP-cpumem" you mention simple modifications to make Style Transfer work with GPU

    Hello!

    I have used your PyTorch Style Transfer and wanted to say that's it's awesome! I bet there's a way to train your own model based on custom images but couldn't get my head around all that mess.. still a newbie but maybe you could give me a quick direction as to where to find more information on training for a custom image.

    Aso the main point is that with CPU I got low FPS, and I just see that you post this GPU version and mention that it could work for style transfer with simple modifications, could you elaborate a little more as to what modifications it is to make?

    Should I try to use the .cpp code from the old repo, which files specifically?

    I would not be able to estimate the amount of work needed to make it work, junior computer engineer here, just tell me which tutorial I need to read and I'll be on it ;)

    Have you tried making the Style Transfer Work with GPU on your side? Have you noticed any difference in FPS compared with CPU?

    Would be nice to reach 30+ FPS

    Thank you so much !!!

    opened by NairoDorian 1
  • 8-bit input from TouchDesigner leads to weird outputs

    8-bit input from TouchDesigner leads to weird outputs

    If the Bytesperinputchannel custom parameter is 1, and the TOPs that are wired into the custom plugin are 8-bit, then the model results look weird. For the time being, a solution is to use Resolution TOPs to convert the input textures to 32-bit RGBA and set Bytesperinputchannel to 4.

    bug 
    opened by DBraun 1
  • Error building Pytorch TOP with CMake

    Error building Pytorch TOP with CMake

    Hi, Thanks a lot for this! I'm really looking forward to try experimenting with PyTorch within TD. I'm total noob in compiling with CMake, so sorry in advance for Noob mistakes.

    I'm stucked just before generating files, and I get these errors:

    CMake Error at C:/Program Files/CMake/share/cmake-3.19/Modules/FindCUDA.cmake:1842 (add_library):
      Cannot find source file:
    
        src/CPlusPlus_Common.h
    
      Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
      .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .ispc
    Call Stack (most recent call first):
      CMakeLists.txt:119 (CUDA_ADD_LIBRARY)
    
    
    CMake Error at C:/Program Files/CMake/share/cmake-3.19/Modules/FindCUDA.cmake:1842 (add_library):
      No SOURCES given to target: PyTorchTOP
    Call Stack (most recent call first):
      CMakeLists.txt:119 (CUDA_ADD_LIBRARY)
    
    
    CMake Generate step failed.  Build files cannot be regenerated correctly.
    

    I add to change a couple of things compare to ReadMe to get there in the PyTorch TOP building process otherwise, I add other errors:

    • I copied the CMakeLists.txt in the build folder
    • I had to unzipp the libtorch folder for CMake or I run in this error:
    CMake Error at CMakeLists.txt:126 (find_package):
      By not providing "FindTorch.cmake" in CMAKE_MODULE_PATH this project has
      asked CMake to find a package configuration file provided by "Torch", but
      CMake did not find one.
    
      Could not find a package configuration file provided by "Torch" with any of
      the following names:
    
        TorchConfig.cmake
        torch-config.cmake
    
      Add the installation prefix of "Torch" to CMAKE_PREFIX_PATH or set
      "Torch_DIR" to a directory containing one of the above files.  If "Torch"
      provides a separate development package or SDK, be sure it has been
      installed.
    

    Maybe this just created my latest issue

    I hope you can help and thanks gain for this project

    opened by theflashbacker 19
  • Build error when Windows username has whitespace

    Build error when Windows username has whitespace

    First of all: Thank you for this implementation, I really look forward to test PyTorch in Touchdesigner :)

    However I was successfully building OpenCV 4.5.1 from source and during the final stages of the Release build of PyTorchTOP I ran into some issues:

    During CMake compiling of the PyTorchTop I get this error message:

    `CMake Warning (dev) in CMakeLists.txt: Policy CMP0111 is not set: An imported target missing its location property fails during generation. Run "cmake --help-policy CMP0111" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

    IMPORTED_IMPLIB not set for imported target "torch" configuration "Debug". This warning is for project developers. Use -Wno-dev to suppress it.

    -- Generating done -- Build files have been written to: "my_directory/PyTorchTOP/build`

    This seems to be not really an issue since I could find the PyTorchTOP.sln in the build folder, but when I try to build the solution in Visual Studio 2019 Community 16.8.3 I get these errors:

    Severity Code Description Project File Line Suppression State Error MSB3073 The command "setlocal "C:\Program Files\CMake\bin\cmake.exe" -E copy_if_different "_**my_directory**_/PyTorchTOP/build/Release/PyTorchTOP.dll" %USERPROFILE%/Documents/Derivative/Plugins if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone :cmErrorLevel exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd setlocal "C:\Program Files\CMake\bin\cmake.exe" -E copy_if_different C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/asmjit.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/c10.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/c10_cuda.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/caffe2_detectron_ops_gpu.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/caffe2_module_test_dynamic.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/caffe2_nvrtc.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/cublas64_11.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/cublasLt64_11.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/cudart64_110.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/cudnn64_8.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/cudnn_adv_infer64_8.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/cudnn_adv_train64_8.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/cudnn_cnn_infer64_8.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/cudnn_cnn_train64_8.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/cudnn_ops_infer64_8.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/cudnn_ops_train64_8.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/cufft64_10.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/cufftw64_10.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/curand64_10.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/cusolver64_10.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/cusolverMg64_10.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/cusparse64_11.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/fbgemm.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/libiomp5md.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/libiompstubs5md.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/nvToolsExt64_1.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/nvrtc-builtins64_110.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/nvrtc64_110_0.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/torch.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/torch_cpu.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/torch_cuda.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/torch_global_deps.dll C:/libtorch/libtorch-win-shared-with-deps-1.7.1+cu110/libtorch/lib/uv.dll %USERPROFILE%/Documents/Derivative/Plugins if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone :cmErrorLevel exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd :VCEnd" exited with code 1. PyTorchTOP C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 153 Warning C4005 'NOMINMAX': macro redefinition PyTorchTOP _**my_directory**_\repositories\PyTorchTOP\src\CPlusPlus_Common.h 26 Warning C4102 'cv': unreferenced label PyTorchTOP _**my_directory**_\repositories\PyTorchTOP\src\PyTorchTOP.cpp 470 Error Target (for copy_if_different command) "_**my_directory**_/Documents/Derivative/Plugins" is not a directory. PyTorchTOP _**my_directory**_\repositories\PyTorchTOP\build\EXEC_ 1

    It looks like there is an issue with my_directory since my username has a white space inbetween, so I manually copied the output of the my_directory\PyTorchTOP\build\Release folder to my Touchdesigner Plugins folder.

    After that I get this error message:

    error

    I've tried to make a Debug build with the libtorch debug libraries, but then I get this Error Messages:

    Severity Code Description Project File Line Suppression State Error LNK1181 cannot open input file '_**my_directory**_\repositories\opencv\build\lib\Debug\opencv_world451d.lib' PyTorchTOP _**my_directory**_\repositories\PyTorchTOP\build\LINK 1 Warning C4005 'NOMINMAX': macro redefinition PyTorchTOP _**my_directory**_\repositories\PyTorchTOP\src\CPlusPlus_Common.h 26 Warning C4102 'cv': unreferenced label PyTorchTOP _**my_directory**_\repositories\PyTorchTOP\src\PyTorchTOP.cpp 470

    bug 
    opened by vrtx-voiod 9
Owner
David
Do It Real-Time @ccrma
David
A GPU (CUDA) based Artificial Neural Network library

Updates - 05/10/2017: Added a new example The program "image_generator" is located in the "/src/examples" subdirectory and was submitted by Ben Bogart

Daniel Frenzel 93 Dec 10, 2022
A easy-to-use image processing library accelerated with CUDA on GPU.

gpucv Have you used OpenCV on your CPU, and wanted to run it on GPU. Did you try installing OpenCV and get frustrated with its installation. Fret not

shrikumaran pb 4 Aug 14, 2021
Hardware-accelerated DNN model inference ROS2 packages using NVIDIA Triton/TensorRT for both Jetson and x86_64 with CUDA-capable GPU.

Isaac ROS DNN Inference Overview This repository provides two NVIDIA GPU-accelerated ROS2 nodes that perform deep learning inference using custom mode

NVIDIA Isaac ROS 62 Dec 14, 2022
Raytracer implemented with CPU and GPU using CUDA

Raytracer This is a training project aimed at learning ray tracing algorithm and practicing convert sequential CPU code into a parallelized GPU code u

Alex Kotovsky 2 Nov 29, 2021
4eisa40 GPU computing : exploiting the GPU to execute advanced simulations

GPU-computing 4eisa40 GPU computing : exploiting the GPU to execute advanced simulations Activities Parallel programming Algorithms Image processing O

Ecam 4MIN repositories 2 Jan 10, 2022
A coverage-guided and memory-detection enabled fuzzer for windows applications.

WDFuzzer Manual 中文手册见 README_CN.md WDFuzzer:winafl + drmemory WDFuzzer is an A coverage-guided and memory detection abled fuzzer for for windows softw

Jingyi Shi 27 Nov 15, 2022
nvidia nvmpi encoder for streamFX and obs-studio (e.g. for nvidia jetson. Requires nvmpi enabled ffmpeg / libavcodec)

nvmpi-streamFX-obs nvidia nvmpi encoder for streamFX and obs-studio (e.g. for nvidia jetson. Requires nvmpi enabled ffmpeg / libavcodec) Purpose This

null 16 Jun 25, 2022
The SCRFD face detection, depends on ncnn library and opencv

The SCRFD face detection, depends on ncnn library and opencv

null 157 Jan 5, 2023
This is a sample ncnn android project, it depends on ncnn library and opencv

This is a sample ncnn android project, it depends on ncnn library and opencv

null 248 Jan 6, 2023
Mixed reality VR laser tag using Oculus Quest 2 and OAK-D depth cameras. First prize winner for North America region in OpenCV AI Competition 2021.

Mixed Reality Laser Tag Copyright 2021 Bart Trzynadlowski Overview This is the source code to my Mixed Reality Laser Tag project, which won first priz

null 34 Jun 3, 2022
A simple facial recognition script using OpenCV's FaceRecognizer module implemented in C++

Local Binary Patterns Histogram Recognizer A proyect that implements the LBPHRecognizer class of the OpenCV library to determine if a detected face co

Pablo Agustín Ortega-Kral 0 Jan 18, 2022
Libcamera with OpenCV in Raspberry Pi 64 bit Bullseye

Libcamera OpenCV RPi Bullseye 64OS Libcamera + OpenCV on a Raspberry Pi 4 with 64-bit Bullseye OS In the new Debian 11, Bullseye, you can only capture

Q-engineering 8 Nov 24, 2022
liteCV is greater than OpenCV :)

liteCV liteCV is lightweight image processing library for C++11. Unlike OpenCV, liteCV must be SIMPLE. Unlike OpenCV, liteCV must be INDEPENDENCE. Ach

Samuel Lee 4 Oct 26, 2022
Helper Class for Deep Learning Inference Frameworks: TensorFlow Lite, TensorRT, OpenCV, ncnn, MNN, SNPE, Arm NN, NNAbla

InferenceHelper This is a helper class for deep learning frameworks especially for inference This class provides an interface to use various deep lear

iwatake 192 Dec 26, 2022
Example of using ultralytics YOLO V5 with OpenCV 4.5.4, C++ and Python

yolov5-opencv-cpp-python Example of performing inference with ultralytics YOLO V5, OpenCV 4.5.4 DNN, C++ and Python Looking for YOLO V4 OpenCV C++/Pyt

null 183 Jan 9, 2023
Example of using YOLO v4 with OpenCV, C++ and Python

yolov4-opencv-cpp-python Example of performing inference with Darknet YOLO V4, OpenCV 4.4.0 DNN, C++ and Python Looking for YOLO V5 OpenCV C++/Python

null 45 Jan 8, 2023
cvnp: pybind11 casts between numpy and OpenCV, possibly with shared memory

cvnp: pybind11 casts and transformers between numpy and OpenCV, possibly with shared memory Explicit transformers between cv::Mat / cv::Matx and numpy

Pascal Thomet 19 Jan 5, 2023
A c++ trainable semantic segmentation library based on libtorch (pytorch c++). Backbone: ResNet, ResNext. Architecture: FPN, U-Net, PAN, LinkNet, PSPNet, DeepLab-V3, DeepLab-V3+ by now.

中文 C++ library with Neural Networks for Image Segmentation based on LibTorch. The main features of this library are: High level API (just a line to cr

null 310 Jan 3, 2023
This is a code repository for pytorch c++ (or libtorch) tutorial.

LibtorchTutorials English version 环境 win10 visual sutdio 2017 或者Qt4.11.0 Libtorch 1.7 Opencv4.5 配置 libtorch+Visual Studio和libtorch+QT分别记录libtorch在VS和Q

null 464 Jan 9, 2023