damo-cv / Ada-NETS

This is an official implementation for "Ada-NETS: Face Clustering via Adaptive Neighbour Discovery in the Structure Space" accepted at ICLR 2022.
MIT License
33 stars 3 forks source link

TypeError: in method 'GpuIndexIVFFlat_train', argument 3 of type 'float const *' #7

Closed Nigar21 closed 2 years ago

Nigar21 commented 2 years ago

I use custom .npy embeddings and labels of my face image dataset. The structure and namings are the same, but when I run >> sh script/faiss_search.sh I get this error : TypeError: in method 'GpuIndexIVFFlat_train', argument 3 of type 'float const *' . I guess I extracted embeddings differently from the provided by you. Anyway, any help appreciated. I want to cluster a custom dataset

Thomas-wyh commented 2 years ago

Hi, thank you for your interest in Ada-NETS !

You can try this. Modify Line72-73 in tool/faiss_search.py

    query_arr = np.load(queryfile).astype('float32')
    doc_arr = np.load(docfile).astype('float32')

You need to make sure that the type of feature matrix of your custom dataset is float32. Let me know if it makes sense.

Nigar21 commented 2 years ago

Thank you!