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

Add --no-pantilt option to run model without the need for Pantilt module. #20

Closed Grippy98 closed 4 years ago

Grippy98 commented 4 years ago

Description

I'd like to run the models without having a Pimoroni Pantilt module for the time being.

What I Did

Nothing

leigh-johnson commented 4 years ago

👋 Hey, thanks for the request. I think this is reasonable.

Just wondering, what error do you get run you run the detect or face-detect commands without the Pan-tilt module?

cheewee2000 commented 4 years ago

I'd love to see this implemented as well! I'm building something that doesn't require camera movement. I don't get any errors when I run detect or face-detect. I just get ...Initialized TensorFlow Light runtime and it just hangs there. No camera preview either.

When I run it will --loglevel=DEBUG I get the info printouts for framerate, but no camera preview.

cheewee2000 commented 4 years ago

I get these errors when I run $rpi-deep-pantilt test camera

Traceback (most recent call last): File "/home/pi/.venv/bin/rpi-deep-pantilt", line 10, in sys.exit(main()) File "/home/pi/.venv/lib/python3.7/site-packages/rpi_deep_pantilt/cli.py", line 153, in main cli() File "/home/pi/.venv/lib/python3.7/site-packages/click/core.py", line 829, in call return self.main(args, kwargs) File "/home/pi/.venv/lib/python3.7/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/home/pi/.venv/lib/python3.7/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/pi/.venv/lib/python3.7/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/pi/.venv/lib/python3.7/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, ctx.params) File "/home/pi/.venv/lib/python3.7/site-packages/click/core.py", line 610, in invoke return callback(args, **kwargs) File "/home/pi/.venv/lib/python3.7/site-packages/rpi_deep_pantilt/cli.py", line 149, in camera return camera_test() File "/home/pi/.venv/lib/python3.7/site-packages/rpi_deep_pantilt/control/hardware_test.py", line 13, in camera_test pantilthat.pan(0) File "/home/pi/.venv/lib/python3.7/site-packages/pantilthat/pantilt.py", line 466, in servo_one self.setup() File "/home/pi/.venv/lib/python3.7/site-packages/pantilthat/pantilt.py", line 72, in setup self._i2c = SMBus(1) FileNotFoundError: [Errno 2] No such file or directory