π Added
- Support for dataset inheritance. The current
Dataset
got renamed to DetectionDataset
. Now DetectionDataset
inherits from BaseDataset
. This change was made to enforce the future consistency of APIs of different types of computer vision datasets. (#100)
- Ability to save datasets in YOLO format using
DetectionDataset.as_yolo
. (#100)
>>> import supervision as sv
>>> ds = sv.DetectionDataset(...)
>>> ds.as_yolo(
... images_directory_path='...',
... annotations_directory_path='...',
... data_yaml_path='...'
... )
>>> import supervision as sv
>>> ds = sv.DetectionDataset(...)
>>> train_ds, test_ds = ds.split(split_ratio=0.7, random_state=42, shuffle=True)
>>> len(train_ds), len(test_ds)
(700, 300)
π± Changed
- Default value of
approximation_percentage
parameter from 0.75
to 0.0
in DetectionDataset.as_yolo
and DetectionDataset.as_pascal_voc
. (#100)
π Contributors