nano_build_opencv icon indicating copy to clipboard operation
nano_build_opencv copied to clipboard

After install, opencv version displayed by 'jtop' and python script by 'cv2.getBuildInformation()' doesn't match.

Open Jeong-m1n opened this issue 1 year ago • 1 comments

Hi, Thanks to your file build_opencv.sh, I installed opencv on Jetson Xavier NX devkit with specific version- 4.5.4. MY ORIGINAL SETTINGS : JetPack ver 5.0.2, Ubuntu20.04, CUDA 11.4.239, cuDNN 8.4.1.50, OpenCV 4.5.4-with CUDA:NO, pytorch: 1.11.0 , torchvision:0.12.0

I executed "./build_opencv.sh 4.5.4" and it seems worked. But, when I try to check the result, jtop says opencv 4.5.4 installed successfully..and here is the problem. When I print cv2.getBuildInformation() in python script after import cv2, opencv4.8.1 version gets out so I can't run YOLO model with GPU support.

Screenshot from 2023-10-19 14-19-29 Screenshot from 2023-10-19 14-20-36

This is what I can see during build process - I can see opencv with version 4.5.4 and also has NVIDIA CUDA , cuDNN attribute at second picture.

Screenshot from 2023-10-19 14-21-21 and this is result of "cv2.getBuildInformation()" - opencv 4.8.1-dirty.

I didn't touch any additional setting at all!! And even worse, I can't see NVIDIA CUDA , cuDNN in this script. Screenshot from 2023-10-19 14-21-49

I can't figure out what's the cause of the problem.. How can I fix this?

this is a screenshot for more detail Screenshot from 2023-10-19 14-53-15

Jeong-m1n avatar Oct 19 '23 05:10 Jeong-m1n

I have the same problem. I successfully installed OpenCV 4.6.0. In the jtop info, it shows:

OpenCV: 4.8.0 with CUDA: YES

However, when I checked with pip3 list, I found:

  1. opencv-python 4.1.1

In Python 3.6, the OpenCV version is 4.1.1 without CUDA support. I checked and CV2 4.8.0 was build in Python 2.7

I want to use OpenCV 4.8.0 with Python 3.6. How can I do this?

VieiraJardel avatar Oct 28 '23 00:10 VieiraJardel