Anyone done computer vision on a Raspberry Pi?

I would value a chat about capacities and approaches, as I am stuck!

I have a bit. I’d previously created a Pi based camera that can take a picture and describe what it can see.
What are you trying to do?

1 Like

I am creating a Raspberry Pi based device for teaching children about IoT, AI, Computer Vision, Home Automation etc.

I have specified a Raspberry Pi Zero 2 and done loads of work integrating various sensors etc and producing example activities using Node-RED. I have left Computer Vision to quite late in the build process.

I’m using TensorFlow because it is versatile and have available nodes for Node-RED. E.g. https://flows.nodered.org/node/node-red-contrib-tensorflow

I have it running on a Pi 3B+, but VERY slowly. I can’t even get it to install on the Pi Zero 2.

I don’t know the software stack well enough to even work out if what I want to do is viable.

Any input would be useful.

Thanks

If you’re interested in sticking with TensorFlow and you have some budget, you could try switching to using Google’s Coral dev board or a Raspberry Pi using a Coral USB accelerometer, both of which are built for this sort of work. I’m confident your Node-RED code will work better using these then with a vanilla Raspberry Pi.
As a suggestion, with that and a camera you could potentially set up a live demonstration using one of their pre-canned examples (here).

If you don’t want to get new hardware, you could try TensorFlow Lite. There’s a tutorial here where someone was able to get an object classification algorithm running using it and a Pi 4 at about 5 FPS (if that’s an improvement on what you currently have).

Or you could use a simpler example. There’s a demonstration here showing a Raspberry Pi being used for motion, colour, object, and face detection which should run a bit more smoothly.

I hope that helps.

1 Like

Yeah, you will totally need an accellerator for that…

1 Like

I had decent success with a rpi 3B and OpenCV a few years ago.

I think I followed this (now quite dated) installation guide and used some of their other guides to help me get started. If I remember the main thing to help me was to use low resolution images, or use low res for the algorithms and upscale the results to draw on a big image.

https://pyimagesearch.com/2017/09/04/raspbian-stretch-install-opencv-3-python-on-your-raspberry-pi/

1 Like