Training YOLO V2 with multiple (more than one) classes
조회 수: 5 (최근 30일)
이전 댓글 표시
Hi all,
When I train YOLOV2 with single class (person) using trainYOLOv2ObjectDetector, I can get precision/recall of 0.92 but when I add another class (car) with same images and just few car labels, the accuracy is 0, meaning even the person cannot be detected in any of the images even my training images!
I even use AnchorBox estimation and treid many times.
All the matlab examples are tarined only on single objects but how about if we have more than one class to be trained? Does anyone have any success to help me please?
댓글 수: 4
Sanjeev Madhave
2020년 11월 18일
Hi Zahra Moayed,
I was also trying to train the yolo with multi class. I have a doubt. How did you mapped the training dataset table?
In my case, in some training image one class may not be there. In such cases how to fill the table? just leave it as empty? in that case matlab is throwing error. any help is much appreciated
답변 (3개)
Srivardhan Gadila
2019년 8월 14일
편집: Srivardhan Gadila
2019년 8월 14일
The procedure is same for both single and multi-class. The zero accuracy may imply that the dataset is biased, so try having nearly equal number of labels for cars and persons.
댓글 수: 3
Srivardhan Gadila
2019년 8월 19일
In general the first case should produce the good results i.e., having the following equally: Images/Frames having 1. Only vehicles 2. Only Pedestrains 3. Both Vehicles and Pedestrains.
Zahra Moayed
2019년 10월 7일
댓글 수: 5
Damjan Konjevod
2022년 4월 1일
Any updates? I have the same problem, can detect 1 class but in case of multiple classes 0 recall
Sunny Guha
2022년 4월 6일
Hi Zahra
Please refer to this R2022a example on training YOLO v2 for multiple classes:
In general, there could be multiple issues that hinder performance of networks on multiple class datasets. Here are few of the things you can try to resolve the issues:
- Ensure the classes are close to balanced. If you cannot obtain more labels resort to data augmentation. The example I linked above contains steps on how to perform augmentation.
- Change backbone/feature extraction layer. Object detectors have a hard time detecting smaller objects. Bigger (spatial resolution) feature extraction layers can detect smaller objects.
- Try a different detector like yolov4 which perform multiscale detection.
Hope this helps.
댓글 수: 7
Anushikha Singh
2022년 12월 13일
I have tried yolo v2, v3 and v4 but problem is still there
good accuracy for single class and no detection in case of multiple object
please help
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!