Training YOLO V2 with multiple (more than one) classes

19 vues (au cours des 30 derniers jours)
Zahra Moayed
Zahra Moayed le 5 Août 2019
Commenté : Anushikha Singh le 13 Déc 2022
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 commentaires
jingxue chen
jingxue chen le 15 Juil 2020
I meet the same problem now!Have you find some solutions?
Sanjeev Madhave
Sanjeev Madhave le 18 Nov 2020
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

Connectez-vous pour commenter.

Réponses (3)

Srivardhan Gadila
Srivardhan Gadila le 14 Août 2019
Modifié(e) : Srivardhan Gadila le 14 Août 2019
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 commentaires
Srivardhan Gadila
Srivardhan Gadila le 19 Août 2019
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
Zahra Moayed le 26 Août 2019
Hi Srivardhan,
To update, I built another labelling session to contain both People and Car. Number of objects are 137 and 141 for people and car, respectively so the dataset is totally fine.
Still after multiple trial, I got 0 accuracy, nothing is detected at all.
One question: do you train any network with YOLOV2 with multiple classes before? I want to narrow down the problem to see if the issue is from my side or the YOLO V2 release has got issue.
Thanks a lot.

Connectez-vous pour commenter.


Zahra Moayed
Zahra Moayed le 7 Oct 2019
Hi,
Is there any updates in the new version of Matlab regarding this issue? Or does anyone have any experience in training multiple classes?
  5 commentaires
Damjan Konjevod
Damjan Konjevod le 1 Avr 2022
Any updates? I have the same problem, can detect 1 class but in case of multiple classes 0 recall
Anushikha Singh
Anushikha Singh le 13 Déc 2022
any updates?
m still facing same issue

Connectez-vous pour commenter.


Sunny Guha
Sunny Guha le 6 Avr 2022
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:
  1. 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.
  2. Change backbone/feature extraction layer. Object detectors have a hard time detecting smaller objects. Bigger (spatial resolution) feature extraction layers can detect smaller objects.
  3. Try a different detector like yolov4 which perform multiscale detection.
Hope this helps.
  7 commentaires
michela Raimondi
michela Raimondi le 30 Sep 2022
ho lo stesso problema di damjan
Anushikha Singh
Anushikha Singh le 13 Déc 2022
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

Connectez-vous pour commenter.

Produits


Version

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by