Skip to content

Object Detection Mode

In object detection mode, the model finds objects in an image and places bounding boxes around them. It can identify and classify multiple objects in the same image.

Dataset Creation

To start creating a dataset for Object Detection, follow these steps:

  1. Click the View Collections button on the Home page.
  2. Click the Add a new Detection dataset button to create a new dataset.
  3. Enter the dataset name and description, and register its classes.
  4. Upload images to the dataset by clicking on the Upload Images region.
  5. Press Submit and Open Button to proceed with dataset annotation.

The dataset creation page will look like the following:

CVAT

Annotation Process

Once the dataset is created, you can start annotating the images. The annotation interface provides various tools to facilitate the annotation process:

  • Draw bounding box Tool: Allows users to draw bounding boxes around objects of interest to assign them to a specific class.

CVAT

Important Note: The Draw bounding box tool is the main annotation tool for object detection.

Dataset Registration

After completing the annotation process, you have to export the dataset using the Ultralytics YOLO Detection 1.0 export format from CVAT.

The generated bounding boxes can be found under the labels/ directory of the exported dataset.

Finally, the dataset should follow the structure below:

DatasetName/
├── train/
│   ├── images/
│   │   ├── image_001.jpg
│   │   ├── image_002.jpg
│   │   └── ...
│   └── labels/
│       ├── image_001.txt
│       ├── image_002.txt
│       └── ...
├── valid/
│   ├── images/
│   │   ├── image_001.png
│   │   ├── image_002.png
│   │   └── ...
│   └── labels/
│       ├── image_101.txt
│       ├── image_102.txt
│       └── ...
└── data.yaml

data.yaml should contain:

train: ../train/images
val: ../valid/images

nc: N #Define the number of classes
names: ['Label1', 'Label2', ...] # Class Names

Once the dataset structure is finalized:

  1. Compress the DatasetName/ directory into a .zip archive.
  2. Upload the generated .zip file to AmalthAI using the Add a new detection dataset button.

Training Initiation

After uploading the dataset, you can train an object detection model. Follow these steps:

  1. Navigate to the Train an ML model page.
  2. Select the Object Detection mode.

There are two main fields that need to be filled:

  • Select Model: Choose the model architecture you want to use for training.
  • Select Collection: Choose the dataset to use for training.

To learn about the available architectures, expand Available models. Use a model's information icon to read its description.

Inference Process

Once the model is trained, you can use it for inference on new images. To perform inference, follow these steps:

  1. Navigate to the Inference page.
  2. Select the trained Object Detection model from the list.
  3. Upload the image you want to perform inference on.
  4. Click Start Inference to see the detection results.

When inference finishes, the same page shows the detected objects with their bounding boxes.

CVAT

Evaluation Metric

mAP 50–95 is an object detection metric that measures both how well a model finds objects and how accurately it localizes them. It is computed by first calculating Average Precision for each class, where a prediction is considered correct if its overlap with the ground truth exceeds a given IoU threshold. Instead of using a single threshold, AP is computed at multiple IoU thresholds ranging from 0.50 to 0.95, and then averaged across all classes and all thresholds. This makes the metric stricter because it evaluates performance under increasingly precise localization requirements.