Closed dnth closed 1 year ago
Hi @dnth I think you need to add label_col='label' to signal the report you want to include the label as well, please try it out and let us know if this works
I ran fd.vis.similarity_gallery(label_col='label')
and see another error
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/fastdup/__init__.py", line 2300, in create_similarity_gallery
ret = do_create_similarity_gallery(similarity_file, save_path, num_images, lazy_load, get_label_func,
File "/usr/local/lib/python3.10/dist-packages/fastdup/galleries.py", line 1777, in do_create_similarity_gallery
df = find_label(get_label_func, df, 'from', 'label', kwargs)
File "/usr/local/lib/python3.10/dist-packages/fastdup/galleries.py", line 104, in find_label
assert False, f"Found str label {get_label_func} but it is neither a file nor a column name in the dataframe {df.columns}"
AssertionError: Found str label label but it is neither a file nor a column name in the dataframe Index(['distance', 'from', 'to'], dtype='object')
-1
I notice this happens not only to similarity gallery but all other galleries as well
@dbickson I'm on v0.928 and I'm still encountering this
Fixed in 0.930
Should be fixed on 1.3 on mac and 1.4 on ubuntu
What happened?
I ran the sample notebook to analyze an image classification dataset and found that the labels are not loaded into the similarity gallery view.
Here's a screenshot of the error![image](https://user-images.githubusercontent.com/6821286/237036198-a08468ef-6de2-4ab8-8acb-04675538f3ab.png)
However,![image](https://user-images.githubusercontent.com/6821286/237036459-1b83eff0-a4f2-4114-b861-3172e1ad2df8.png)
fd. similarity ()
returns the labels.What did you expect to see?
Labels are shown in the gallery view.
What version of fastdup were you runnning on?
0.926
What version of Python were you running on?
Python 3.10
Operating System
Google Colab
Reproduction steps
Run https://colab.research.google.com/github/visual-layer/fastdup/blob/main/examples/analysing-image-classification-dataset.ipynb
Relevant log output
No response
Attach a screenshot [Optional]
No response
Contact Details [Optional]
No response