#11026·cvat

Intermittent Class Overwrite on COCO 1.0 Export when using Slicing/Split Tool

Author: Abhijeet-KCCreated Aug 12, 2026Updated Aug 19, 2026
Labelsbug

Actions before raising this issue

  • I searched the existing issues and did not find anything similar.
  • I read/searched the docs

Steps to Reproduce

  1. Draw a primary outer polygon (e.g., a circle).
  2. Use the Slicing / Split Tool to divide the polygon into two halves.
  3. Assign Class A to the upper half and Class B to the lower half in the UI.
  4. Save the annotations and export the dataset in COCO 1.0 format.
  5. Inspect instances_default.json and compare the category_id values for both split shapes.

Expected Behavior

The exported COCO 1.0 JSON should contain two separate annotation objects with distinct category_id values corresponding to Class A and Class B.

Possible Solution

Possible Solution / Technical Insights

  1. Frontend Canvas State Decoupling: When the Slicing/Split tool divides a polygon, the secondary slice appears to retain a state reference or object lineage to the parent polygon in the UI state store. Changing the label on the new slice in the sidebar may fail to update the underlying label_id state before a save event occurs.

  2. API Event Race Condition: When a user splits a shape and immediately updates the label, two API requests are fired: a POST to register the new split shapes, and a PATCH to update the new shape's category. If the PATCH request evaluates before the backend fully index-registers the new shape, the label update is silently ignored, leaving the shape with its parent's original category ID.

  3. Datumaro Lineage Fallback: If the UI state and API are correct, the bug may reside in Datumaro (CVAT's export engine). During COCO 1.0 JSON generation, Datumaro might be inspecting parent-child lineage metadata instead of strictly evaluating each polygon's active label_id.

Context

In high-volume segmentation tasks (such as dividing structural objects, circles, or complex boundaries into sub-categories), annotators rely heavily on the Slicing tool to save time over re-drawing outer boundaries.

Because the UI visually updates and displays the new classes properly, annotators and QA reviewers have no visual indication that the annotations are corrupted. The issue is only discovered downstream during dataset conversion, mask mapping, or model training. Having to delete and manually re-draw split polygons from scratch eliminates the efficiency gains of the Slicing tool and risks silent data degradation in exported datasets.

Steps to Reproduce

  1. Draw a single outer polygon shape (e.g., a circle).
  2. Select the Slicing / Split Tool and cut the polygon into two separate halves.
  3. Assign Class A to the upper half and Class B to the lower half using the UI sidebar or shortcut.
  4. Save the annotations (Ctrl + S) and export the dataset using the COCO 1.0 format (instances_default.json).
  5. Parse the exported JSON file and inspect the category_id attribute for both polygon entries.

Environment

markdown
* **CVAT Version:** [ cvat.ai Cloud ]
* **OS / Browser:** [ Windows 11 / Chrome]
* **Export Format:** COCO 1.0 (`instances_default.json`)