# If an image contains two distinct objects, should I create a copy of this image with distinct labels for each copy?

Suppose we want to detect whether an object is one of the following classes: $$\text{Object}_1, \text{Object}_2, \text{Object}_3$$ and $$\text{Person}$$. Should the annotated images only contain bounding boxes for either a person or an object? In other words, suppose an image has both $$\text{Object}_1$$ and $$\text{Person}$$. Should you create a copy of this image where the first version only has a bounding box on the object and the second copy only has a bounding box on the person?

## 1 Answer

You should use both classes together. Let's say you use the method you proposed. Then they will be contradicting each other as one teaches the network to recognize people, not objects and the other teaches the network to recognizes objects not person. There is no need for seperation of the two classes, unless you are making two seperate classifier. Hope I can help you.

• If we already have a very good model for detecting the objects, couldn't adding bounding boxes to the people within the same images potentially lower the performance for the initial object detection model? Maybe that could be a reason to separate the classes? – PrimeNumber Nov 15 '19 at 13:47
• It should not affect the accuracy for a lot. If performance don't really matter you can use two models so performance won't change for the object detection model. However it will be two times as slow as there is two models to run through. If this is a real time task, you should add another class instead. – Clement Hui Nov 15 '19 at 13:55
• Would adding annotations of people from a totally different data set (e.g. a public data set) to the existing data set help in person detection? Or is it ideal to have the people come from the same images in which there are also objects? – PrimeNumber Nov 15 '19 at 13:58
• If you use two seperate models, it shouldn't matter too much. The model may confuse some object as person though if no other object is in the data. If the original data have an enough sample size maybe you should use that as your task is still to achieve a good testing accuracy on the private dataset. For the same model of course use the original data. Hope I can help you @PrimeNumber – Clement Hui Nov 15 '19 at 14:06
• If for multiple images, the orientation of the object changes, but the person remains relatively still, wouldn't this lead to overfitting? – PrimeNumber Nov 15 '19 at 15:55