Build OpenCV with CUDA Support for Jetson

Build OpenCV with CUDA Support for Jetson

JetsonHacks

1 год назад

28,145 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Eaby Babu
Eaby Babu - 23.03.2023 00:21

Hi,
Your channel is an exceptional resource for anyone interested in Jetson platform. The contents are well-presented, concise, and easy to follow, making it an excellent resource for beginners and experts alike.
Your channel is an excellent resource for researchers like myself.
Overall, I highly recommend this channel to anyone interested in Jetson platform. The content is high-quality, informative, making it an excellent resource for anyone looking to improve their skills in this area.

Ответить
Mikail Akdeniz
Mikail Akdeniz - 09.11.2023 11:22

Hello, I want to run OpenCV compiled with CUDA on Jetson TX2. What should I do? can you help me?

Ответить
FarrelFZeta
FarrelFZeta - 03.11.2023 23:27

Thank you! Works flawlessly for version 4.8.1. Took around 3 hours to install on my Xavier NX Nvidia Dev Kit.

However, I also installed ROS Noetic before thus also has a pre-installed opencv version 4.2.0 (no cuda) from ROS. I just need to point my python path to the opencv version 4.8.1 instead of 4.2.0 version.

Ответить
sy2532
sy2532 - 16.10.2023 15:34

The cuda build worked on my new Orin Nano, JTOP is saying OpenCV 4.5.4 CUDA: YES ... now I need to learn how to enable cuda for opencv. do you have any recomindations, Jim?

Ответить
Jardel Vieira
Jardel Vieira - 29.09.2023 20:20

I followed all your steps with my Jetson Nano 4GB to build OpenCV 4.8.0. I checked in Jtop, and it was recognizing "OpenCV: 4.8.0 with CUDA: YES." However, when I executed "print(cv2.getBuildInformation())", it showed OpenCV 4.1.1:General configuration for OpenCV 4.1.1 | Version control: 4.1.1-2-gd5a58aa75. What is the problrm?

Ответить
Jardel Vieira
Jardel Vieira - 29.09.2023 13:52

Hi, I can't find the "build_opencv" folder in the "tmp" directory. I am using a Jetson Nano 4GB, and I followed your steps. Where can I find this folder?

Ответить
Federico Moreno
Federico Moreno - 22.09.2023 05:11

Great content!!

Ответить
KILLER OP
KILLER OP - 20.09.2023 10:56

Hy, actually I'm using orin nano 8gb. I have an issue building Opencv. I want to change cap_v4l.cpp inside opencv/modules/videoio/src in line 1001 in 4.5.4 version. The select () timeout warning is the one i need to change. I used tv.tv_sec = 0 so that select() won't wait for anything. But after i build it, in /tmp/Opencv i see it is not taking any changes that was made during build time. It is using default things itself. I'm actually downloading opencv and opencv-contrib and then making the changes and updating the path inside build_opencv. sh in ---- git clone line. Please help me 🙏

Ответить
Vũ Xuân Hải
Vũ Xuân Hải - 12.09.2023 10:28

Thank you so much for your knowledge. Could you make a video to build YOLOv3 on Orin running with C script? Iam struggle with library dependency on that.

Ответить
Aurora M
Aurora M - 05.09.2023 09:28

It works for me on my Jetson Orin, save my day, Thanks!!!

Ответить
Viorel Negoita
Viorel Negoita - 04.09.2023 16:05

Another excellent video.
Could you please share how did you update the Python version? is this a Jetson Nano, or an Jenson Orin Nano? what Jetpack version are you using? Thanks!

Ответить
Nandeesha B S
Nandeesha B S - 02.09.2023 18:26

Hi I am using ubuntu version 20.04 , iam running one opencv object detection application its taking load on cpu



When I check the status using jtop its showing opencv with Cuda status is yes

If I run
Import cv2
Print(cv2.cuda.getCudadevicecount())
Its giving 0 as output

Please suggest me how to solve this issue
And run my application using gpu

Ответить
Jardel Vieira
Jardel Vieira - 30.08.2023 18:52

I attempted to install OpenCV 4.5.0, jetpack 4.6 and 7GB swap on my Jetson Nano 4GB and received this error message:
[ 26%] Building
nvcc fatal : Unsupported gpu architecture 'compute_87'
CMake Error at cuda_compile_1_generated_gpu_mat.cu.o.RELEASE.cmake:221 (message):
Error generating
/tmp/build_opencv/opencv/build/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_gpu_mat.cu.o
modules/core/CMakeFiles/opencv_core.dir/build.make:63: recipe for target 'modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_gpu_mat.cu.o' failed
make[2]: * [modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_gpu_mat.cu.o] Error 1
CMakeFiles/Makefile2:2981: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
make[1]: * [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: * [all] Error 2
Do you wish to remove temporary build files in /tmp/build_opencv ?
(Doing so may make running tests on the build later impossible)
Y/N y
rm: cannot remove '/tmp/build_opencv/opencv/build/CMakeFiles/Progress/23': Permission denied

Ответить
Bxoz
Bxoz - 18.08.2023 00:19

hello
i followed everything it worked i installed opencv 4.1.1 it shows cuda support
but its only when i use python not python3
what is the solution plz

Ответить
Peter
Peter - 22.07.2023 07:50

Great videos and content, thank you :)

I have an issue using the Orin Nano dev kit. I've followed the steps, modified mdegans script to only build for arch_bin 8.7 with CUDNN version 8.6, as I understand is correct for 4.5.4 (took about 55 mins). The symptom I have is the same as @nickbeser5187....

error: OpenCV(4.8.0) /io/opencv/modules/dnn/src/onnx/onnx_importer.cpp:279: error: (-210:Unsupported format or combination of formats) Failed to parse

I've worked my way through the script and don't see anything wrong, any thoughts?

Ответить
Nick Beser
Nick Beser - 15.07.2023 17:38

Thank you for your video. I was able to build opencv 4.5.4 on my Jetson Orin Nano. When I tried to modify the face_detection_yunet code following your instructions I got the following error: cv2.error: OpenCV(4.8.0) /io/opencv/modules/dnn/src/onnx/onnx_importer.cpp:279: error: (-210:Unsupported format or combination of formats) Failed to parse ONNX model: face_detection_yunet_2023mar.onnx in function 'ONNXImporter'
I;m not sure why this is occurring, but searching on the internet, suggests that this might be a path problem. Any ideas?

Ответить
Jim Houskeeper
Jim Houskeeper - 05.07.2023 00:29

I was following your tutorial on how to build OpenCV with CUDA support. I am running on a Jetson Orin AGX. I followed your directions as closely as possible twice however I am getting the following errors while compiling cuda_compile_1_generated_gpu_mat.cu.o, it is complaining that in texture.hpp(61): error: texture is not a template

typedef texture<T, 0x02, cudaReadModeElementType> TexRef

Because I am only planning to run on arch 8.6, I only added that arch to the cmake flag and selected cuDNN 8.6

Any suggestions?

Thanks!

Jim

Ответить
jose cas
jose cas - 18.06.2023 23:34

hello, thank you for your videos, i liked and subscribed!
Is there a reason why one would want to install other NVIDIA GPU architectures on one device? for example i have a jetson orin nano developer kit, would i even be able to use other architectures on this device?

thank you for your time

Ответить
Figuera M
Figuera M - 14.06.2023 15:13

First of all, thank you so much for the video, I have a jetson xavier nx (P3518) and i just follow exactly the same procedure and the end it didn't work, neither in jtop or with cv2.getBuildInfomation() i get something about CUDA. Help 😢

Ответить
Kunal Valunj
Kunal Valunj - 14.06.2023 15:06

Hello there are some issue with my system after installation there is one file should be present inside tmp which build opencv .but in my its not there, any solution?

Ответить