pjreddie / darknet

Convolutional Neural Networks
http://pjreddie.com/darknet/
Other
25.82k stars 21.33k forks source link

How can I counting the objects and get the result #1469

Open ShiyuXia11 opened 5 years ago

ShiyuXia11 commented 5 years ago

Hi everyone, I am totally new for this project. I have installed YOLOv3, and I trained it by VOC. Now I can run the video by the command: ./darknet detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights sample.mp4. But how can I get the result of counting after the analysis? Such as:

Car: 10 Pedestrians: 15 Bikes: 10

Please forgive me if I got some simple mistakes. Thank you so much for all the reply.

pjspillai commented 5 years ago

You can use model from another python wrapper for your analysis. Also check out openCV's DNN module, that should make life simpler for you.

tutu1234 commented 5 years ago

it is easy to get detection results, for example, in examples/detector-scipy-opencv.py line 41 "r = dn.detect(net, meta, "data/dog.jpg")", the result r is a list, so you can count the amount of every class.

Rimatara commented 5 years ago

@pjspillai Any idea how to enable counting in the source code (C/C++) without Python ?

See example here (don't know how to compile it in VisualStudio 2017 without darknet): countingCar

adamgan919191 commented 5 years ago

how u solve this, can you help me