i made a stand-alone sky survey system using an astronomy camera and raspberry pi. I wrote software with Python language and OpenCV library (mainly).
I am considering purchasing Jetson Nano board in order to replace raspberry pi 3 B+ board. Raspberry board is a bit weak to perform real time video treatments (useful to manage noise, contrast, light pollution in the sky and so on).
My problem is that i would like to keep my software without changing all the code.
I have read things about GPU use. I am not really aware in GPU but it seems that :
Jetson Nano GPU does not support OpenCV acceleration (through opencl) with Python
i have to use PyCuda or Numba to use GPU acceleration, that is to say i canât use opencv with Python
i must rewrite my software to be able to use Jetson Nano GPU capabilities
To resume, if i use Jetson Nano board, i canât get an easy way to use my software (Python and opencv routines) with this board.
Jetson Nano GPU does not support OpenCV acceleration (through opencl) with Python
Our default OpenCV do support GPU acceleration.
The common issue is there are some features havnât be enabled.
(This feature often requires third-party library installed)
i must rewrite my software to be able to use Jetson Nano GPU capabilities
For C++ app, you will need to recompile it with Nano architecture(sm=53).
But since your source is python-based, it wonât be an issue for you.
The CUDA toolkit installed by JetPack already add the support for Nano.
As i said, i am not aware at all with all those libraries but from what i understand, the opencv library you talk about can be use with C++ but wonât work with Python.
Sorry to bother you but itâs important for my final choice.
there were some âopencv for Python languageâ solution as per JetsonHacks âreviewâ that you can find at his website, as far as I remember. I did not try though.
I have read some informations about Jetson Nano and i am a bit disappointed. Itâs an interesting card if you use C++ and CUDA but as i only plan to use Python, Jetson Nano is not interesting at all.
I must admit that Python is not the best choice but for non professional, itâs a simple language and it allow to do very interesting things with small development time (and i have few time for coding).
Concerning my main purpose, that is to say making a stand alone sky survey system, i choose to use my time left to make tests with cameras/lens and try different kind of real time filters (like denoise, contrast, sharpen etc.) using very simple programming language like Python instead of spending many time with C++ and CUDA (opencv provides very useful routines and itâs a totally loss of time to rewrite them with CUDA).
In fact, i am amazed Nvidia is unable to use opencv with Python with hardware acceleration. We loose all the work provided by scientific open software. Trying to promote CUDA and only CUDA is a big mistake.
Anyway, Jetson Nano is not the good choice for me. I will look for an other board with at least a better CPU if i must forget GPU hardware acceleration.
1st is Opencl is pretty crappy performance wise. Your much better off with intel optimization or even better with cuda.
Opencv doesnât come on the nano by default compiled with cuda optimization enabled. Just compile it. All you need to do is add swap and run the excellent script. Done.
If you really want to go fast use python with keras , tensorflow, and tensorrt.
Remember this is a $99 piece of hardware. It is pretty amazing. Of course you can always spend a couple of thousand to get Opencl to go pretty fast. I also want to point out this is only 10 Watt. Even mediocre hardware will easily be 500 Watt. It all depends on what you are trying to accomplish. I also canât agree more with wanting to use python.
Sorry for the late reply. I hope it is not too late.
The default OpenCV included in the JetPack does have CUDA optimization. (including python)
But some extra module depends on the third-party library we are not able to make them into the prebuilt.
If your use case is image-based rather than a live camera, you donât need to update your openCV.
Thanks.
/home/stefan/opencv-4.0.0/3rdparty/carotene/src/resize.cpp: In function âbool carotene_o4t::isResizeLinearOpenCVSupported(const carotene_o4t::Size2D&, const carotene_o4t::Size2D&, carotene_o4t::u32)â:
/home/stefan/opencv-4.0.0/3rdparty/carotene/src/resize.cpp:104:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
if (ssize.width >= 2
^~
/home/stefan/opencv-4.0.0/3rdparty/carotene/src/resize.cpp:112:5: note: here
default:
^~~~~~~
and
[ 34%] Building CXX object modules/dpm/CMakeFiles/opencv_dpm_pch_dephelp.dir/opencv_dpm_pch_dephelp.cxx.o
In file included from /home/stefan/opencv_contrib-4.0.0/modules/cudalegacy/include/opencv2/cudalegacy.hpp:50:0,
from /home/stefan/opencv_contrib-4.0.0/modules/cudalegacy/src/precomp.hpp:57,
from /home/stefan/opencv-4.0.0/build/modules/cudalegacy/opencv_cudalegacy_pch_dephelp.cxx:1:
/home/stefan/opencv_contrib-4.0.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp: In member function âNCVStatus HaarFeature64::setRect(Ncv32u, Ncv32u, Ncv32u, Ncv32u, Ncv32u, Ncv32u)â:
/home/stefan/opencv_contrib-4.0.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:87:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
((NcvRect8u*)&(this->_ui2.x))->x = (Ncv8u)rectX;
^~
/home/stefan/opencv_contrib-4.0.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:88:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
((NcvRect8u*)&(this->_ui2.x))->y = (Ncv8u)rectY;
^~
/home/stefan/opencv_contrib-4.0.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:89:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
((NcvRect8u*)&(this->_ui2.x))->width = (Ncv8u)rectWidth;
^~
/home/stefan/opencv_contrib-4.0.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:90:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
((NcvRect8u*)&(this->_ui2.x))->height = (Ncv8u)rectHeight;
^~
/home/stefan/opencv_contrib-4.0.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp: In member function âvoid HaarFeature64::getRect(Ncv32u*, Ncv32u*, Ncv32u*, Ncv32u*)â:
/home/stefan/opencv_contrib-4.0.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:102:56: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
NcvRect8u tmpRect = *(NcvRect8u*)(&this->_ui2.x);
^
/home/stefan/opencv_contrib-4.0.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:102:56: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
In file included from /home/stefan/opencv_contrib-4.0.0/modules/cudalegacy/include/opencv2/cudalegacy.hpp:50:0,
from /home/stefan/opencv_contrib-4.0.0/modules/cudalegacy/include/opencv2/cudalegacy/private.hpp:57,
from /home/stefan/opencv_contrib-4.0.0/modules/cudaobjdetect/src/precomp.hpp:59,
from /home/stefan/opencv-4.0.0/build/modules/cudaobjdetect/opencv_cudaobjdetect_pch_dephelp.cxx:1:
/home/stefan/opencv_contrib-4.0.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp: In member function âNCVStatus HaarFeature64::setRect(Ncv32u, Ncv32u, Ncv32u, Ncv32u, Ncv32u, Ncv32u)â:
/home/stefan/opencv_contrib-4.0.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:87:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
((NcvRect8u*)&(this->_ui2.x))->x = (Ncv8u)rectX;
^~
/home/stefan/opencv_contrib-4.0.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:88:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
((NcvRect8u*)&(this->_ui2.x))->y = (Ncv8u)rectY;
^~
/home/stefan/opencv_contrib-4.0.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:89:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
((NcvRect8u*)&(this->_ui2.x))->width = (Ncv8u)rectWidth;
^~
/home/stefan/opencv_contrib-4.0.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:90:38: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
((NcvRect8u*)&(this->_ui2.x))->height = (Ncv8u)rectHeight;
^~
/home/stefan/opencv_contrib-4.0.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp: In member function âvoid HaarFeature64::getRect(Ncv32u*, Ncv32u*, Ncv32u*, Ncv32u*)â:
/home/stefan/opencv_contrib-4.0.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:102:56: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
NcvRect8u tmpRect = *(NcvRect8u*)(&this->_ui2.x);
^
/home/stefan/opencv_contrib-4.0.0/modules/cudalegacy/include/opencv2/cudalegacy/NCVHaarObjectDetection.hpp:102:56: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
and several other locations with this last one as well
34%] Building CXX object modules/videostab/CMakeFiles/opencv_videostab_pch_dephelp.dir/opencv_videostab_pch_dephelp.cxx.o
-- Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
-- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
-- Could NOT find Atlas (missing: Atlas_CLAPACK_INCLUDE_DIR)
but i did install it like so:
$sudo apt-get install libatlas-base-dev gfortran
Reading package lists... Done
Building dependency tree
Reading state information... Done
libatlas-base-dev is already the newest version (3.10.3-5).
gfortran is already the newest version (4:7.3.0-3ubuntu2.1).
The following package was automatically installed and is no longer required:
libllvm6.0
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Hi, I just downloaded the installation script mentioned in the first posts, and ran it to the end successfully. But Iâm not able to do run any imports from python3. Does these installation instructions include the compilation of the python bindings as well? If so, how do I reference them?
you may perform steps manually and use the most recent opencv version and you will have to check cmake ⊠outputs to confirm they point to the python and numpy files.