site/content/en/docs/annotation/auto-annotation/ai-tools.md
Label and annotate your data in semi-automatic and automatic mode with the help of AI and OpenCV tools.
While {{< ilink "/docs/annotation/manual-annotation/shapes/annotation-with-polygons/track-mode-with-polygons" "interpolation" >}} is good for annotation of the videos made by the security cameras, AI and OpenCV tools are good for both: videos where the camera is stable and videos, where it moves together with the object, or movements of the object are chaotic.
See:
Interactors are a part of AI and OpenCV tools.
Use interactors to label objects in images by creating a polygon semi-automatically.
When creating a polygon, you can use positive points or negative points (for some models):
To annotate with interactors, do the following:
Click the Question mark to see information about each model:
4. (Optional) If the model returns masks, and you need to convert masks to polygons, use the Convert masks to polygons toggle. 5. Click Interact. 6. Use the left click to add positive points and the right click to add negative points.
Number of points you can add depends on the model. 7. On the top menu, click Done (or Shift+N, N).
For image/video jobs, you can restrict an interactor to a selected image area. Use this when you want the model to segment only a specific part of the frame.
To set the region:
x, y, width, and height.When a region of interest is set, CVAT sends only that image crop to the model, restricts interactor prompts to the selected area, and adds the resulting shape back in the correct full-frame position.
{{% alert title="Note" color="primary" %}} More points improve outline accuracy, but make shape editing harder. Fewer points make shape editing easier, but reduce outline accuracy. {{% /alert %}}
Each model has a minimum required number of points for annotation. Once the required number of points is reached, the request is automatically sent to the server. The server processes the request and adds a polygon to the frame.
For a more accurate outline, postpone request to finish adding extra points first:
On the top panel, the Block button will turn blue. 2. Add points to the image. 3. Release the Ctrl key, when ready.
In case you used Mask to polygon when the object is finished, you can edit it like a polygon.
You can change the number of points in the polygon with the slider:
To delete a point, do the following:
To use Intelligent scissors, do the following:
Go to the Drawing tab, select the label, and click on the Intelligent scissors button.
Add the first point on the boundary of the allocated object. You will see a line repeating the outline of the object.
Add the second point, so that the previous point is within the restrictive threshold.
After that a line repeating the object boundary will be automatically created between the points. 5. To finish placing points, on the top menu click Done (or N on the keyboard).
As a result, a polygon will be created.
You can change the number of points in the polygon with the slider:
To increase or lower the action threshold, hold Ctrl and scroll the mouse wheel.
During the drawing process, you can remove the last point by clicking on it with the left mouse button.
For more information on intelligent scissors, see the Intelligent Scissors Specification.
On how to adjust the polygon, see {{< ilink "/docs/annotation/annotation-editor/objects-sidebar" "Objects sidebar" >}}.
For more information about polygons in general, see {{< ilink "/docs/annotation/manual-annotation/shapes/annotation-with-polygons" "Annotation with polygons" >}}.
Detectors are a part of AI tools.
Use detectors to automatically identify and locate objects in images or videos.
Each model is trained on a dataset and supports only the dataset's labels.
For example:
car.vehicle.To annotate, you need to match these two labels to give
DL model a hint, that in this case car = vehicle.
If you have a label that is not on the list of DL labels, you will not be able to match them.
You can check each deployed model's supported labels at the {{< ilink "/docs/workspace/models" "Models page" >}}.
To annotate with detectors, do the following:
Click Magic wand , and go to the Detectors tab.
From the Model drop-down, select model (see {{< ilink "/docs/annotation/auto-annotation/ai-models" >}}).
From the left drop-down select the DL model label, from the right drop-down select the matching label of your task.
(Optional) If the model returns masks, and you need to convert masks to polygons, use the Convert masks to polygons toggle.
(Optional) You can specify a Threshold for the model. If not provided, the default value from the model settings will be used.
Click Annotate.
This action will automatically annotate one frame. For automatic annotation of multiple frames, see {{< ilink "/docs/annotation/auto-annotation/automatic-annotation" "Automatic annotation" >}}.
For image/video jobs, you can restrict a detector to a selected image area. Use this when only part of the frame should be analyzed.
To set the region:
x, y, width, and height.CVAT sends only the selected image crop to the detector and maps the returned annotations back to the correct full-frame coordinates.
Trackers are part of AI and OpenCV tools.
Use trackers to identify and label objects in a video or image sequence that are moving or changing over time.
To annotate with trackers, do the following:
All annotated objects will be automatically tracked.
To enable/disable tracking, use Tracker switcher on the sidebar.
Trackable objects have an indication on canvas with a model name.
You can follow the tracking by the messages appearing at the top.
To annotate with trackers, do the following:
Create basic rectangle shapes or tracks for tracker initialization
On the menu toolbar, click OpenCV and wait for the library to load.
Currently, TrackerMIL is the only tracker available. For more information on it, see Object Tracking using OpenCV.
Annotation actions window will pop-up. Setup Target frame
and Convert rectangle shapes to tracks parameters and click Run
{{% alert title="Note" color="primary" %}} Tracking will be applied to all filtered rectangle annotations. {{% /alert %}}
All annotated objects will be automatically tracked up until target frame parameter.
Histogram equalization improves the contrast by stretching the intensity range.
It increases the global contrast of images when its usable data is represented by close contrast values.
It is useful in images with backgrounds and foregrounds that are bright or dark.
To improve the contrast of the image, do the following:
Histogram equalization will improve contrast on current and following frames.
Example of the result:
To disable Histogram equalization, click on the button again.