deepanshu-yadav / fledge-south-human-detector

Fledge south service plugin that detects person in the live video stream

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fledge South Person detection

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.

Plugin config params

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.

Instructions For Installation

  1. First run requirements.sh

  2. 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

  3. You can choose resolution from here.

4. Camera ID is mostly 0 , but you can replace video0 with video1 in above command.

  1. Install the plugin as usual filling in parameters obtained above.

FAQs

  1. 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

About

Fledge south service plugin that detects person in the live video stream

License:Apache License 2.0


Languages

Language:Python 89.8%Language:Shell 10.2%