Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.
Because of un-manageable amounts of spam despite our use of CAPTCHAs, email authorization, and other tools, we have discontinued this forum (see the 700k+ registered users with validated email addresses at right?). Please email us any questions or post bug reports and feature requests on GitHub at https://github.com/jevois -- The content below remains available for future reference.

people detection

0 votes

Hello,

I would like to detect people in a room, possibly using an noIR lens, and as there are no such modules in JeVois Camera, i'm going to code my own. Is anyone have any experience with human/people detection using JeVois ? I found an example of such code at this URL : https://medium.com/@madhawavidanapathirana/real-time-human-detection-in-computer-vision-part-2-c7eda27115c6 The example given in this article seems portable to JeVois to me, can you confirm ? Is there any other technique that could give better performances on JeVois ? Any advices ? 

Thanks.

asked Oct 17, 2018 in Programmer Questions by opusr (520 points)

1 Answer

+1 vote
Great idea. Faster-RCNN with inceptionv2 may be a bit too big to run on JeVois.

Have you tried YOLO? The tiny YOLO version can detect people (and 19 other things like bicycles, cars, etc) and runs ok on JeVois. You can either run the original code from the authors, or the OpenCV version:

http://jevois.org/moddoc/DarknetYOLO/modinfo.html

http://jevois.org/moddoc/DetectionDNN/modinfo.html

http://jevois.org/moddoc/PyDetectionDNN/modinfo.html

for the OpenCV DNN version, a different version is loaded by default for face detection. So you need to edit params.cfg (for DetectionDNN) or the python code (for PyDetectionDNN) to swithc to tiny YOLO instead.
answered Oct 22, 2018 by JeVois (46,580 points)
Using Tiny Yolo on Jevois to detect people in a room works quite well. If you need to detect people against a noisy background (like an outdoor space) it's more difficult. Using the pretrained weights works ok or you can retrain it with your own data. You'll want a computer with a GPU if you're going to do your own training.
Thanks for your recommendations. I tried using MobileNet+SSD and the results were surprinsgly good. I also tried using Darknet + Tiny Yolo v3 and results were good too, but MobileNet+SSD seems to be more accurate, especially in low light situations. I found this pedistrian detection model trained on Caltech Dataset (see http://www.vision.caltech.edu/Image_Datasets/CaltechPedestrians/) for MobileNet+SSD ( https://github.com/zlingkang/mobilenet_ssd_pedestrian_detection ). I have to do more tests, but i think training a tinyYolov3 model on this dataset could be great and improve results and framerate. Does anyone know how i could manage to train a TinyYolov3 on this specific dataset (Caltech) ? I'm not sure to understand the way i should go since i'm not very used to tinyYolov3. Do you think it could really improve results and framerate ?
Great find, we will try this model out and may include it in future distros!

To train YOLO, you need 2 basic steps (after you have created the appropriate lists of files, of boxes, etc):

1) compute the anchors for the boxes. You do that with a script that goes over your training set. Then you insert the results into your model definition file.

2) actual training

Very good instructions are on AlexeyAB's site, and his scripts tend to work better (fewer bugs) than the original YOLO code:

https://github.com/AlexeyAB/darknet

make sure you use a "tiny" flavor of YOLO as the original one is intended for operation on big GPUs and is too big for JeVois.

I am planning to run that myself at some point and to write a tutorial. Many other things to do before that but will get to it at some point.
+1 on Alexey's tools. Be sure to check out his Yolo Mark tool for generating training files from a set of photos. If you can programmaticly generate the data for Yolo from the marked Caltech data that would be better, but if you can't, Yolo Mark is a good tool.
I've found this tool https://github.com/zlingkang/Dataset_to_VOC_converter that seems to be really usefull for training yolo from Caltech. I guess i can easily train my own model following Alexey's tutorial since the original DarknetYolo website (pjreddie) explain here https://pjreddie.com/darknet/yolo/ how to train yolo v3 from VOC
...