[Japanese/English]
This repository is person detection model and demo script assuming CPU operation of Raspberry Pi 4.
Demo.mp4
Using PINTO's TensorflowLite-bin, it works in about 45-60ms when 4 threads are running. * About 75ms in 1 thread.
It works on laptops, but if you need precision, we recommend an object discovery model other than this repository.
Also, when using a laptop PC, "model.onnx" is often faster. *Approximately 10ms on Core i7-8750H
opencv-python 4.5.3.56 or later
tensorflow 2.8.0 or later *Recommended to use TensorflowLite-bin
onnxruntime 1.9.0 or later *Only when using model.onnx
Here's how to run the demo.
python demo.py
- --device
Specifying the camera device number
Default:0 - --movie
Specify video file *When specified, priority is given to the camera device
Default:unspecified - --width
Width at the time of camera capture
Default:640 - --height
Height at the time of camera capture
Default:360 - --model
Storage path of the model to load
Default:model/model.tflite - --score_th
Detection threshold
Default:0.4 - --nms_th
NMS threshold
Default:0.5 - --num_threads
Number of threads used *Valid only when using TensorFlow-Lite
Default:None
This is a demo for ROS2.
Terminal 1
ros2 run v4l2_camera v4l2_camera_node
Terminal 2
python3 ./demo_ros2.py
Kazuhito Takahashi(https://twitter.com/KzhtTkhs)
Person-Detection-using-RaspberryPi-CPU is under Apache 2.0 License.
The sample video uses "London, England, Regent Street" from the NHK Creative Library.