Skip to content

Datasets with "Background Images" #2670

Discussion options

You must be logged in to vote

@AlexanderJGomez yes that's correct, introducing background images will help reduce False Positives (FPs). You can introduce FPs into your dataset simply by putting them in your train: and val: directories (example from voc.yaml shown below). No labels *.txt files are required and no other action is required, YOLOv5 will detect and train with the additional background images next time you train.

yolov5/data/voc.yaml

Lines 12 to 15 in 2a28ef3

# train and val data as 1) directory: path/images/, 2) file: path/images.txt, or 3) list: [path1/images/, path2/images/]
train: ../VOC/images/train/ # 16551 images
val: ../VOC/images/val/ # 4952 images

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by glenn-jocher
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants