This directory contains a South service plugin that a detects person in the live video stream and generates reading object with type of object (in this case it is person) , bounding box cordinates and confidence score. The plugins also draws the bounding box on the detection window , FPS (Frames Per Second) and also displays confidence scores and type of object detected (Person). In the reading the bounding box consists of {x,y} for top-left corner and bottom right corner of this rectangle. These coordinates values are based on a 640 x 480 canvas.
- TFlite model file:
- This is the name of the tflite model file that should be placed in python/fledge/plugins/south/person_detection/model directory. Its default value is detect.tflite , The file name will different if a Coral Edge TPU is connected (detect_edgetpu.tflite).
- Labels file:
- This is the name of the labels file that was used when training the above model, this file should also be placed in same directory as the model.
- Asset Name:
- The name of the asset used for the readings generated by this plugin.
- Enable Edge TPU :
- If you want to use Coral Edge Tpu then enable this config parameter. Also change the name of the model file to detect_edgetpu.tflite
- Minimum Confidence Threshold :
- The detection results from the model will be filtered out , if the score is below this value.
First run requirements.sh
To see the supported configuration of the camera run
v4l2-ctl --list-formats-ext --device /dev/video0
- You will see something like
- [0]: 'YUYV' (YUYV 4:2:2)
- Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
- Size: Discrete 720x480
Interval: Discrete 0.033s (30.000 fps)
- Size: Discrete 1280x720
Interval: Discrete 0.033s (30.000 fps)
- Size: Discrete 1920x1080
Interval: Discrete 0.067s (15.000 fps) Interval: Discrete 0.033s (30.000 fps)
- Size: Discrete 2592x1944
Interval: Discrete 0.067s (15.000 fps)
Size: Discrete 0x0
You can choose resolution from here.
4. Camera ID is mostly 0 , but you can replace video0 with video1 in above command.
- Install the plugin as usual filling in parameters obtained above.
How to run this in virtual box installed in windows machine ?
Install virtual box extensions
cd c:\Program Files\Oracle\VirtualBox
VBoxManage list webcams
After obtaining the id of camera device run this
VboxManage controlvm "name_of_vm" webcam attach .id
example
VboxManage controlvm "new_ubuntu" webcam attach .1