From c73e86eaf7d3d23f2fe6d042b67cf49527e2ee0a Mon Sep 17 00:00:00 2001 From: VRDeveloperOne Date: Wed, 23 May 2018 16:46:10 -0500 Subject: [PATCH 1/2] Dockerized and readme'd --- .gitignore | 2 ++ Dockerfile | 11 +++++++++++ Input/readme.md | 8 ++++++++ linux-requirements.txt | 8 ++++++++ models/readme.md | 10 ++++++++++ readme.md | 15 +++++++++++++++ 6 files changed, 54 insertions(+) create mode 100644 Dockerfile create mode 100644 Input/readme.md create mode 100755 linux-requirements.txt create mode 100644 models/readme.md create mode 100644 readme.md diff --git a/.gitignore b/.gitignore index 0d20b64..f9cbf8a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ *.pyc +*.jpg +/Output diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..607a09a --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/Input/readme.md b/Input/readme.md new file mode 100644 index 0000000..34637fa --- /dev/null +++ b/Input/readme.md @@ -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 diff --git a/linux-requirements.txt b/linux-requirements.txt new file mode 100755 index 0000000..d022f75 --- /dev/null +++ b/linux-requirements.txt @@ -0,0 +1,8 @@ +cmake +dlib +face_recognition +deap +opencv-python +imutils +keras +tensorflow diff --git a/models/readme.md b/models/readme.md new file mode 100644 index 0000000..bf07a10 --- /dev/null +++ b/models/readme.md @@ -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 diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..0fb26cc --- /dev/null +++ b/readme.md @@ -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 From 9d611da1c578364781e57c322e530226fbfd1e0d Mon Sep 17 00:00:00 2001 From: VRDeveloperOne Date: Wed, 23 May 2018 16:51:31 -0500 Subject: [PATCH 2/2] gitignore --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f9cbf8a..b366e03 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ *.pyc -*.jpg + +/Input/*.jpg /Output +models/foto2vam.json +models/foto2vam.model