AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.69k stars 7.96k forks source link

Gun detection #4041

Open anthonymg1994 opened 5 years ago

anthonymg1994 commented 5 years ago

I need to detect guns in videos, but i can't get good results(9% mAP), I'm using yolov3.cfg and 90,000 images for training

Any idea how might I solve this ?

Thank you!

AlexeyAB commented 5 years ago
  1. Show Loss & mAP chart
  2. What mAP on Training and Test datasets?
Aleksei91 commented 5 years ago

Can you show your images? Maybe guns are not visible after image downsampling to network size, how big are your guns?

anthonymg1994 commented 4 years ago
  1. Show Loss & mAP chart
  2. What mAP on Training and Test datasets?

Ok, this is my chart chart

I tried many times to train YOLO, but I always have a low percentage of mAP, I'm a newbie with this and I don't know how to improve the percentage

anthonymg1994 commented 4 years ago

Can you show your images? Maybe guns are not visible after image downsampling to network size, how big are your guns?

yes, of course these are some of my weapons data

the images are from 190x190 to 700x700 I think

480_16_armas (2296)

471_13_armas (2287)

470_0_1113_0_678_2_armas (681)

AlexeyAB commented 4 years ago
anthonymg1994 commented 4 years ago
  • Train at least 4000 iterations
  • Show obj.data file
  • Show 2 training images and 2 test images with bad detections

1.- Training with 4800 iterations returns the same mAP '5%'

2.- this is my obj.data file classes= 1 train = data/train.txt valid = data/test.txt names = data/obj.names backup = backup/

3.- I try to test the model in these images but it doesnt detect anything 3.1.- Training images 86_1_armas (2418)

87_3_armas (178)

3.2 Test images

208_5_armas (656)

551_16_armas (999)

AlexeyAB commented 4 years ago

What mAP do you get on Training dataset? Try to set valid=train.txt in obj.data file and run ./darknet detector map ...

Also try to train this model https://github.com/AlexeyAB/darknet/blob/master/cfg/yolov3-spp.cfg

You should train 90 000 iterations while mAP increases