-
Notifications
You must be signed in to change notification settings - Fork 16
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
Index Error: index out of bounds error for visualize concepts #10
Comments
Most likely, you are using a |
Thank you. I shall check this and get back to you. |
Hi. I am now getting this error on a dataset of around 100 jpg images. ValueError Traceback (most recent call last) 5 frames /usr/local/lib/python3.7/dist-packages/concept/_model.py in _extract_exemplar_subset(self, exemplar_embeddings, representative_images) /usr/local/lib/python3.7/dist-packages/concept/_model.py in (.0) /usr/local/lib/python3.7/dist-packages/concept/_mmr.py in mmr(cluster_embedding, image_embeddings, indices, top_n, diversity) <array_function internals> in argmax(*args, **kwargs) /usr/local/lib/python3.7/dist-packages/numpy/core/fromnumeric.py in argmax(a, axis, out) /usr/local/lib/python3.7/dist-packages/numpy/core/fromnumeric.py in _wrapfunc(obj, method, *args, **kwds) ValueError: attempt to get argmax of an empty sequence Any idea how I can fix this? It seems like the cluster labels are not getting generated or is an empty list. Thank you. |
I am not entirely sure, but I believe this is a result of having a small dataset. When you want to diversify the concepts, I think you will need to have |
I initialized it using the sample code really. I think the number of images were low (around 100). Do you think that is the issue? I tried reducing the min_concept_size to 5 but it doesn't seem to be working. I think it is because the top_n attribute in selected_exemplars is running into some error. From the code I don't think I can influence that particular attribute via the API. |
It indeed might be that the number of images is relatively low and I did not account for that in all places. Seeing as we want to extract representative pictures there need be a minimum of 8-10 images in each cluster. My guess then would be that |
Okay got it. Thank you. |
I ran the sample code for a custom data set and got the following error when I tried to visualize the concepts. Any help here would be appreciated.
The text was updated successfully, but these errors were encountered: