Skip to content
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
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ ENV BASE=/code/up-master
RUN mkdir /code
WORKDIR /code
COPY deployment/requirements.txt .
RUN apt-get install realpath \
RUN apt-get install -y realpath git \
&& wget https://github.com/classner/up/archive/master.zip \
&& unzip master.zip \
&& rm master.zip
WORKDIR ${BASE}

COPY SMPL_python_v.1.0.0.zip .
COPY config.py .
RUN unzip SMPL_python_v.1.0.0.zip \
&& rm SMPL_python_v.1.0.0.zip
# Install python packages
RUN pip install -r ${BASE}/requirements.txt
RUN pip install -r /code/requirements.txt
RUN pip install opendr

# Adding Caffemodels
ADD models/test2.caffemodel ${BASE}/pose/training/model/pose/
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,18 @@ docker-compose run demo pose /input/zuck1.jpg
```

This will generate `.npz` and `.png` files in the `input` folder.


## Using nvidia-docker-compose
```
pip install nvidia-docker-compose
# nvidia-docker-compose binary may not be in your path. On ubuntu, for my installation, it installed to /home/edward/.local/bin/. An Anaconda installation will have binaries in anaconda/bin.
nvidia-docker-compose build
```

Generate body fit:
```
# Download SMPL_python_v.1.0.0.zip and place in the root directory of this repo on the docker host
nvidia-docker-compose build
nvidia-docker-compose run demo bodyfit /input/zuck1.jpg
```
36 changes: 36 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env python2
"""Configuration values for the project."""
import os.path as path
import click


############################ EDIT HERE ########################################
SMPL_FP = path.expanduser("/code/up-master/smpl")
DEEPLAB_BUILD_FP = path.expanduser("~/git/deeplab-public-ver2/build")
DEEPERCUT_CNN_BUILD_FP = path.expanduser("~/git/deepcut-cnn/build_cluster")
UP3D_FP = path.expanduser("~/datasets/up-3d")
SEG_DATA_FP = path.expanduser("~/datasets/seg_prepared")
POSE_DATA_FP = path.expanduser("~/datasets/pose_prepared")
DIRECT3D_DATA_FP = path.expanduser("~/datasets/2dto3d_prepared")


###############################################################################
# Infrastructure. Don't edit. #
###############################################################################

@click.command()
@click.argument('key', type=click.STRING)
def cli(key):
"""Print a config value to STDOUT."""
if key in globals().keys():
print globals()[key]
else:
raise Exception("Requested configuration value not available! "
"Available keys: " +
str([kval for kval in globals().keys() if kval.isupper()]) +
".")


if __name__ == '__main__':
cli() # pylint: disable=no-value-for-parameter

2 changes: 1 addition & 1 deletion deployment/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ case "$1" in
python pose/pose.py --use_cpu "${@:2}"
;;
bodyfit)
echo "todo"
python 3dfit/bodyfit.py "${@:2}"
;;
*)
show_help
Expand Down