'How to train images that does not have obejcts I am trying to detect?

I am training a deep learning model using the yolov5 model. I have only 2 classes in my annotation files which are 1 for images that contain the object that I am trying to detect and 0 for images that do not have objects. How should I input my labels so that my model only predicts bounding boxes for images that have the objects I am trying to detect. For Images that do not have any objects that I am trying to detect, my model should not predict any bounding boxes. I have tried to give the labels in the following format in my .yaml file.

enter image description here .



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source