Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no labels, images labelled even though i got " Labeled dataset created - ready for distillation." #90

Closed
1 of 2 tasks
andysingal opened this issue Nov 17, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@andysingal
Copy link

Search before asking

  • I have searched the Autodistill issues and found no similar bug report.

Bug

no images, labels generated even after running the code: https://colab.research.google.com/drive/1DqvrUVmnhlhrmRC_OfWI3nQqQX1GlgkN?usp=sharing
Dataset: https://www.kaggle.com/datasets/dpamgautam/grocery-dataset

import supervision as sv

dataset = sv.DetectionDataset.from_yolo(
    images_directory_path=IMAGES_DIRECTORY_PATH,
    annotations_directory_path=ANNOTATIONS_DIRECTORY_PATH,
    data_yaml_path=DATA_YAML_PATH)

len(dataset)

Output

0

Environment

Kaggle notebook

!pip install -q \
autodistill \
autodistill-grounded-sam \
autodistill-yolov8 \
supervision==0.9.0 \
roboflow 

Minimal Reproducible Example

no images, labels generated even after running the code: https://colab.research.google.com/drive/1DqvrUVmnhlhrmRC_OfWI3nQqQX1GlgkN?usp=sharing

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@andysingal andysingal added the bug Something isn't working label Nov 17, 2023
@capjamesg
Copy link
Member

Hello there! Can I confirm your dataset is in the YOLOv5 PyTorch TXT format?

@andysingal
Copy link
Author

andysingal commented Nov 17, 2023

Hello there! Can I confirm your dataset is in the YOLOv5 PyTorch TXT format?

Here is the dataset : https://www.kaggle.com/datasets/dpamgautam/grocery-dataset

@capjamesg
Copy link
Member

That is a large dataset for me to download. Can you confirm the dataset type for me so I don't have to download it?

@andysingal
Copy link
Author

andysingal commented Nov 17, 2023

That is a large dataset for me to download. Can you confirm the dataset type for me so I don't have to download it?

it is a kaggle dataset: https://www.kaggle.com/datasets/dpamgautam/grocery-dataset

originated from : https://github.com/gulvarol/grocerydataset

<img width="315" alt="Screenshot 2023-11-17 at 10 15 09 AM"
Screenshot 2023-11-17 at 10 15 32 AM
">

Let me know if this helps.Looking forward to hearing from you

@andysingal andysingal mentioned this issue Nov 20, 2023
2 tasks
@capjamesg
Copy link
Member

Hello there! You should pass in a folder that only contains images to the .label() function. This function does not look in sub-folders. Make sure that the extension of images is equal to the extension="" value you pass into the .label() function.

For example:

base_model.label(input_folder="images", output_folder="dataset", extension=".jpg")

will label all .jpg folders in the images folder.

@andysingal
Copy link
Author

Hello there! You should pass in a folder that only contains images to the .label() function. This function does not look in sub-folders. Make sure that the extension of images is equal to the extension="" value you pass into the .label() function.

For example:

base_model.label(input_folder="images", output_folder="dataset", extension=".jpg")

will label all .jpg folders in the images folder.

Thanks for getting back to me. So it does not work work on multiple sub folder with images classified differently? . I already defined the ontology part before using grounding Dino to label the images.

I have shared the notebook for your reference, love to hear if there are ways to do it? . I have tried on single folder of images and it works fine but would love to try on folder with multiple folders by defining the ontology.

thanks again

@capjamesg
Copy link
Member

So it does not work work on multiple sub folder with images classified differently?

This is correct.

I have tried on single folder of images and it works fine but would love to try on folder with multiple folders by defining the ontology.

We don't have plans to support labeling data that is in multiple folders, although we encourage you to file a PR to autodistill if this is something that you would like to see in the library!

@andysingal
Copy link
Author

andysingal commented Nov 21, 2023 via email

@capjamesg
Copy link
Member

No worries! Thank you for writing that article. I always love seeing people use our software to make interesting projects!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants