Qengineering / Install-OpenCV-Jetson-Nano

OpenCV installation script with CUDA and cuDNN support
https://qengineering.eu/install-opencv-on-jetson-nano.html
BSD 3-Clause "New" or "Revised" License
149 stars 50 forks source link

Possible to generate Python wheel? #22

Open Dapid opened 7 months ago

Dapid commented 7 months ago

I have successfully installed OpenCV, including the Python bindings.

print(cv2.getBuildInformation())

General configuration for OpenCV 4.9.0 =====================================
  Version control:               unknown

  Extra modules:
    Location (extra):            /home/ica/opencv_contrib/modules
    Version control (extra):     unknown

  Platform:
    Timestamp:                   2024-03-22T14:59:28Z
    Host:                        Linux 5.10.192-tegra aarch64
[...]

The problem is that when I install a package that depends on opencv, it will not see this and pull the python-opencv wheel, which has fewer capabilities.

There is another repo that builds the wheels, would it be possible to integrate that into this script? Or adjust it to generate the right output? If not, we could export the CMake options in this repo into the wheel building script.

The uglier alternative is to create a dummy wheel that serves as a placeholder.

Qengineering commented 7 months ago

A common problem. To overcome ownership issues, I use virtual environments. The wheels you're referring to are all CPU-based. When integrating CUDA acceleration, you're facing too much deviation. Not only the Python version but the CUDA architecture must also be taken into account.