Skip to content
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

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 this issue Aug 11, 2022 · 4 comments

Comments

@douscare
Copy link

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_celeb_prediction
_ = 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
Copy link
Owner

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

@samrat213
Copy link

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

@shobhit9618
Copy link
Owner

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

@rleaver152
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants