🚀 Added
- Ability to load and save
sv.DetectionDataset
in COCO format usingas_coco
andfrom_coco
methods. (#150)
>>> import supervision as sv
>>> ds = sv.DetectionDataset.from_coco(
... images_directory_path='...',
... annotations_path='...'
... )
>>> ds.as_coco(
... images_directory_path='...',
... annotations_path='...'
... )
- Ability to marge multiple
sv.DetectionDataset
together usingmerge
method. (#158)
>>> import supervision as sv
>>> ds_1 = sv.DetectionDataset(...)
>>> len(ds_1)
100
>>> ds_1.classes
['dog', 'person']
>>> ds_2 = sv.DetectionDataset(...)
>>> len(ds_2)
200
>>> ds_2.classes
['cat']
>>> ds_merged = sv.DetectionDataset.merge([ds_1, ds_2])
>>> len(ds_merged)
300
>>> ds_merged.classes
['cat', 'dog', 'person']
- Additional
start
andend
arguments tosv.get_video_frames_generator
allowing to generate frames only for a selected part of the video. (#162)
🛠️ Fixed
- Incorrect loading of YOLO dataset class names from
data.yaml
. (#157)