Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
py-3d-face-reconstruction
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Richard Torenvliet
py-3d-face-reconstruction
Commits
12d33735
Commit
12d33735
authored
8 years ago
by
Richard Torenvliet
Browse files
Options
Downloads
Patches
Plain Diff
Made changes for production deployment
parent
91eabca7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
actions.mk
+6
-6
6 additions, 6 deletions
actions.mk
makefile
+18
-12
18 additions, 12 deletions
makefile
src/reconstruction/build.mk
+1
-0
1 addition, 0 deletions
src/reconstruction/build.mk
src/server.py
+1
-1
1 addition, 1 deletion
src/server.py
with
27 additions
and
19 deletions
.gitignore
+
1
−
0
View file @
12d33735
...
...
@@ -7,3 +7,4 @@ src/reconstruction/*.c
src/reconstruction/build/
*.dSYM
vendor/*
*.pyc
This diff is collapsed.
Click to expand it.
actions.mk
+
6
−
6
View file @
12d33735
TARGETS
+=
data/pca_shape_train_model.npy
.PHONY
:=
train_model show_pca test_model show_reconstruction
DEBUG_LEVEL
=
*
data/imm_face_db
:
data/imm_face_db.tar.gz
(
cd
data
;
mkdir
-p
imm_face_db
;
\
tar
-xvzf
imm_face_db.tar.gz
-C
imm_face_db
tar
-xvzf
imm_face_db.tar.gz
-C
imm_face_db
\
)
train_model
:
train_shape train_texture
train_texture
:
data/pca_imm_texture_model.npy data/pca_ibug_texture_model.npy
train_shape
:
data/pca_imm_shape_model.npy data/pca_ibug_shape_model.npy
shape_predictor_68_face_landmarks.dat
:
wget http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2
-P
data/
(
cd
data/
;
bzip2
-d
shape_predictor_68_face_landmarks.dat.bz2
)
data/imm_face_db.tar.gz
:
(
cd
data
;
wget http://www.imm.dtu.dk/~aam/datasets/imm_face_db.tar.gz
)
...
...
@@ -17,7 +16,8 @@ data/imm_face_db.tar.gz:
runnit
:
$(
BASE_DOCKER_CMD
)
python main.py
compile_texture
:
src/reconstruction/texture.pyx
src/reconstruction/texture.so
:
src/reconstruction/texture.pyx
$(
BASE_DOCKER_CMD
)
/bin/bash
-c
'(cd reconstruction; python setup.py build_ext --inplace)'
data/pca_imm_shape_model.npy
:
...
...
This diff is collapsed.
Click to expand it.
makefile
+
18
−
12
View file @
12d33735
DEBUG
:=
1
VERSION
:=
v0.1
IMAGE_TAG
:=
icyrizard/face-reconstruction.git:
$(
VERSION
)
BASE_DOCKER_CMD
:=
docker run
\
--rm
\
--volume
/Users/richard/Documents/sighthub/face-reconstruction
/data:/data
\
--volume
/Users/richard/Documents/sighthub/face-reconstruction
/src:/src
\
HERE
:=
$(
shell
pwd
)
DOCKER_RUN_FLAGS
:=
--rm
\
--volume
$(
HERE
)
/data:/data
\
--volume
$(
HERE
)
/src:/src
\
-e
"DEBUG=
$(
DEBUG
)
"
\
-p
8888:8888
\
$(
IMAGE_TAG
)
-p
6930:8888
include
actions.mk
include
src/reconstruction/build.mk
BASE_DOCKER_CMD
:=
docker run
$(
DOCKER_RUN_FLAGS
)
$(
IMAGE_TAG
)
$(info
$(TARGETS))
all
:
$(TARGETS)
DEPENDENCIES
:=
data/imm_face_db
TARGETS
:=
shape_predictor_68_face_landmarks.dat
\
src/reconstruction/texture.so
\
data/pca_ibug_shape_model.npy
\
data/pca_ibug_texture_model.npy
data
:
data/imm_face_db
reconstruction
:
texture.so
all
:
$(DEPENDENCIES) $(TARGETS)
include
actions.mk
include
src/reconstruction/build.mk
OS
:=
$(
shell
uname
)
...
...
@@ -23,7 +29,7 @@ build: requirements.txt
docker build
-t
$(
IMAGE_TAG
)
.
run-bash
:
$(
BASE_DOCKER_CMD
)
--interactive
--tty
$(
IMAGE_TAG
)
/bin/bash
docker run
--interactive
--tty
$(
DOCKER_RUN_FLAGS
)
$(
IMAGE_TAG
)
/bin/bash
$(VIRTUALENV)
:
virtualenv
-p
$(
PYTHON_BIN_PATH
)
venv
...
...
This diff is collapsed.
Click to expand it.
src/reconstruction/build.mk
+
1
−
0
View file @
12d33735
HERE
:=
$(
shell
pwd
)
TARGETS
+=
src/reconstruction/texture.so
ifeq
($(OS),Darwin)
HALIDE_LINK
:=
https://github.com/halide/Halide/releases/download/release_2016_04_27/halide-mac-64-trunk-2f11b9fce62f596e832907b82d87e8f75c53dd07.tgz
...
...
This diff is collapsed.
Click to expand it.
src/server.py
+
1
−
1
View file @
12d33735
...
...
@@ -194,7 +194,7 @@ app = web.Application([
if
__name__
==
'
__main__
'
:
app
.
listen
(
8888
)
app
.
listen
(
8888
,
xheaders
=
True
)
ioloop
=
ioloop
.
IOLoop
.
instance
()
autoreload
.
start
(
ioloop
)
ioloop
.
start
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment