-
Notifications
You must be signed in to change notification settings - Fork 82
[Feature Request]: Support for YOLO #332
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
Comments
Hi @mhornsby this error happens since the column names are different than expected.
Please let us know which example code are you using so we could fix it? |
@mhornsby you could refer to our example notebook here too - https://nbviewer.org/github/visual-layer/fastdup/blob/main/examples/analyzing-object-detection-dataset.ipynb Also, we currently only support COCO-style bounding boxes. Eg The dataframe should consist of the following columns:
|
Here is a notebook explaining the annotations |
Hi @dbickson the example code is in issue #85 I've been working on it and so far have this code with is no longer erroring and is loading ok. But I am not seeing boxes on images e.g. when I list duplicates so I suspect I have something wrong import os These should come from the yaml fileimage_dir = '/content/sample/dataset/train/images' def parse_object(obj_str, img_w, img_h):
img_file_list = [f for f in os.listdir(image_dir) if f.endswith('.jpg')] for img_fn in img_file_list:
columns=['filename', 'col_x', 'row_y', 'width', 'height', 'label', ] annotation_df = pd.DataFrame(annotation_list, columns=columns) print( annotation_df ) fd = fastdup.create("/content/work_dir", input_dir=image_dir ) fd.run(annotations=annotation_df , overwrite=True) |
Hi @mhornsby, I'm not seeing anything out of the ordinary with how you're running fastdup with annotations, but could you share a print of your annotations dataframe just so I could be sure everything is as it's supposed to? Could you also share how you're viewing the duplicates? Thanks |
@mhornsby I made a tutorial notebook on Kaggle that runs on the traffic detection dataset in YOLO format. Since the dataset is on Kaggle, you can also fork the notebook and run it end-to-end if you have a Kaggle account. https://www.kaggle.com/code/dnth90/fastdup-traffic-det Feel free to adapt the notebook to your dataset. The gallery should look like the following Let me know if this helps. |
Many thanks @dnth I successfully used your kaggle notebook on my databset. The bounding boxes in my colab would have been because I was not usng draw_bbox=True !! . My error wasn't aware of that one. |
Happy to know it helped. Feel free to re-open if there are other issues related to YOLO annotations. |
Feature Name
Support for YOLO mutiple boxes
Feature Description
Hi
Following on from issue 85 #85
I found the example code errors with "df_annot must contain unique filenames, found repeating filenames" when there are multiple boxes for the same image file for example:
2 Cocaktoo14563.jpg 1200 800 3 727 337 190 425
3 Cocaktoo14563.jpg 1200 800 3 238 40 206 441
Is there a good way to handle this ?
Thanks
Contact Information [Optional]
No response
The text was updated successfully, but these errors were encountered: