jep's People
Forkers
honeypatouceul andrewssobral s-inner shield-os peimengxin zhangruitiannb jk-cool dhingratul sangyy jayantysrikrishna baptisteamato jccbbb booiresearch alexanderfrey montasar8 lpeti69 inderpreet-forks personcj dudasdavid henje ncnynl hwaccel onuralpszr ticlazau vott mattvend jnjtnutty gefanxe nicksonyap mboaretto25 mattdom kumarwzx zhj-buffer sunkenneth riverfieldtech datacentric-ai hacker-icechan smatton da62b207 augustren nulijiabei arghyachatterjee dwaynekj matkovst m-j-v arfbrkdmr dormiy hadiidbouk hlyu368 javis-tedix xusik congphase donchanyeah guillaumemacaigne terasakisatoshi yanyang20069 sloth-with-wings sunilsomarajan caophuocthanh marcjavin lc168 devfallingstar hebos benmaticthings namwoo abdurrasith gtq manpoi stephenfang51 jgabriellima tsingwei beosro wooodhead shaynvidia sylunna hardware-breez waitingdeng dmenig sharku2011 vinayrraj sagar73594 gilson27 galileo-bill danielqujun king-of-flies khanhdinh josefhernandez eweill-nv bilal-yousaf-confiz onier jon-bill83 jocephus valeryspringbiomed raphtadev zilinglius yuanyantai sam-37 spectator-health sergiobrimatech ryunos8jep's Issues
run install_opencv3.4.0_Xavier.sh erorr in Xavier
[100%] Building CXX object modules/videostab/CMakeFiles/opencv_test_videostab.dir/test/test_main.cpp.o [100%] Building CXX object modules/videostab/CMakeFiles/opencv_test_videostab.dir/test/test_motion_estimation.cpp.o cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/videostab/test_precomp.hpp.gch/opencv_test_videostab_RELEASE.gch: not used because
OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
cc1plus: warning: /root/tools/opencv-3.4.0/release/modules/videostab/test_precomp.hpp.gch/opencv_test_videostab_RELEASE.gch: not used because `OPENCV_TRAITS_ENABLE_DEPRECATED' is defined [-Winvalid-pch]
[100%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir//src2/cv2.cpp.o
[100%] Building CXX object modules/python2/CMakeFiles/opencv_python2.dir//src2/cv2.cpp.o
[100%] Linking CXX executable ../../bin/opencv_test_superres
[100%] Built target opencv_test_superres
/root/tools/opencv-3.4.0/modules/python/src2/cv2.cpp: In function ‘bool pyopencv_to(PyObject*, T&, const char*) [with T = cv::String; PyObject = _object]’:
/root/tools/opencv-3.4.0/modules/python/src2/cv2.cpp:885:34: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
char* str = PyString_AsString(obj);
[100%] Linking CXX executable ../../bin/opencv_perf_superres
[100%] Built target opencv_perf_superres
[100%] Linking CXX executable ../../bin/opencv_test_videostab
[100%] Built target opencv_test_videostab
modules/python3/CMakeFiles/opencv_python3.dir/build.make:62: recipe for target 'modules/python3/CMakeFiles/opencv_python3.dir//src2/cv2.cpp.o' failed
make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir//src2/cv2.cpp.o] Error 1
CMakeFiles/Makefile2:12108: recipe for target 'modules/python3/CMakeFiles/opencv_python3.dir/all' failed
make[1]: *** [modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
^Cmodules/python2/CMakeFiles/opencv_python2.dir/build.make:62: recipe for target 'modules/python2/CMakeFiles/opencv_python2.dir//src2/cv2.cpp.o' failed
make[2]: *** [modules/python2/CMakeFiles/opencv_python2.dir//src2/cv2.cpp.o] Interrupt
CMakeFiles/Makefile2:12027: recipe for target 'modules/python2/CMakeFiles/opencv_python2.dir/all' failed
make[1]: *** [modules/python2/CMakeFiles/opencv_python2.dir/all] Interrupt
Makefile:162: recipe for target 'all' failed
make: *** [all] Interrupt
`
Can't install OpenCV-4.5.0
When the script tries to unzip opencv-4.5.0.zip I get :
"End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case, the central directory and zipfile comment will be found on the last disk(s) of this archive. / cannot find zipfile directory in one of opencv-4.5.0.zip or opencv-4.5.0.zip.zip, and cannot find opencv-4.5.0zip.ZIP, period."
I already tried cloning the unzipped repository and running $git checkout opencv-4.50, but it didn't work either: "pathpec 'opencv-4.5.0' did not match any file(s) known to git"
OpenCV4.6.0 with CUDA JetPack 5.0.2 - build script - missing V4l2ucp
At least for me the install_opencv4.6.0_Jetson.sh script does not run because V4l2ucp seems no longer available at JetPack 5.0.2. ( Ubuntu 20.04).
I removed it from the script to enable the build.
Any idea what wont work with Ubuntu 20.04 OpenCV 4.6.0 CUDA accelerate if V4l2ucp is not available?
Thank you,
-Jack
CUDA_ARCH_BIN version 5.3 missing for Jetson Nano in install_opencv4.6.0_Jetson.sh
Is there any compatibility issue with jetson nano and opencv 4.6.0? coz the arch bin version's included only support Xavier and Orin platforms of Jetson and throws an error when used to build opencv 4.6.0 on Jetson Nano
Adding 5.3 in the version fixes the issue(incompatible gpu architecture for using compute_87) for Nano.
附上我的记录
在jetson nano上编译 opencv 的坑
-
没打算在 jetson 原始系统上编译 opencv,担心把环境搞乱,所以使用 docker,开始进坑
-
jetpack 的版本问题,4.3,4.21是不同的,上面 cuda 版本,opencv 版本有关系,比如3.4.1可能不支持 cuda10,此坑耽误了2天,最后在 nvidia 官网上提问,官方同学回答了。
-
docker 镜像,想找一个可以跑在上面的镜像,发现做镜像的人不是很靠谱,并没有测试完整。如 tx2 的镜像在 nano 上不好用。
-
jetpack 4.3,与4.21是不同的,最大不同,4.3的 docker 默认支持 cuda 了。4.2.1不可以。
-
opencv 版本,nano上已经不支持低版本 opencv,看有人说使用3.4的版本(百度结果),最后发现不行,后来在 github 找到一个安装脚本使用的4.0+,应该是可以了,不过还有别的坑。经验,最好不要直接百度或者 google,用的话可以直接找别人写好的脚本,说明是成功过的。另外 nvidia 的官方论坛信息要比 google 全面的多。
-
opencv4.0 安装坑,不要想当然 的自己直接 cmake,因为编译会非常慢,有些flag 是没必要打开的,打开也不一定成功,比如 test,论坛上说 opencv 的test 不能在 nano 上全部通过,原因也没有说清楚。导致 jetpack 上自带的 opencv 是没有 gpu 支持的。
https://github.com/theerawatramchuen/Jetson-Nano-Installation/blob/master/install_opencv4.0.0_Nano.sh#L48
https://github.com/AastaNV/JEP/blob/master/script/install_opencv4.1.1_Jetson.sh
这个地方的脚本可以改一下,就支持在**不好下载文件问题。**的网真的是太烂了,丢人。 -
opencv4.0 make坑,里面 contri 包也不知道怎么搞的,还要下载几个.i 的文件,使用 cmake 下载还失败了,然后编译不成功,github 上有专门人讨论:opencv/opencv_contrib#1301,
===
耗时一周多,但是这个坑必需填上。终于成功了。
version as a variable
Allow the script installing latest openCV or take version as a parameter of the script
OSError: libopencv_imgcodecs.so.3.3: cannot open shared object file: No such file or directory
Installed OpenCV using https://github.com/AastaNV/JEP/blob/master/script/install_opencv4.0.0_Nano.sh
installed mxnet
https://drive.google.com/file/d/1jr-kP1_zlLa9tx-GtdlBV3Nn20qRJgzY/view
I am getting this error
Traceback (most recent call last):
File "myscript.py", line 5, in
from core.symbol import P_Net, R_Net, O_Net
File "/home/user/Documents/distanc/core/symbol.py", line 1, in
import mxnet as mx
File "/home/user/.virtualenvs/test/lib/python3.6/site-packages/mxnet/init.py", line 24, in
from .context import Context, current_context, cpu, gpu, cpu_pinned
File "/home/user/.virtualenvs/test/lib/python3.6/site-packages/mxnet/context.py", line 24, in
from .base import classproperty, with_metaclass, _MXClassPropertyMetaClass
File "/home/user/.virtualenvs/test/lib/python3.6/site-packages/mxnet/base.py", line 213, in
_LIB = _load_lib()
File "/home/user/.virtualenvs/test/lib/python3.6/site-packages/mxnet/base.py", line 204, in _load_lib
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
File "/usr/lib/python3.6/ctypes/init.py", line 348, in init
self._handle = _dlopen(self._name, mode)
OSError: libopencv_imgcodecs.so.3.3: cannot open shared object file: No such file or directory
Tried this https://github.com/cggos/dip_cvqt/issues/1#issuecomment-284103343
on trying this
sudo find / -name "libopencv_imgcodecs.so.3.3"
Can not find any such file
Saw
https://answers.opencv.org/question/6732/missing-shared-library/
Ran this
sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
sudo ldconfig
Still i am getting the same error
Please guide, confused here
Issue in install_opencv4.0.0_Nano.sh
sudo apt-get install -y python-opencv python3-opencv
after sudo make install
is unnecessary. Actually it may overwrite the compile output with older libs. IMO it should be replaced with sudo ldconfig
.
ModuleNotFoundError: No module named 'cv2'
After installing OpenCV
** Install opencv-4.5.0 successfully ** Bye :)
It says
python3
Python 3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cv2'
How to solve this?
OpenCV install for Xavier NX?
Hi!
Any chance you can give instructions or a script for installing OpenCV with CUDA support for the Xavier NX?
Thanks!
install into venv?
wrong tab, sorry - pls delete
Why tf.where operation run slowly on GPU
Our target is to use object detection API on NVIDIA Jetson platform.
Here are some experiments:
tf.where op takes long time on GPU
1. Test on a TITAN Z PC
2. Model: ssd_mobilenet_v1_coco_2017_11_17
3. Profiled with a method mentioned here:
https://towardsdatascience.com/howto-profile-tensorflow-1a49fb18073d
4. GPU model: 15ms for CNN, 50ms for post-processing
5. CPU model: 55ms for CNN, 20ms for post-processing
GPU + CPU have better performance
- We hack the .pb file to put CNN network on GPU and map-related network on CPU
- Performance is better:
| CNN | MAP | Time |
| CPU | CPU | 0.16 ms-0.19 ms |
| GPU | GPU | 0.20 ms-0.21 ms |
| GPU | CPU | 0.07ms |
Change input resolution
Follow by issue 3243,
We test 600x600 image but still get similar execution time of default image, which is 1024x636.
Our question is:
1. What is the device placement of object detection API of ssd_mobilenet_v1_coco_2017_11_17 mentioned here:
https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md
2. Why tf.where run slower on GPU
3. How could we have the similar results(30ms) with the ssd_mobilenet_v1_coco_2017_11_17 model?
Our environment:
Ubuntu16.04 + TF-1.4 + CUDA 8 + TITAN Z/TX2
Thanks.
opencv-contrib-python
Hi
I tried your script for installing opencv on a jetson xavier nx with newest jetpack version which seems to work fine (thank you for that). however even after install it seems like the opencv-contrib-python does not get installed.
Can you help here?
thank you very much
cheers
Docker openCV 4.3.0 - Cuda cuDNN include and lib not found - CUDA 10 found - JP44 & JP43
Hello, first of all thanks AastaNV I was able to make it works with 4.1.1.
But then I'm building a Dockerfile for 4.3.0 to improve inference speed.
Host: jetson nano freshly flashed with JP44 iso.
I've even tried to install cudnn.deb v 7.6.4 from Nvidia ARM64 (previous flash but same issue).
I've tried to install the cudnn deb on docker too without any difference.
REM: This is JP43 below.
$ cat /usr/include/cudnn.h | grep CUDNN_MAJOR -A 2
#define CUDNN_MAJOR 7
#define CUDNN_MINOR 6
#define CUDNN_PATCHLEVEL 3
--
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)
#include "driver_types.h
$ cat /usr/local/cuda/version.txt
CUDA Version 10.0.326
How do we solve this? Should we hardcode LIBRARY_CUDNN and INCLUDE_LIB_CUDNN?
Or do we merge (cp) CUDNN into Cuda?
- nvidia CUDA: YES (ver10.0, CUFFT, CUBLAS)
- cuDNN: NO
So I've had a docker build issue due to missing runtime.
EDIT: Solved the build issue, /etc/docker/daemon.json was not reloaded with nvidia runtime
So if you can install it by docker run and not by dockerfile, check your runtime (;
EDITED: removed stuff that is solved or trivial.
Continue setup after error
The process got to 93% and then quit unexpectedly. I later discovered that it happened because of a memory issue.
So, I did a memory swapping. But would I have to start running the shell script from the beginning? Or is there a way I can continue from where I stopped?
Please, help.
Thanks
Issue while building opencv with install_opencv4.0.0_Nano.sh
While building the opencv4.0 encountered the following error
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-7/README.Bugs for instructions.
modules/python3/CMakeFiles/opencv_python3.dir/build.make:62: recipe for target 'modules/python3/CMakeFiles/opencv_python3.dir//src2/cv2.cpp.o' failed
make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir//src2/cv2.cpp.o] Error 4
CMakeFiles/Makefile2:10549: recipe for target 'modules/python3/CMakeFiles/opencv_python3.dir/all' failed
make[1]: *** [modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
CMake Error at cuda_compile_1_generated_pyrlk.cu.o.RELEASE.cmake:281 (message): Error generating file
Thanks for the script. Any ideas? TIA.
[ 97%] Linking CXX shared library ../../lib/libopencv_stitching.so
[ 97%] Built target opencv_stitching
Killed
CMake Error at cuda_compile_1_generated_pyrlk.cu.o.RELEASE.cmake:281 (message):
Error generating file
/home/dennis/opencv40/opencv-4.0.0/release/modules/cudaoptflow/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_pyrlk.cu.o
modules/cudaoptflow/CMakeFiles/opencv_cudaoptflow.dir/build.make:70: recipe for target 'modules/cudaoptflow/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_pyrlk.cu.o' failed
make[2]: *** [modules/cudaoptflow/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_pyrlk.cu.o] Error 1
CMakeFiles/Makefile2:9839: recipe for target 'modules/cudaoptflow/CMakeFiles/opencv_cudaoptflow.dir/all' failed
make[1]: *** [modules/cudaoptflow/CMakeFiles/opencv_cudaoptflow.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
Update to install openCV 4.4.0?
Opencv-contrib for python3
Script only installs contrib packages for python2 not for python3. How can I install it for python3?
<Install Folder>
Whats up with this (Install Folder) when trying to run the script? (install_opencv4.0.0_Nano.sh)
How to get Python bindings that reference the installed version of OpenCV?
Thanks for providing these scripts. I was able to complete the build/installation of OpenCV v4.0 today using the Jetson Nano script. However, the Python bindings accessible by the base Python installations appear to reference a previous version (3.2) rather than the OpenCV version (4.0) installed by the script from this repository:
$ python
Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
'3.2.0'
$ python3
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
'3.2.0'
When I launch a virtual environment the OpenCV bindings aren't present at all, and I can't seem to install them via pip
:
$ workon cvtest
(cvtest) $ python
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cv2'
>>>
(cvtest) $ pip install opencv-python
Collecting opencv-python
ERROR: Could not find a version that satisfies the requirement opencv-python (from versions: none)
ERROR: No matching distribution found for opencv-python
The bindings are installed (I think) by the final line of the script:
sudo apt-get install -y python-opencv python3-opencv
However, it appears that the bindings that are installed by the commands above are for version 3.2 and bear no relation to those we built with the script from this repository:
$ sudo apt list --installed | grep opencv | grep python
python-opencv/bionic-updates,bionic-security,now 3.2.0+dfsg-4ubuntu0.1 arm64 [installed]
python3-opencv/bionic-updates,bionic-security,now 3.2.0+dfsg-4ubuntu0.1 arm64 [installed]
Can anyone advise? Thanks in advance for any help. BTW I'm new at this, my apologies for dumb/naive questions...
install_opencv_4.0.0_nano.sh stuck (out of mem)
The script hang here "[100%] Building CXX object modules/python2/CMakeFiles/opencv_python2.dir/__/src2/cv2.cpp.o". The system overall becomes slow and the top command shows the following as the first line:
%Cpu(s): 0.1 us, 28.0 sy, 0.0 ni, 21.7 id, 49.8 wa, 0.3 hi, 0.2 si, 0.0 st
KiB Mem : 4059712 total, 59300 free, 3934356 used, 66056 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 7896 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
880 root 20 0 0 0 0 R 92.6 0.0 252:41.36 kswapd0
1782 root -2 0 0 0 0 S 8.9 0.0 24:30.52 mmcqd/0
15115 roe 20 0 1852268 1.673g 200 D 1.5 43.2 2:07.82 cc1plus
15114 roe 20 0 1856272 1.677g 1640 D 1.3 43.3 2:07.64 cc1plus
4611 root 20 0 1075632 18720 0 S 0.6 0.5 35:35.54 containerd
15198 roe 20 0 9108 1724 972 R 0.6 0.0 0:00.33 top
I think it's out of mem.
create wheel
It would be a nice feature to package the compiled openCV into *.whl for easier distribution
Can I get script for python3 opencv installation on Xavier with gstreamer support ON?
Hi,
I had done the above the setup successfully.
But unfortunately not able to replicate the setup again.
Can I get the script if you have any?
also I need cuda support ON by specifying the cuda-10.0 path
After install, opencv version displayed by 'jtop' and python script by 'cv2.getBuildInformation()' doesn't match.
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:
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?
OpenCV script Add pkgconfig and deb package build
In the cmake command -D OPENCV_GENERATE_PKGCONFIG=YES see https://stackoverflow.com/a/62675970/2137364
For build deb package I use this command:
$ sed -i 's/CPACK_BINARY_DEB:BOOL=OFF/CPACK_BINARY_DEB:BOOL=ON/' CMakeCache.txt
$ sed -i 's/unknown/4.3.0/' CPackConfig.cmake
$ sed -i 's/unknown/4.3.0/' CPackSourceConfig.cmake
$ sudo make package
CMake Error - cudaoptflow
This breaks on a brand new install of nano.
I removed the old opencv and ran the nano script - it gets to 98% at Fails...
also - the install folder and user/password in the script is never used...
any ideas??
Killed
CMake Error at cuda_compile_1_generated_pyrlk.cu.o.RELEASE.cmake:281 (message):
Error generating file
/data/sources/JEP/script/opencv-4.0.0/release/modules/cudaoptflow/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_pyrlk.cu.o
modules/cudaoptflow/CMakeFiles/opencv_cudaoptflow.dir/build.make:70: recipe for target 'modules/cudaoptflow/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_pyrlk.cu.o' failed
make[2]: *** [modules/cudaoptflow/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_pyrlk.cu.o] Error 1
CMakeFiles/Makefile2:9951: recipe for target 'modules/cudaoptflow/CMakeFiles/opencv_cudaoptflow.dir/all' failed
make[1]: *** [modules/cudaoptflow/CMakeFiles/opencv_cudaoptflow.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
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.