roguedarkjedi / dogcam-ai

The AI based camera focus controller for dogcam
MIT License
1 stars 0 forks source link

Consider AI hardware sticks #15

Closed roguedarkjedi closed 4 years ago

roguedarkjedi commented 4 years ago

So while this code is fairly optimized for what it is, there's the very clear and obvious problem that this code base can only process at 1 frame every 2 seconds (essentially running at .5fps). This is with the the full processing power and OpenCV optimizations which don't necessarily target the dnn module (which we use almost exclusively).

This leads into the problem of while we can be as fast as we can be, we'll always be processing dog images very slowly.

I believe I've hit the upperbounds of what the Pi can do. I don't think I can process this any better. So after some investigations, it might be worth considering investing in an AI processor expansion.

image

roguedarkjedi commented 4 years ago

Coral USB Board

https://coral.ai/products/accelerator/ https://coral.ai/docs/accelerator/get-started/#requirements

Pros:

Cons:

Notes:

https://www.tensorflow.org/lite/guide/inference#load_and_run_a_model_in_python https://medium.com/@aallan/hands-on-with-the-coral-usb-accelerator-a37fcb323553 https://www.pyimagesearch.com/2019/04/22/getting-started-with-google-corals-tpu-usb-accelerator/ https://www.pyimagesearch.com/2019/05/13/object-detection-and-image-classification-with-google-coral-usb-accelerator/

roguedarkjedi commented 4 years ago

Intel Compute Stick

https://movidius.github.io/ncsdk/ncs.html

Pros:

Cons:

Notes:

https://towardsdatascience.com/how-to-stream-video-with-real-time-object-detection-on-raspberry-pi-f6503c46c7f9

https://www.pyimagesearch.com/2019/04/08/openvino-opencv-and-movidius-ncs-on-the-raspberry-pi/

https://www.pyimagesearch.com/2018/02/12/getting-started-with-the-intel-movidius-neural-compute-stick/

https://medium.com/hacksters-blog/getting-started-with-the-intel-neural-compute-stick-2-and-the-raspberry-pi-6904ccfe963

roguedarkjedi commented 4 years ago

This is implemented and works great. Closing this issue, but will pin it because the notes are good.