Samm Flynn
Samm Flynn

Reputation: 314

fast light and accurate person-detection algorithm to run on raspberry pi

Hope you are doing well.

I am trying to build a following robot which follows a person. I have a raspberry pi and and a calibrated stereo camera setup.Using the camera setup,i can find depth value of any pixel with respect to the reference frame of the camera.

My plan is to use feed from the camera to detect person and then using the stereo camera to find the average depth value thus calculating distance and from that calculate the position of the person with respect to the camera and run the motors of my robot accordingly using PID.

Now i have the robot running and person detection using HOGdescriptor that comes opencv.But the problem is,even with nomax suppression, the detector is not stable to implement on a robot as too many false positives and loss of tracking occurs pretty often.

So my question is,can u guys suggest a good way to track only people. Mayb a light NN of some sort,as i plan to run it on a raspberry pi 3b+. I am using intel d435 as my depth camera. TIA

Upvotes: 0

Views: 1402

Answers (3)

There is one build in rust and also has the ability to send data in an MQTT Broker

Every parameter is adjustable from terminal commands

ruspberrypi_people_detection

I found that it is not very accurate but if you change the values in this function depending on your camera can make it significantly better :

let mut boxes = VectorOfRect::new();
    hog.detect_multi_scale(
        &processed_frame,
        &mut boxes,
        0.88,
        Size::new(8, 8),
        Size::new(26, 26),
        1.03,
        2.0,
        false,
    )?;

Upvotes: 0

Suman
Suman

Reputation: 364

Raspberry pi does not have the computational capacity to perform object detection and realsense driver support, check out the processor load once you start the realsense application. One of the simplest models for person detection is opencv's HOGdescripto that you have used.

Upvotes: 1

Piotr Rarus
Piotr Rarus

Reputation: 952

You can use pretrained model. Nowadays there's plenty of them to choose from. There're also lighter versions for mobile devices. Check this blog post. It's also worth to check TensorFlow Lite. Some architectures will give you boundig boxes, some masks. Guess you'd be more interested in masks.

Upvotes: 0

Related Questions