In my problem I want to distinguish people from other shapes in images e.g I want to accurately know how many people are in specific region of image (at least for small number of people, for crowded places it is reasonable to get worse results).

In OpenCV there are three methods with pretrained datasets. Two basic HOGs + SVM algorithms (one trained on inria and the other on daimler dataset) and DPM method that I used also with inria dataset. Models were trained on images of pedestrians of size 64x128(inria) and 48x96(daimler).

I've been doing my tests on a video file with two people in it, but those people are standing or sitting. From my observations I can tell that:

  • DPM is the best algorithm, but it is really slow. It can detect human in sitting position.
  • HOGs are very dependent on the scale e.g. svm trained on daimler dataset works better with small resolution(180p in my case, because camera was close to the people), but for inria results are worse
  • HOGs works better when full human shape is clearly visible
  • Daimler gives a lot of false positives

The results coincide with expectations, because models where trained on standing pedestrians, but even when people were standing the accuracy is really bad. Basically I need to train my own models, but I am concerned about such a strong dependence on the scale and doubt in the sense of using these methods.

I was thinking about using CNN's, but my target device has ARM cpu (https://www.mediatek.com/products/homeNetworking/mt7623n-a). I don't need this detection to work in realtime and I'll be feeding the network with only a part of image (smaller than 480p).

Do you think that such a network can work with decent performance on such cpu? Do you have any suggestions on type of the network, library (c++) that I could try?


I am experimenting with OpenCV's DNN module and yolov3-tiny. It processes whole frame in ~2s and doesn't use a lot of ram (on my target device). I am really satisfied with predictions. Of course, full yolo is better than tiny version, but much slower and consumes a lot of ram.

I am confused about number of models that exists and datasets they were trained on. Caffe Zoo has a lot of them, but I found that e.g GoogleNet doesn't have person class, so this is way I chose yolo for tests. But Yolo also is available for COCO or VOC and I just need to classify people not dogs etc.

I still have to experiment with input parameters in opencv to see how they affect performance and accuracy.

I am also thinking about retraining yolo for humans only maybe in this way I'll reach accuracy of full yolo and performance of the tiny one. What do you think? In general it is better to use COCO or VOC dataset?


If you don't need it to work in real time you should not worry about your CPU that much.

There are a few models for face detection using Res Net 10, with portability to OpenCV, those might be enough if you the people you are trying to count are facing forward.

Else, you can use a Res Net 10, it runs up to 100 FPS on a Intel i5 7200u, which is not that big deal.


Oh, this Face Detection library has optimization form ARM processors using Tengine which may help your case. About face/person I've seen a detection algorithm using OpenCV that detects human heads in any position, including the back of the head. If you want to do person count I think that should suffice. I will try to find it and post here.

| improve this answer | |
  • $\begingroup$ I see, but I want to detect person in general not by face only. I will need to read more about all those different neural networks. I updated the post with information about my current experiments. $\endgroup$ – tobix10 Apr 10 '19 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.