bitsy-ai / rpi-object-tracking

Object tracking tutorial using TensorFlow / TensorFlow Lite, Raspberry Pi, Pi Camera, and a Pimoroni Pan-Tilt Hat.
https://medium.com/@grepLeigh/real-time-object-tracking-with-tensorflow-raspberry-pi-and-pan-tilt-hat-2aeaef47e134
MIT License
178 stars 70 forks source link

rpi-deep-pantilt track face #57

Closed adelorenzo closed 3 years ago

adelorenzo commented 3 years ago

Description

When I run rpi-deep-pantilt track face --edge-tpu or rpi-deep-pantilt track face I get the following error:

Process Process-2:
Traceback (most recent call last):
  File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/home/pi/.venv/lib/python3.7/site-packages/rpi_deep_pantilt/detect/camera.py", line 26, in run_pantilt_detect
    model = model_cls()
  File "/home/pi/.venv/lib/python3.7/site-packages/rpi_deep_pantilt/detect/facessd_mobilenet_v2.py", line 74, in __init__
    self.PATH_TO_LABELS, use_display_name=True)
  File "/home/pi/.venv/lib/python3.7/site-packages/rpi_deep_pantilt/detect/util/label.py", line 172, in create_category_index_from_labelmap
    label_map_path, use_display_name)
  File "/home/pi/.venv/lib/python3.7/site-packages/rpi_deep_pantilt/detect/util/label.py", line 132, in create_categories_from_labelmap
    label_map = load_labelmap(label_map_path)
  File "/home/pi/.venv/lib/python3.7/site-packages/rpi_deep_pantilt/detect/util/label.py", line 105, in load_labelmap
    label_map_string = fid.read()
  File "/home/pi/.venv/lib/python3.7/site-packages/tensorflow/python/lib/io/file_io.py", line 117, in read
    self._preread_check()
  File "/home/pi/.venv/lib/python3.7/site-packages/tensorflow/python/lib/io/file_io.py", line 80, in _preread_check
    compat.path_to_str(self.__name), 1024 * 512)
tensorflow.python.framework.errors_impl.NotFoundError: /home/pi/.venv/lib/python3.7/site-packages/rpi_deep_pantilt/data/facessd_label_map.pbtxt; No such file or directory

Every other label works perfectly. Kindly advise.

Thank you.

adelorenzo commented 3 years ago

I upgraded to version 2.0.0 and it started working. Thank you!!

leigh-johnson commented 3 years ago

Thank you for the report! Let me know if you ran into documentation that prompted you to install 1.x - I'll make sure this gets updated.

adelorenzo commented 3 years ago

Hello Leigh,

I followed the installation steps on github basically. After some digging I found v2.0.0 and decided to give it a shot, and it worked! It would be cool if the output of the framebuffer could be streamed via HTTP. If you have any idea of how this could be achieved please let me know.

I work with video/blog production and your project would be perfect for this purpose. Thank you so much.

Best regards, Adolfo Delorenzo

careyer commented 2 years ago

This very same problem occured to me as well... can you please describe how to slove that problem ... i cannot comprehend what you mean with "update to 2.0.0". Thanks!