Giter VIP home page Giter VIP logo

photomosaic's People

Contributors

0xflotus avatar codingcoffee avatar habi avatar notmyname avatar worldveil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

photomosaic's Issues

Error building

I'm trying to install on Centos 7 (new install) and the build fails:

File "/opt/conda/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2

----------------------------------------

Command "/opt/conda/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-S23qGD/dlib/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-ANToly/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-S23qGD/dlib/
The command '/bin/sh -c pip install -r /home/requirements.txt' returned a non-zero code: 1

It looks like it is related to dlib, known for being difficult to get up and running. Is this library only required for the facil recognition stuff? I would disable it that's the only use.

Error indexing

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!

Unable to build.sh on Mac Catalina

I'm having the following issue when trying to build.sh the library.

$ sh build.sh
[+] Building 1.5s (8/12)
=> [internal] load build definition from Dockerfile.cpu 0.0s
=> => transferring dockerfile: 1.46kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 34B 0.0s
=> [internal] load metadata for docker.io/nvidia/cuda:8.0-devel-ubuntu16.04 1.2s
=> [internal] load build context 0.0s
=> => transferring context: 38B 0.0s
=> [1/8] FROM docker.io/nvidia/cuda:8.0-devel-ubuntu16.04@sha256:c4d900990dff990d3deeb0e0d9f665f094628d45990f1dd766e02863583 0.0s
=> CACHED [2/8] RUN apt-get update && apt-get install -y curl bzip2 libgl1-mesa-glx 0.0s
=> CACHED [3/8] RUN curl https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh > /tmp/conda.sh 0.0s
=> ERROR [4/8] RUN bash /tmp/conda.sh -b -p /opt/conda && /opt/conda/bin/conda update -n base conda && /opt/conda/bi 0.2s

[4/8] RUN bash /tmp/conda.sh -b -p /opt/conda && /opt/conda/bin/conda update -n base conda && /opt/conda/bin/conda install -y -c pytorch faiss-cpu=1.3.0 && apt-get remove -y --auto-remove curl bzip2 && apt-get clean && rm -fr /tmp/conda.sh:
#7 0.231 /bin/sh: 1: /opt/conda/bin/conda: not found


executor failed running [/bin/sh -c bash /tmp/conda.sh -b -p /opt/conda && /opt/conda/bin/conda update -n base conda && /opt/conda/bin/conda install -y -c pytorch faiss-${FAISS_CPU_OR_GPU}=${FAISS_VERSION} && apt-get remove -y --auto-remove curl bzip2 && apt-get clean && rm -fr /tmp/conda.sh]: exit code: 127
(base)

I have properly installed Docker and XQuartz. Trying to solve this issue, I've also tried to install conda on my machine and to adapt the Dockerfile.cpu, with no luck.

Would you please kindly assist?

Error Building

After running sh build.sh in the last step (12) I get these last lines and image is not created.

ERROR: Package 'imageio' requires a different Python: 2.7.17 not in '>=3.5'
The command '/bin/sh -c pip install -r /home/requirements.txt' returned a non-zero code: 1

Error on build

I'm getting an error when trying to build the docker image (during sh build.sh):

dpkg: error: error creating new backup file '/var/lib/dpkg/status-old': Invalid cross-device link
E: Sub-process /usr/bin/dpkg returned an error code (2)
The command '/bin/sh -c apt-get update && apt-get install -y curl bzip2 libgl1-mesa-glx' returned a non-zero code: 100

PC info:

docker -v
Docker version 18.09.0-ce, build 4d60db472b

cat /proc/version
Linux version 4.19.8-arch1-1-ARCH (builduser@heftig-1129) (gcc version 8.2.1 20181127 (GCC)) #1 SMP PREEMPT Sat Dec 8 13:49:11 UTC 2018

I'm not that familiar with docker, so perhaps this is an easy fix, but it's not obvious to me where any hard links are being created in the build..

Limit on number of times a tile is used

Is it possible to have a limit on the number of times a tile is used? So if it uses a particular image from the codebook-dir, enforce a limit on the number of times that image is used.

Image build issue fixes

Two minor adjustments were required in order for the image to build successfully. I'm too lazy to open a PR, but I thought I'd leave them here for future wanderers.

  1. The miniconda install script URL redirects, causing the curl command in the Dockerfile to download an empty file. To fix this, replace it with RUN curl -L https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -o /tmp/conda.sh. (The -L flag ensures that redirects are followed.)
  2. This project uses Python 2 (Boo!), which a subdependency of the dependencies listed in requirements.txt has dropped support for. The fix here is to explicitly constrain the version of this subdependency to the last version that supported 2.7. Concretely, add imageio<2.7 to the top of requirements.txt.

The image should build now.

Error while indexing

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.