You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the Supervision issues and found no similar bug report.
Bug
When exporting a YOLOv8 formatted dataset to COCO format (using the attached code), the JSON files associated with each split uses its own sequence for assigning annotation ID values.
This causes issues when trying to import the output dataset with other libraries, which expect a unique ID across all splits for each annotation.
Example from dataset with train, valid and test splits:
test
train
valid
Kindly consider using a common sequence when generating annotation IDs for a dataset across splits.
Search before asking
Bug
When exporting a YOLOv8 formatted dataset to COCO format (using the attached code), the JSON files associated with each split uses its own sequence for assigning annotation ID values.
This causes issues when trying to import the output dataset with other libraries, which expect a unique ID across all splits for each annotation.
Example from dataset with train, valid and test splits:
Kindly consider using a common sequence when generating annotation IDs for a dataset across splits.
Environment
Supervision 0.16.0
Minimal Reproducible Example
import supervision as sv
yolo = sv.DetectionDataset.from_yolo(
images_directory_path=f"{dataset_root}/images",
annotations_directory_path=f"{dataset_root}/labels",
data_yaml_path=f"{dataset_root}/data.yaml",
force_masks=True
)
yolo.as_coco(
images_directory_path=f"{target}/images",
annotations_path=f"{target}/annotations.json"
)
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: