Skip to content

Commit 65770a3

Browse files
committed
Initial commit
0 parents  commit 65770a3

15 files changed

+5033
-0
lines changed

.gitignore

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
.DS_Store
2+
*.zip
3+
*.h5
4+
5+
# Byte-compiled / optimized / DLL files
6+
__pycache__/
7+
*.py[cod]
8+
*$py.class
9+
10+
# C extensions
11+
*.so
12+
13+
# Distribution / packaging
14+
.Python
15+
build/
16+
develop-eggs/
17+
dist/
18+
downloads/
19+
eggs/
20+
.eggs/
21+
lib/
22+
lib64/
23+
parts/
24+
sdist/
25+
var/
26+
wheels/
27+
*.egg-info/
28+
.installed.cfg
29+
*.egg
30+
MANIFEST
31+
32+
# PyInstaller
33+
# Usually these files are written by a python script from a template
34+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
35+
*.manifest
36+
*.spec
37+
38+
# Installer logs
39+
pip-log.txt
40+
pip-delete-this-directory.txt
41+
42+
# Unit test / coverage reports
43+
htmlcov/
44+
.tox/
45+
.coverage
46+
.coverage.*
47+
.cache
48+
nosetests.xml
49+
coverage.xml
50+
*.cover
51+
.hypothesis/
52+
.pytest_cache/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
63+
# Flask stuff:
64+
instance/
65+
.webassets-cache
66+
67+
# Scrapy stuff:
68+
.scrapy
69+
70+
# Sphinx documentation
71+
docs/_build/
72+
73+
# PyBuilder
74+
target/
75+
76+
# Jupyter Notebook
77+
.ipynb_checkpoints
78+
79+
# pyenv
80+
.python-version
81+
82+
# celery beat schedule file
83+
celerybeat-schedule
84+
85+
# SageMath parsed files
86+
*.sage.py
87+
88+
# Environments
89+
.env
90+
.venv
91+
env/
92+
venv/
93+
ENV/
94+
env.bak/
95+
venv.bak/
96+
97+
# Spyder project settings
98+
.spyderproject
99+
.spyproject
100+
101+
# Rope project settings
102+
.ropeproject
103+
104+
# mkdocs documentation
105+
/site
106+
107+
# mypy
108+
.mypy_cache/

.whitesource

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
##########################################################
2+
#### WhiteSource "Bolt for Github" configuration file ####
3+
##########################################################
4+
5+
# Configuration #
6+
#---------------#
7+
ws.repo.scan=true
8+
vulnerable.check.run.conclusion.level=failure

Dockerfile/Dockerfile

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
2+
# nvidia/cuda
3+
# https://hub.docker.com/r/nvidia/cuda
4+
FROM nvidia/cuda:9.0-cudnn7-runtime-ubuntu16.04
5+
6+
LABEL maintainer="Timothy Liu <[email protected]>"
7+
8+
USER root
9+
10+
ENV DEBIAN_FRONTEND noninteractive
11+
12+
RUN apt-get update && \
13+
apt-get install -yq --no-install-recommends --no-upgrade \
14+
apt-utils && \
15+
apt-get install -yq --no-install-recommends --no-upgrade \
16+
# install system packages
17+
libopenblas-base \
18+
libjpeg-dev \
19+
libpng-dev \
20+
&& apt-get clean && \
21+
rm -rf /var/lib/apt/lists/*
22+
23+
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
24+
locale-gen
25+
26+
ENV CONDA_DIR=/opt/conda \
27+
SHELL=/bin/bash \
28+
NB_USER=jovyan \
29+
NB_UID=1000 \
30+
NB_GID=100 \
31+
LC_ALL=en_US.UTF-8 \
32+
LANG=en_US.UTF-8 \
33+
LANGUAGE=en_US.UTF-8
34+
35+
ENV PATH=$CONDA_DIR/bin:$PATH \
36+
HOME=/home/$NB_USER
37+
38+
ADD fix-permissions /usr/local/bin/fix-permissions
39+
40+
RUN groupadd wheel -g 11 && \
41+
echo "auth required pam_wheel.so use_uid" >> /etc/pam.d/su && \
42+
useradd -m -s /bin/bash -N -u $NB_UID $NB_USER && \
43+
mkdir -p $CONDA_DIR && \
44+
chown $NB_USER:$NB_GID $CONDA_DIR && \
45+
chmod g+w /etc/passwd
46+
47+
ENV MINICONDA_VERSION 4.5.12
48+
49+
RUN cd /tmp && \
50+
wget --quiet https://repo.continuum.io/miniconda/Miniconda3-${MINICONDA_VERSION}-Linux-x86_64.sh && \
51+
/bin/bash Miniconda3-${MINICONDA_VERSION}-Linux-x86_64.sh -f -b -p $CONDA_DIR && \
52+
rm Miniconda3-${MINICONDA_VERSION}-Linux-x86_64.sh && \
53+
$CONDA_DIR/bin/conda config --system --prepend channels conda-forge && \
54+
$CONDA_DIR/bin/conda config --system --set auto_update_conda false && \
55+
$CONDA_DIR/bin/conda config --system --set show_channel_urls true && \
56+
$CONDA_DIR/bin/conda install --quiet --yes conda="${MINICONDA_VERSION%.*}.*" && \
57+
$CONDA_DIR/bin/conda update --all --quiet --yes && \
58+
conda install -n root conda-build && \
59+
conda install -c nvidia -c numba -c pytorch -c conda-forge -c rapidsai -c defaults --quiet --yes \
60+
'cudatoolkit=9.0' \
61+
'numpy>=1.16.1' \
62+
'numba>=0.41.0dev' \
63+
'faiss-gpu' \
64+
'blas=*=openblas' \
65+
'cython>=0.29' && \
66+
conda install -c anaconda tensorflow-gpu=1.11 --quiet --yes && \
67+
cd /home/$NB_USER && \
68+
wget https://raw.githubusercontent.com/tlkh/openhouse-demo-cv/master/requirements.txt && \
69+
pip install --no-cache-dir -r /home/$NB_USER/requirements.txt && \
70+
pip uninstall pillow -y && \
71+
CC="cc -mavx2" pip install -U --force-reinstall --no-cache-dir pillow-simd && \
72+
rm /home/$NB_USER/requirements.txt && \
73+
conda clean -tipsy && \
74+
conda build purge-all && \
75+
rm -rf /home/$NB_USER/.cache
76+
77+
ENV XDG_CACHE_HOME /home/$NB_USER/.cache/
78+
79+
RUN MPLBACKEND=Agg python -c "import matplotlib.pyplot" && \
80+
fix-permissions /home/$NB_USER
81+
82+
EXPOSE 8080
83+
EXPOSE 5000
84+
85+
WORKDIR /app

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Timothy Liu
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

MANIFEST.in

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include README.md
2+
include LICENSE
3+
include requirements.txt

README.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# openhouse-demo-cv
2+
3+
SUTD Open House 2019 CV Demo
4+
5+
## Installation
6+
7+
Assuming Ubuntu 18.04 or Ubuntu 16.04
8+
9+
### 1. Intel RealSense Setup
10+
11+
```
12+
sudo apt-key adv --keyserver keys.gnupg.net --recv-key C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C8B3A55A6F3EFCDE
13+
14+
# Ubuntu 16.04
15+
sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo xenial main" -u
16+
17+
# Ubuntu 18.04
18+
sudo add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic main" -u
19+
20+
sudo apt-get install librealsense2-dkms -y
21+
sudo apt-get install librealsense2-utils -y
22+
sudo apt-get install librealsense2-dev -y
23+
sudo apt-get install librealsense2-dbg -y
24+
```
25+
26+
### 2. Demo setup
27+
28+
```
29+
WIP
30+
```
31+
32+
# run realsense-viewer to verify
33+
34+
## Acknowledgements
35+
36+
Code adapted from [`matterport/Mask_RCNN`](https://github.com/matterport/Mask_RCNN)
37+
38+
39+
40+

mrcnn/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)