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

Dockerize #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
*.pyc

/Input/*.jpg
/Output
models/foto2vam.json
models/foto2vam.model
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3.6.5

WORKDIR /var/app

RUN pip3 install virtualenv
RUN virtualenv /var/app
ADD . /var/app
COPY ./linux-requirements.txt /var/app/requirements.txt
RUN if [ -f /var/app/requirements.txt ]; then pip3 install -r /var/app/requirements.txt; fi

CMD ["python", "foto2vam.py"]
8 changes: 8 additions & 0 deletions Input/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# What do I put in here?

Find unobscured frontal image and 35ish degree angle (looking left. Mirror if your image isn't facing left) image of your desired person with a neutral expression on their face (eg not laughing, smiling, talking...), name them exactly like the examples, and then run 'python foto2vam.py' (Note: It can read JPG images just fine, but it searches for PNG images. Rename a .JPG to .PNG and it'll work)

### Example Names

facename_angle0.png
facename_angle35.png
8 changes: 8 additions & 0 deletions linux-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cmake
dlib
face_recognition
deap
opencv-python
imutils
keras
tensorflow
10 changes: 10 additions & 0 deletions models/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# What goes in here?

You will need these files:

foto2vam.json
foto2vam.model

### Get them here for now...

https://mega.nz/#!eS5UCaDI!0At_bGZT9Rt9gqwLF7nsdcENvVKCJykIVDfFt_J4ksU
15 changes: 15 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# How to run easily
Use Docker to have repeatable success. If you can install Docker, you win.

### Install Docker
https://docs.docker.com/docker-for-mac/install/
https://docs.docker.com/docker-for-windows/install/

### Setup
cd foto2vam
docker build -t vdo/foto2vam:1.0.0 .

### Running for new models
cd foto2vam
Add new photos to Input folder then....
docker run -v $(pwd)/:/var/app/ vdo/foto2vam:1.0.0