Skip to main content

Best practices

Following these annotation guidelines will help you create accurate, consistent annotations that lead to better model performance.

Selecting the appropriate label type

Choose the right annotation shape based on your object's geometry and use case.

Match the shape to the object

Each defect or object should be annotated using the most appropriate geometric representation:

Example:

Oocysts are annotated with polygons rather than rectangles or circles because their geometry is irregular and cannot be accurately represented by simple bounding shapes.
General rule
  • Regular shapes (circles, squares) → Use bounding boxes
  • Irregular shapes → Use polygons
  • Complex contours → Use detailed polygonal annotation

Localization: Polygons vs. bounding boxes

Choose your localization method based on whether shape information matters.

Decision framework

Use bounding boxes when:

  • ✅ The precise contour is not relevant
  • ✅ Approximate location is sufficient
  • ✅ Objects are roughly rectangular
  • ✅ Speed of annotation matters

Use polygons when:

  • ✅ Object shape is important
  • ✅ Contour information must be preserved
  • ✅ Directionality or orientation matters
  • ✅ Irregular shapes need accurate representation
Traktech case study

In Traktech's bottle orientation detection, polygonal labeling is required to determine directionality. A simple bounding box cannot capture whether a bottle is upright or tilted, making polygon annotation essential for this use case.

Defining which elements should be labeled

Establish clear labeling criteria before starting your annotation work and communicate them to all team members.

Create a labeling policy

A clear labeling policy must be established to determine which objects, structures, or defects are relevant to the task and therefore require annotation.

Key considerations:

  • What objects are critical to your detection task?
  • What can be safely ignored?
  • What are the edge cases?
  • How should ambiguous cases be handled?
Consistency is key

All annotators must follow the same policy to ensure dataset quality and model reliability.

Separating categories into distinct labels

Organize your labels strategically from the beginning.

Benefits of label separation

When defects are categorized into separate labels from the outset, it allows more flexibility during model training.

Advantages:

  1. Selective training - Include or exclude categories as needed
  2. Easy experimentation - Test different label combinations
  3. Simpler updates - Add new categories without relabeling
  4. Better analytics - Track performance per category

Example workflow:

❌ Bad: Single label "defect" for all issues
✅ Good: Separate labels "scratch", "dent", "discoloration"

This way, specific categories can later be excluded by simply omitting their labels when configuring the dataset.

Quick guidelines summary

  • Choose annotation shapes that match object geometry
  • Document a clear labeling policy before starting
  • Prefer segmentation over classification when possible
  • Use bounding boxes for simple localization, polygons for shape-critical tasks
  • Separate different defect types into distinct labels
  • Ensure all annotators follow the same guidelines
  • Review edge cases and document decisions