pylabel icon indicating copy to clipboard operation
pylabel copied to clipboard

Fix #143

Open R-N opened this issue 1 year ago • 2 comments

Fixes #143

In case cat_name isn't provided, cat_id will be converted to string and used as cat_name. If this gets merged, this behavior should probably be documented though.

Next, specifying "columns=["cat_name"]" when creating dataframe from value_counts returns empty dataframe because "cat_name" became the index in value_counts. Since it's an index, the merge will have to use index too.

I'm not sure if this is a changed behavior. I'm using pandas 2.1.3

R-N avatar Nov 27 '23 11:11 R-N

Thank you @R-N , how do you repro the issue that this fix fixes? Is it with importing a yolo file? Can you share a file that repros the issue.

alexheat avatar Nov 28 '23 00:11 alexheat

Thank you @R-N , how do you repro the issue that this fix fixes? Is it with importing a yolo file? Can you share a file that repros the issue.

Yes I made it a repo. https://github.com/R-N/ml_yolo_dataset

Run these in the repo:

from pylabel import importer
dataset = importer.ImportYoloV5("labels", path_to_images="../images")
dataset.splitter.StratifiedGroupShuffleSplit(train_pct=.8, val_pct=.0, test_pct=.2, batch_size=1)                                                                          
dataset.analyze.ShowClassSplits()

R-N avatar Nov 28 '23 15:11 R-N