roboflow / supervision

We write your reusable computer vision tools. 💜
https://supervision.roboflow.com
MIT License
23.69k stars 1.77k forks source link

[DetectionDataset] - migrate field from `List[str]` to `Dict[int, str]` #291

Open SkalskiP opened 1 year ago

SkalskiP commented 1 year ago

Description

Migrate datasets sv.ClassificationDataset.classes and sv.DetectionDataset.classes field from List[str] to Dict[int, str]. Necessary changes should be made in all .from_* and .as_* methods in both sv.ClassificationDataset and sv.DetectionDataset.

Use case

Using list to store classes forces us to use consecutive and starting from 0 integers. In fact, formats such as COCO or PASCAL VOC and, more recently, YOLO use int: string relationships to store classes. Our dependence on classes in the form of list forces us to unnecessarily map class_id while loading the dataset.

Testing

Make sure to create Google Colab where you install your version of Supervision and showcase a demo of the changes you made.

SkalskiP commented 1 year ago

@capjamesg, take a look at this issue. I'm not sure if this API change will somehow affect autodistill.

hardikdava commented 1 year ago

Related issues to keep in mind:

150

285

hardikdava commented 1 year ago

@SkalskiP , can you handle this one? Some other things came up which needs my attention.

onuralpszr commented 1 year ago

@SkalskiP , can you handle this one? Some other things came up which needs my attention.

If you don't mind I like to tackle this ?

SkalskiP commented 1 year ago

@onuralpszr, go for it!

SkalskiP commented 1 year ago

@onuralpszr still planing to pick it up?

onuralpszr commented 1 year ago

I was already doing it. Will push pr soon

SkalskiP commented 1 year ago

Just double checking as I want to include it in next release and it's going to happen next week: https://github.com/roboflow/supervision/discussions/310

Rajarshi-Misra commented 1 year ago

@SkalskiP I'm interested in working on this. Will it be possible for you to assign it to me?

onuralpszr commented 1 year ago

@SkalskiP I'm interested in working on this. Will it be possible for you to assign it to me?

For other changes I had to pause a bit but I already did work to be pushed. Sorry about that.

SkalskiP commented 1 year ago

@onuralpszr, do you still want to be assigned to it?

onuralpszr commented 1 year ago

@onuralpszr, do you still want to be assigned to it?

If you don't mind please

SkalskiP commented 1 year ago

No worries ;)

dfreilich commented 8 months ago

@SkalskiP can I pick this up?

Bhavay-2001 commented 3 months ago

Hi @SkalskiP, is this issue still open?