Comments (2)
- Compile OpenCV with CUDA. Following is the CMake command I used, you will have to fit it in your case:
You can find your CUDA_ARCH_BIN at https://developer.nvidia.com/cuda-gpus (compute capability in the tables).
cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=./install \ -D BUILD_opencv_python2=OFF \ -D BUILD_opencv_python3=ON \ -D PYTHON3_LIBRARY=/usr/lib/aarch64-linux-gnu/libpython3.6m.so \ -D PYTHON3_INCLUDE_DIR=/usr/include/python3.6m \ -D PYTHON3_EXECUTABLE=/usr/bin/python3.6 \ -D WITH_CUDA=ON \ -D WITH_CUDNN=ON \ -D OPENCV_DNN_CUDA=ON \ -D CUDA_FAST_MATH=ON \ -D ENABLE_FAST_MATH=1 \ -D CUDA_ARCH_BIN=5.3 \ -D WITH_CUBLAS=1 \ -D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-10.2 \ -D OPENCV_EXTRA_MODULES_PATH=/home/opencv-cn/Workspace/opencv/opencv_contrib/modules ..
- Initialize YuNet & SFace with CUDA backend and GPU target in demo scripts:
yunet = YuNet(modelPath=args.model_yunet, backendId=cv.dnn.DNN_BACKEND_CUDA, targetId=cv.dnn.DNN_TARGET_CUDA) sface = SFace(modelPath=args.model_sface, backendId=backendId=cv.dnn.DNN_BACKEND_CUDA, targetId=cv.dnn.DNN_TARGET_CUDA)
And you can run demo scripts and perform inference of YuNet & SFace on GPU.
from opencv_zoo.
Compile OpenCV with CUDA. Following is the CMake command I used, you will have to fit it in your case:
cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=./install \ -D BUILD_opencv_python2=OFF \ -D BUILD_opencv_python3=ON \ -D PYTHON3_LIBRARY=/usr/lib/aarch64-linux-gnu/libpython3.6m.so \ -D PYTHON3_INCLUDE_DIR=/usr/include/python3.6m \ -D PYTHON3_EXECUTABLE=/usr/bin/python3.6 \ -D WITH_CUDA=ON \ -D WITH_CUDNN=ON \ -D OPENCV_DNN_CUDA=ON \ -D CUDA_FAST_MATH=ON \ -D ENABLE_FAST_MATH=1 \ -D CUDA_ARCH_BIN=5.3 \ -D WITH_CUBLAS=1 \ -D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-10.2 \ -D OPENCV_EXTRA_MODULES_PATH=/home/opencv-cn/Workspace/opencv/opencv_contrib/modules ..You can find your CUDA_ARCH_BIN at https://developer.nvidia.com/cuda-gpus (compute capability in the tables).
Initialize YuNet & SFace with CUDA backend and GPU target in demo scripts:
yunet = YuNet(modelPath=args.model_yunet, backendId=cv.dnn.DNN_BACKEND_CUDA, targetId=cv.dnn.DNN_TARGET_CUDA) sface = SFace(modelPath=args.model_sface, backendId=backendId=cv.dnn.DNN_BACKEND_CUDA, targetId=cv.dnn.DNN_TARGET_CUDA)And you can run demo scripts and perform inference of YuNet & SFace on GPU.
thanks for your help!
from opencv_zoo.
Related Issues (20)
- 请问为什么没有提供rpn的量化版本,是不支持siam网络量化嘛? HOT 6
- AttributeError: module 'cv2' has no attribute 'TrackerVit_Params' HOT 9
- K-best BB VitTracker (feature/Question) HOT 3
- VitTracker weights (question) HOT 10
- Mediapipe pose estimation performance HOT 5
- Refreshing template in Vit (Question) HOT 4
- Dynamic Input Shape? HOT 2
- Lack of charsets in models\text_recognition_crnn HOT 8
- `quantize-ort.py` doesn't reproduce the quantized models in the repos HOT 3
- Is it possible to parallelize face detection process using the face_detection_yunet model in C++? HOT 6
- How to process output of face detection network when batch of images is used as network input? HOT 7
- SFace: Quantized model is slower HOT 1
- 为什么输入的两张相同的图片经过处理以后维度会不一样 HOT 10
- 求助求助,随便选两个图片对比的相似度都很高。 HOT 3
- Add Java demos (Last update on 2024-04-07) HOT 4
- I can't run the yunet_2023mar in OpenCV4.9.0 HOT 2
- Face Anti-Spoofing opencv HOT 1
- 总是报错 HOT 1
- 奇怪的问题 HOT 1
- SFaceRecognizer model face recognition C++ test failed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencv_zoo.