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
Multiple image extension for YOLOv5 dataset #26
Comments
Hello @dnth, it doesn't work for multiple file types right now because they way it works is:
I can think of a some solutions. Let me know what you think would make the most sense:
Also would it be possible for you to share your dataset so I could use it for testing whatever solution we can come up with. |
I am working with this dataset https://www.kaggle.com/nischallal/rice-disease-dataset |
Thank you. I checked the Yolo documentation and they support all of the image types "bmp, jpg, jpeg, png, tif, tiff, dng, webp, mpo" I think the best fix would be to let the img_ext param take a comma seperated list like "bmp, jpg, jpeg, png, tif, tiff, dng, webp, mpo" and then check for any of those files until it finds a match. I think I could work on the change and release a new version this weekend. Or you are welcome to try and make the change yourself and make a pull request. The change needs to be made in https://github.com/pylabel-project/pylabel/blob/dev/pylabel/importer.py around line 310
|
Add support to be able to import a Yolov5 dataset with images in multi image formats. For example jpg and png. This will resolve issue pylabel-project#26 (Multiple image extension for YOLOv5 dataset)
Hello @dnth I have released a new version [v0.1.32] with support for multiple file types. Please give it a try! |
|
Thanks @alexheat! The conversion works now. However, I found another issue: there are files with the same filename in different folders. Eg. |
Hi @dnth , yes I think there can be issue is the image names are not unique. That particular dataset looks like it has the same image in more than one split, which doesn't seem like a good thing to do in general. Can you share the code that you used to import the data set and create the image in the screenshot? Also I am curious what you are trying to do the with the dataset in general. Would you tell me more about your project? Thanks! Alex |
I would like to make an object detector model that can recognize disease on rice leaves. This is one dataset i found that comes with bbox annotations. I agree that the dataset might not be properly curated with the overlapping names. I should probably spend time to clean them up first i guess.. This is the repo to the codes I was using to generate the above screenshot |
My Yolov5 dataset has got multiple image extensions files such as jpg, jpeg, png, etc. What is the best way to handle these cases?
in
img_ext
we can only specify one extension format.The text was updated successfully, but these errors were encountered: