Probably beginner questions about annotation

Hi,

I don´t know if this is a question for this forum but I’ll give it a try.

I´m not sure if the question leads to the answer of the problem I have so please feel free to make your own interpretation of the combined information, I’m still new to the techniques.

I have a number of questions regarding annotation;

  1. lets say I would like to make a model that detects and identifies hockey pucks and different kinds of balls.

So I have one class named “Hockey Puck”. I also have a class named “balls”, but in this class I have a number of sub-classes (basket ball, soccer ball, volley ball etc), is there a way to make this sort of hierarchy?

  1. Lets say I have pictures of people holding a rope between them. I would like to make a class “rope”, one class “person” and one class “hand holding rope” (The actual spot where hand meets rope).
    When annotating this the complete annotation for “hand holding rope” would be in the “person” class, would this then mean that in the future this class only “works” when “submerged” in a “person”-class? For example, if i have a picture where one of the persons is wearing a horse-mask over his head so that the “person” class would not be detected, would the “hand holding rope” still be detected?

  2. Lets say I have 100 pictures with different objects that i would like to annotate but in all of them there is also a sleeping cat. Would i need to annotate the sleeping cat in all 100? If i annotate sleeping cat in 50 of them, would this be cancelled out from the 50 pictures where the cat is not annotated?

Is labelimg still a recommended software for annotations or is there something new that I should look into? (I would like to keep the pictures offline)

Best regard,

Martin

@Martin_L Welcome to Tensorflow forum!

1. Hierarchical Classes:

Yes, you can definitely create a hierarchical class structure in object detection models. TensorFlow Object Detection API allows you to define a label map with parent-child relationships between classes. In your case, “balls” would be the parent class and “basketball,” “soccer ball,” etc., would be the child classes. This helps the model learn relationships between similar objects and potentially improve its accuracy.

2. Submerged Classes:

The behavior of “hand holding rope” when submerged in “person” depends on your training data and model architecture. If you primarily annotate “hand holding rope” within “person” instances, the model might struggle to detect it in isolation, especially with the horse-mask scenario. To improve its generalizability, consider annotating “hand holding rope” in some images independent of “person” as well.

3. Sleeping Cat Annotations:

You don’t necessarily need to annotate the sleeping cat in all 100 pictures. However, omitting it from some images can have different effects:

  • Background Removal: If you want the model to identify and potentially remove the cat as background noise, annotating it in some images will help it learn its features.
  • Ignoring Unimportant Objects: If the cat is irrelevant to your main object detection task (hockey pucks and balls), you can skip annotating it altogether. The model will learn to ignore it as background clutter during training.

50% Annotation:

Annotating the sleeping cat in only 50% of the images might not be ideal. While it provides some information, it might not be sufficient for the model to accurately identify and distinguish the cat in unseen images. Consider increasing the annotation coverage for important objects like the cat if it might interfere with your main detection tasks.

Additional Tips:

  • Use consistent naming conventions for your classes and subclasses to avoid confusion.
  • Consider using data augmentation techniques to diversify your training data and improvegeneralizability.
  • Monitor the model’s performance on different classes and adjust your training strategy or annotations if needed.

Remember, hierarchical object detection can be a powerful approach, but it requires careful planning and annotation strategies to achieve the desired results. Don’t hesitate to experiment and adjust your approach based on your specific data and objectives.

Let us know if this helps!