Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,7 @@ ENV/

# mypy
.mypy_cache/

# model files
*.pb
*.pbtxt
7 changes: 7 additions & 0 deletions object_detection_app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM object-detection-core
MAINTAINER Josh Kurz <jkurz25@gmail.com>

# APPLICATION
ADD . /opt/object_detection/

CMD ["/usr/bin/python", "/opt/object_detection/app.py"]
39 changes: 39 additions & 0 deletions object_detection_app/Dockerfile.core
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
############################################################
# Dockerfile to build uwsgi using python3 container images
# Based on Ubuntu 14.04.4
############################################################

FROM ubuntu:14.04.4
MAINTAINER Josh Kurz <jkurz25@gmail.com>

# python 3.4 has already installed
RUN apt-get update && \
apt-get install -y python-pip \
python-pil \
python-lxml \
git \
wget \
unzip

# clean apt-get
RUN apt-get autoclean && \
apt-get clean && \
apt-get autoremove

# update pip
RUN pip install -U pip setuptools

# INSTALL requirements before for caching
COPY requirements.txt /var/app/requirements.txt

# install requirements
RUN pip install -r /var/app/requirements.txt

WORKDIR /opt/

RUN git clone https://github.com/tensorflow/models
RUN wget https://github.com/google/protobuf/releases/download/v3.3.0/protoc-3.3.0-linux-x86_64.zip \
&& chmod 775 protoc-3.3.0-linux-x86_64.zip \
&& unzip protoc-3.3.0-linux-x86_64.zip \
&& mv bin/protoc /usr/bin/
RUN cd models/research && protoc object_detection/protos/*.proto --python_out=.
14 changes: 14 additions & 0 deletions object_detection_app/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: "2"
services:
object_detection:
image: object-detection-docker
ports:
- 80:80
volumes:
- ../frozen_inference_graph.pb:/opt/graph_def/frozen_inference_graph.pb
- ../label_map.pbtxt:/opt/models/research/object_detection/data/mscoco_label_map.pbtxt
environment:
THRESHOLD: 0.6
DEBUG: "True"
NUM_CLASSES: 1
PYTHONUNBUFFERED: 1
6 changes: 6 additions & 0 deletions object_detection_app/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Flask==0.12.2
WTForms==2.1
Flask_WTF==0.14.2
Werkzeug==0.12.2
tensorflow
Pillow