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

Error while indexing #11

Open
xe4me opened this issue Aug 10, 2019 · 1 comment
Open

Error while indexing #11

xe4me opened this issue Aug 10, 2019 · 1 comment

Comments

@xe4me
Copy link

xe4me commented Aug 10, 2019

Hi
Thanks for your amazing lib in advance.
Been trying to run it and I followed all your steps carefully, but it keeps throwing errors on indexing.
Haven't changed anything, I'm on Mac Mohave but that shouldn't matter anyway.
I even tried it on your own provided faces and images, but still the same error.

Screen Shot 2019-08-10 at 6 42 52 pm

@vid
Copy link

vid commented Jan 13, 2020

I have this issue too. Would really appreciate a solution.

root@41b38f18fe94:/project# python mosaic.py     --target "/pics/targets/spruce_kitchen_IMG_20191011_110842.jpg"     --savepath "media/output/%s-mosaic-scale-%d.jpg"     --codebook-dir "/pics/*"     --scale 13     --height-aspect 4     --width-aspect 3     --opacity 0.4     --best-k 5
Weights already loaded at: weights/shape_predictor_5_face_landmarks.dat
Weights already loaded at: weights/shape_predictor_68_face_landmarks.dat
Weights already loaded at: weights/dlib_face_recognition_resnet_model_v1.dat
=== Creating Mosaic Image ===
Images=/pics/*, target=/pics/targets/spruce_kitchen_IMG_20191011_110842.jpg, scale=13, aspect_ratio=1.3333, vectorization=1, randomness=0.00, faces=False
Caching is ON, checking for previously cached index...
No cached index found, creating from scratch...
Indexing: 1 images, 0.0165 seconds (0.0165 per image)
Traceback (most recent call last):
  File "/project/emosaic/utils/indexing.py", line 158, in index_images
    index.add(matrix)
  File "/opt/conda/lib/python2.7/site-packages/faiss/__init__.py", line 100, in replacement_add
    self.add_c(n, swig_ptr(x))
  File "/opt/conda/lib/python2.7/site-packages/faiss/swigfaiss.py", line 1941, in add
    return _swigfaiss.IndexFlat_add(self, n, x)
TypeError: in method 'IndexFlat_add', argument 3 of type 'float const *'

> /project/emosaic/utils/indexing.py(185)index_images()
    184         import ipdb; ipdb.set_trace()
--> 185         return None, None, None
    186 

ipdb> 

I previously had an index error, I wonder if something is corrupted, but that would still leave the original error.

Traceback (most recent call last):
  File "/project/emosaic/utils/indexing.py", line 134, in index_images
    len(path_jobs), elapsed, elapsed / len(path_jobs)))
ZeroDivisionError: float division by zero

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

2 participants