shobhit9618 / celeb_recognition

Model to recognize celebrities using a face matching algorithm.
MIT License
5 stars 1 forks source link

OSError: Index size is not a multiple of vector size. Ensure you are opening using the same metric you used to create the index.: No error (0) #1

Open douscare opened 2 years ago

douscare commented 2 years ago

Index size is not a multiple of vector size. Ensure you are opening using the same metric you used to create the index.: No error (0) Traceback (most recent call last): File "C:\CelebDetector\test.py", line 4, in celeb_detector.celeb_recognition(img_path) File "C:\CelebDetector\venv\lib\site-packages\celeb_detector\celeb_recognition.py", line 37, in celeb_recognition pred, img_out = get_celeb_prediction(img, ann_filepath, celeb_mapping_path) File "C:\CelebDetector\venv\lib\site-packages\celeb_detector\celeb_utils.py", line 85, in get_celebprediction = ann_index.load(ann_filepath) OSError: Index size is not a multiple of vector size. Ensure you are opening using the same metric you used to create the index.: No error (0)

shobhit9618 commented 2 years ago

Hi, Sorry for the late reply. What ann_file are you using?

samrat213 commented 1 year ago

i am directly installing celeb-detector using pip and getting same error

shobhit9618 commented 1 year ago

You are unable to install celeb-detector using pip? Which device are you trying it on?

rleaver152 commented 1 year ago

I have the same issue, I trained successfully and created an ann_file, but celeb_recognition.py fails to read it. The offending line is as reported

File "C:\CelebDetector\venv\lib\site-packages\celeb_detector\celeb_utils.py", line 85, in get_celeb_prediction
_ = ann_index.load(ann_filepath)

Running under python 3.7 All requirements successfully installed. Check my MTCNN installation separately and that's working fine. Appreciate any insight.