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 indexing #7

Open
leifdalan opened this issue Dec 15, 2018 · 1 comment
Open

Error indexing #7

leifdalan opened this issue Dec 15, 2018 · 1 comment

Comments

@leifdalan
Copy link

I'm getting an error trying trying to run the following:

    --target "media/example/photo.jpg" \
    --savepath "media/output/%s-mosaic-scale-%d.jpg" \
    --codebook-dir "media/pics" \
    --scale 5 \
    --height-aspect 1 \
    --width-aspect 1 \
    --vectorization-factor 1

After I changed the mount in the launch.sh:

docker run \
	--rm \
	--name $CONTAINER_NAME \
	--mount type=bind,source="$(pwd)",target=/project \
	--mount type=bind,source="/Users/leif/Desktop/pics/",target=/project/media/pics \
	-p "$PORT:$PORT/tcp" \
	-e "DISPLAY=$IP:0" \
	mosaic-conda:latest \
	jupyter notebook \
		--allow-root \
		--ip 0.0.0.0 \
		--no-browser \
		--NotebookApp.token='' \
		--notebook-dir=/project

I get the following when running from both inside the container and from inside the GUI with a "new notebook (replacing python with run)

Caching is ON, checking for previously cached index...
No cached index found, creating from scratch...
Indexing: 3 images, 0.3186 seconds (0.1062 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 *'

In both inside the container and inside the gui, the result is being kicked into a ipdb prompt.

Any ideas? I got a successful build, obviously. Don't really have working knowledge of faiss.

Thanks in advance!

@leifdalan leifdalan reopened this Dec 16, 2018
@worldveil
Copy link
Owner

what shape is the matrix? what's the dtype? usually those types of faiss errors are related to this.

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