Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't find CV2 on testing with tensorflow #19

Open
omartin2010 opened this issue Jun 4, 2018 · 6 comments
Open

can't find CV2 on testing with tensorflow #19

omartin2010 opened this issue Jun 4, 2018 · 6 comments

Comments

@omartin2010
Copy link

Hi guys,

I'm getting this error after being able to successfully run the rest. Python in my case points to /usr/bin/python3 (symlink).

nvidia@tegra-ubuntu:/dev/tf_to_trt_image_classification$ python scripts/test_tf.py
Traceback (most recent call last):
File "scripts/test_tf.py", line 14, in
import cv2
ImportError: No module named 'cv2'
nvidia@tegra-ubuntu:
/dev/tf_to_trt_image_classification$

I'm not finding the way to properly install the opencv-python package, does that package need to be compiled for this? Am I missing something obvious? thanks!

@ghost
Copy link

ghost commented Jun 4, 2018

@omartin2010

We use OpenCV4Tegra that ships with JetPack 3.2. The easiest solution would be to install this when loading software via JetPack.

Let me know if you have any other questions!

John

@omartin2010
Copy link
Author

omartin2010 commented Jun 4, 2018

does me getting this error mean I'm likely to not have selected opencv4tegra when I loaded the software using JetPack? and is this something I can easily add without starting over from scratch?

@ghost
Copy link

ghost commented Jun 4, 2018

Likely that's what it means, or it was otherwise removed.

Fortunately, you don't have to start from scratch if you've already flashed your Jetson with JetPack 3.2.

Run the JetPack installation script, and deselect options to flash the Jetson. This will allow you to install software without re-flashing the operating system. Ensure OpenCV4Tegra and it's dependencies are selected.

@ghost
Copy link

ghost commented Jun 4, 2018

Actually, I just noticed that you are running Python 3. This repository targets Python 2 (which OpenCV4Tegra targets).

@omartin2010
Copy link
Author

ok - I will try redoing this with Python2. All the rest seem to work fine (the conversion to TensorRT + execution). However I found the output of the testing to be on the light side. Perhaps I don't look at the right things. And if using Python2 I sitll don't find OpenCV4Tegra, I'll modify the JetPack deployment. Thanks!

@ghost
Copy link

ghost commented Jun 4, 2018

No problem, thanks for the feedback. FYI, the output of the benchmark scripts should be placed in a text file under the data directory.

Let me know if there are any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant