thtrieu / darkflow

Translate darknet to tensorflow. Load trained weights, retrain/fine-tune using tensorflow, export constant graph def to mobile devices
GNU General Public License v3.0
6.13k stars 2.08k forks source link

About class imbalance #671

Open omg777 opened 6 years ago

omg777 commented 6 years ago

I am trying to fine-tune the model with yolo.weight.

If the data is imbalanced between the N classes like

number of class 1 data : 200,000 instances number of class 2 data : 10,000 intances ...etc

I wonder if it occurs bad influence.

sandeeprepakula commented 6 years ago

Try down sampling class1 to 10,000 to balance and train the model again.

Otherwise, if it makes sense to do some image augmentation to create more samples of class2, it is recommended as well.

Easily doable and suggested is adding gaussian noise to class2 images and create new samples. That way you don't have tagging problem for augmented images.

Jinglei5 commented 5 years ago

is there any hard mining methods recommended? thanks!