Yolov5: How to add negative training data to prevent overfitting?

Created on 21 Oct 2020  路  6Comments  路  Source: ultralytics/yolov5

鉂擰uestion

Hi, I want to know how to add negative training data (which contains no objects of interest) to train yolo-v5, how to arange the label /image file in such setting.
Thanks.

Additional context

For example, I am training a model to detect bike, but lots of false positive(like motobike, wheels etc) is detected, So I collect many negative images, so how to add these to training as negative?

question

Most helpful comment

@Edwardmark but of course, naturally you should verify that none of the unlabelled images you add contain items from your class list.

All 6 comments

You can use focal loss built in this repo

@Edwardmark you just add them to your dataset.

@glenn-jocher so I do not add label to label folder, but just add the negative image to image folders? Is that true?

@Edwardmark sure, you just throw any images you want into your /images folder, they don't need labels.

@Edwardmark but of course, naturally you should verify that none of the unlabelled images you add contain items from your class list.

@glenn-jocher Thanks, I get it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

linhaoqi027 picture linhaoqi027  路  4Comments

we1pingyu picture we1pingyu  路  3Comments

KangHoyong picture KangHoyong  路  3Comments

DucTaiVu picture DucTaiVu  路  3Comments

abhiksark picture abhiksark  路  3Comments