tensorrt_demos: ModuleNotFoundError: No module named 'uff'

I am a beginner, trying to run Demo #3: SSD on the nano.

I am using TF 1.15.2, and have been able to run object detection on models that I have trained at about 5 fps (mobilnet_v2).

When I run the ./build_engines.sh of Demo3 I get this error:

`+ for model in ssd_mobilenet_v1_coco ssd_mobilenet_v1_egohands ssd_mobilenet_v2_coco ssd_mobilenet_v2_egohands

  • python3 build_engine.py ssd_mobilenet_v1_coco Traceback (most recent call last): File “build_engine.py”, line 15, in <module> import uff ModuleNotFoundError: No module named ‘uff’ ` Is this because Demo3 is not compatible with TF1.15.2, or is it because I have not installed everything correctly? BR Patrik

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 38 (16 by maintainers)

Most upvoted comments

Yes, that could be it.

Please try to copy “uff” module into your virtual environment. For example, do the copying like this (but replace the virtual environment path with your own).

$ cp -r /usr/lib/python3.6/dist-packages/uff ${HOME}/venv/lib/python3.6/site-packages/

You’ll likely have to do the same for “cv2” and maybe other modules.

Thanks, could my problem be because I use a virtual environment? Would I need to put something more in the file below?

export PYTHONPATH=$PYTHONPATH:/home/pi/models/research:/home/pi/models/research/slim:/usr/lib/python3.6/dist-packages/cv2/python-3.6