Skip to content

Commit

Permalink
update DockerfileCloud to install dependencies to dist-packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomcli committed Sep 20, 2018
1 parent 76ac5fa commit c388b2c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions DockerfileCloud
Expand Up @@ -5,17 +5,17 @@ RUN apt-get install -y protobuf-compiler python-pil python-lxml python-tk
RUN pip install pillow jupyter matplotlib
WORKDIR /tensorflow
RUN git clone https://github.com/tensorflow/models.git
WORKDIR models
WORKDIR research
WORKDIR models/research
RUN curl -OL https://github.com/google/protobuf/releases/download/v3.0.0/protoc-3.0.0-linux-x86_64.zip
RUN unzip protoc-3.0.0-linux-x86_64.zip
RUN ./bin/protoc object_detection/protos/*.proto --python_out=.
RUN echo "export PYTHONPATH=${PYTHONPATH}:`pwd`:`pwd`/slim" >> ~/.bashrc
RUN python setup.py install
WORKDIR slim
RUN python setup.py install
RUN git clone https://github.com/cocodataset/cocoapi.git
WORKDIR cocoapi/PythonAPI
RUN make
WORKDIR cocoapi/PythonAPI
RUN make install
WORKDIR /tensorflow/models/research
RUN cp -r cocoapi/PythonAPI/pycocotools .
COPY volume/ volume/
CMD exec /bin/bash -c "trap : TERM INT; sleep infinity & wait"
CMD exec /bin/bash -c "trap : TERM INT; sleep infinity & wait"
14 changes: 7 additions & 7 deletions README.md
Expand Up @@ -49,7 +49,7 @@ The app recognizes now the red car, the blue car and phones.
Follow the next steps to train models with your own objects.

### 1) Development Environment Setup

Invoke the following commands to download all necessary files and to set up a local development environment:

```bash
Expand All @@ -58,7 +58,7 @@ $ cd object-detection-anki-overdrive-cars
$ my_project_dir=$(pwd)
$ export PROJECT_DIR=$my_project_dir
$ docker build -t tensorflow-od .
$ cd $PROJECT_DIR/volume/data
$ cd $PROJECT_DIR/data
$ wget http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v2_coco_2018_03_29.tar.gz
$ tar xvzf ssd_mobilenet_v2_coco_2018_03_29.tar.gz
$ cp -R ${PROJECT_DIR}/data ${PROJECT_DIR}/volume/data
Expand Down Expand Up @@ -97,12 +97,12 @@ In the Docker container invoke these commands:

```bash
$ cd volume
$ python create_tfrecord.py
$ python create_tfrecord.py
$ exit
```


### 3) Training of the Model
### 3) Training of the Model

For testing purposes or if you have a machine with TensorFlow GPU support, you can train the models locally.

Expand Down Expand Up @@ -163,7 +163,7 @@ $ kubectl cp default/train-56cfd5b9f-8x6q4:/tensorflow/models/research/volume/mo
```


### 4) Save the Model
### 4) Save the Model

The training generates checkpoint files in the 'volume/train' directory. These files need to be converted into something that is called a frozen graph file. That file is used later in the iOS app and the Python notebook.

Expand All @@ -186,7 +186,7 @@ $ exit
```


### 5) Testing of the Model
### 5) Testing of the Model

Before using the model in the iOS app, you can test it in a Python notebook. You can also view the training results via Tensorboard.

Expand Down Expand Up @@ -247,4 +247,4 @@ Change the lines 63ff with your own IoT configuration.

Redeploy the app to your iOS device.

Rather than using the Node-RED flow of the original [project](https://github.com/IBM-Bluemix/node-mqtt-for-anki-overdrive) you need to deploy the version from this project [node-red-flow](node-red-flow) to your Node-RED instance.
Rather than using the Node-RED flow of the original [project](https://github.com/IBM-Bluemix/node-mqtt-for-anki-overdrive) you need to deploy the version from this project [node-red-flow](node-red-flow) to your Node-RED instance.

0 comments on commit c388b2c

Please sign in to comment.