AlexeyAB / darknet

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

How to solve negative objects on the lens #4516

Open Hwijune opened 4 years ago

Hwijune commented 4 years ago

hi, @AlexeyAB

If a spider web or water(rain, snow) droplets are on the lens, a false alarm will occur.

download IMG_20130411_083303

Because of these problems, false alarms occur.

There is a limit to negative data. Is there any other way?

HagegeR commented 4 years ago

why not making blurry/occluded lens a class and then use logic on top to consider every detections there as suspicious? or add more labeled data in those conditions

AlexeyAB commented 4 years ago

Add more negative samples to the training dataset.

huebrt commented 4 years ago

Hi @AlexeyAB How do I add negative sample training? Can you give me some teaching links.. very thanks..

HagegeR commented 4 years ago

add some photos that are in those weather conditions and join them to an empty text (no object)

huebrt commented 4 years ago

Thank you @HagegeR
I am currently experimenting with eye grabbing in 4 categories Top left、Top right、Bottom left、Bottom right So is my negative sample also added to the eye category or added some irrelevant images? For example: cats and dogs, etc.

HagegeR commented 4 years ago

for any network trained on custom dataset for a specific task, I believe that using photos relevant to the task is better for your final product than adding random photos that will make your network more complex than it need to be. but if you believe you don't have enough data... it can (hopefully) help

huebrt commented 4 years ago

Thank you @HagegeR let me try!!

huebrt commented 4 years ago

Hello @HagegeR I have a question: I want to use yolov3_tiny to train a network to determine the eye direction data are people who use their own experiments I made about 3000 pieces of experimental data and classified them into four categories But the training results are not as expected, and it is easy to judge I have turned cfg: filp, angle off and jitter turned on iteration adjusted to 80200 anchor box has been recalculated But I calculated that the AP turned out to be 100% Could you please give me some suggestions .. Thank you

HagegeR commented 4 years ago

If you can show you'r training chart, maybe even a training photo/result, I could try to guide you better... did you use detector or classifier version?

maybe the resolution is not good enough, if the object is very small, you should try to use maybe 5 layers versions which should be better for small objects.

maybe try using face detection with relatively low rez and then classify the direction with highest possible rez (the face size probably).

huebrt commented 4 years ago

Thanks you @HagegeR This is my training data 1920*108 pixel. training About 2700 images. I divide my eyes into four categories.The model is shy so cover her face.. 3.The architecture I use is using yolov3-tiny 4.Experimental results validation All correct. Calculation AP have 100% 5.But..I run demo my test video Model will output wrong results,For example: the upper left category is judged as the lower right.. 1

HagegeR commented 4 years ago

share your cfg please, try to use letter_box if you do it in the cfg to have matching test and train data.

try to use greater size in the input image: once resized, the eyes are less than 30 by 10 pixels in the image the network gets, I'm not sure that yolo tiny have a layer that can recognize object that small, maybe you need to customize it in order to detect smaller objects.

try yolov3-tiny_3l or even yolov3_5l to help detect small objects better

huebrt commented 4 years ago

Hi @HagegeR This is my cfg yolov3_tiny.txt letter_box !! Where can I refer? I am less clear here!! OK!!Thanks for your suggestion i try
https://raw.githubusercontent.com/AlexeyAB/darknet/master/cfg/yolov3-tiny_3l.cfg

HagegeR commented 4 years ago

letter_box !! Where can I refer? I am less clear here!!

use -letter_box at the end of the detection command, look there https://github.com/AlexeyAB/darknet/wiki/CFG-Parameters-in-the-%5Bnet%5D-section

yes, try the other cfg

huebrt commented 4 years ago

OK Thank you @HagegeR Let me try it! Am I setting cfg right? Please help me see!! my_cfg.txt

I have another question about anchor! In yolov3 anchor box for pixel size,How he drew it in training and compared it with ground truth Is there a way to see this in the code ??