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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ __pycache__/
# Distribution / packaging
.Python
build/
modelBuild/

develop-eggs/
dist/
downloads/
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ WORKDIR $WORKPATH
COPY . $WORKPATH/

EXPOSE 8888 6006
ENV DEBIAN_FRONTEND noninteractive
#term is not set so the dialog frontend is not usable

RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y git
RUN apt-get install -y git curl unzip

# Get the tensorflow models research directory, and move it into tensorflow
# source folder to match recommendation of installation
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,12 @@ You can find the custom images for this tutorial in the /tensorflow/input/images
</bndbox>
</object>
```

## get model

1. mkdir modelBuild
2. cd modelBuild
3. curl -O "http://download.tensorflow.org/models/object_detection/faster_rcnn_resnet101_coco_11_06_2017.tar.gz"
4. tar xzf faster_rcnn_resnet101_coco_11_06_2017.tar.gz
5. python /notebooks/tensorflow/models/research/object_detection/legacy/train.py --logtostderr --train_dir=/notebooks/object-detection/modelBuild/build/ --pipeline_config_path=/notebooks/object-detection/faster_rcnn_resnet101.config
6. python /notebooks/tensorflow/models/research/object_detection/export_inference_graph.py --input_type image_tensor --pipeline_config_path /notebooks/object-detection/faster_rcnn_resnet101.config --trained_checkpoint_prefix /notebooks/object-detection/modelBuild/build/model.ckpt-XXX --output_directory /notebooks/object-detection/modelBuild/build/0
10 changes: 5 additions & 5 deletions faster_rcnn_resnet101.config
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ train_config: {
use_moving_average: false
}
gradient_clipping_by_norm: 10.0
fine_tune_checkpoint: "/tensorflow/train/faster_rcnn_resnet101_coco_11_06_2017/model.ckpt"
fine_tune_checkpoint: "/notebooks/object-detection/modelBuild/faster_rcnn_resnet101_coco_11_06_2017/model.ckpt"
from_detection_checkpoint: true
data_augmentation_options {
random_horizontal_flip {
Expand All @@ -113,9 +113,9 @@ train_config: {

train_input_reader: {
tf_record_input_reader {
input_path: "/tensorflow/input/train.record"
input_path: "/notebooks/object-detection/input/train.record"
}
label_map_path: "/tensorflow/input/annotations/label_map.pbtxt"
label_map_path: "/notebooks/object-detection/input/annotations/label_map.pbtxt"
}

eval_config: {
Expand All @@ -127,9 +127,9 @@ eval_config: {

eval_input_reader: {
tf_record_input_reader {
input_path: "/tensorflow/input/val.record"
input_path: "/notebooks/object-detection/input/val.record"
}
label_map_path: "/tensorflow/input/annotations/label_map.pbtxt"
label_map_path: "/notebooks/object-detection/input/annotations/label_map.pbtxt"
shuffle: false
num_readers: 1
}
Expand Down
142 changes: 40 additions & 102 deletions object_detection_shapes.ipynb

Large diffs are not rendered by default.