Raspberry pi5 TensorFlow-lite Object Detection
Hardware : Raspberry pi5
- Broadcom BCM2712 2.4GHz quad-core 64-bit Arm Cortex-A76 CPU, with cryptography extensions, 512KB per-core L2 caches and a 2MB shared L3 cache
- VideoCore VII GPU, supporting OpenGL ES 3.1, Vulkan 1.2
- Dual 4Kp60 HDMI® display output with HDR support
- 4Kp60 HEVC decoder
- LPDDR4X-4267 SDRAM (4GB and 8GB SKUs available at launch)
- Dual-band 802.11ac Wi-Fi®
- Bluetooth 5.0 / Bluetooth Low Energy (BLE)
- microSD card slot, with support for high-speed SDR104 mode
- 2 × USB 3.0 ports, supporting simultaneous 5Gbps operation
- 2 × USB 2.0 ports
- Gigabit Ethernet, with PoE+ support (requires separate PoE+ HAT)
- 2 × 4-lane MIPI camera/display transceivers
- PCIe 2.0 x1 interface for fast peripherals (requires separate M.2 HAT or other adapter)
- 5V/5A DC power via USB-C, with Power Delivery support
- Raspberry Pi standard 40-pin header
- Real-time clock (RTC), powered from external battery
- Power button
Software
Raspberry pi OS : 64 bit
tflite-support
The new Raspberry Pi OS uses Python 3.11 by default, but TensorFlow Lite currently only supports Python 3.9 on ARM aarch64 architecture. To resolve this, you can create a separate virtual environment with Python 3.8 or 3.9 using
conda create -n name python=3.8
or conda create -n name python=3.9
Conda Python 3.8
Install mini conda
https://docs.conda.io/projects/miniconda/en/latest/miniconda-other-installer-links.html
conda create -n tflite python=3.8.18
conda activate tflite
TensorFlow-lite Example
Install Code
git clone https://github.com/tensorflow/examples --depth 1
cd examples/lite/examples/object_detection/raspberry_pi
sh setup.sh
Run Image Object Detection
Run Video File Object Detection
Source Code
https://github.com/tensorflow/examples/tree/master/lite/examples/object_detection/raspberry_pi