Skip to content

Commit

Permalink
import bug solved
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavz committed May 24, 2018
1 parent 621d344 commit 99ec7e6
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 2,782 deletions.
4 changes: 1 addition & 3 deletions run_objectdetection.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
import yaml
import os
from stuff.helper import Model, FPS, WebcamVideoStream, SessionWorker, conv_detect2track, conv_track2detect, vis_detection
from object_detection.utils import ops as utils_ops
from stuff.object_detection.utils import ops as utils_ops

# protobuf compilation (only once necessary)
os.system('protoc stuff/object_detection/protos/*.proto --python_out=.')

## LOAD CONFIG PARAMS ##
if (os.path.isfile('config.yml')):
Expand Down
6 changes: 3 additions & 3 deletions scripts/config_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
### CHANGE THIS ACCORDING TO YOUR SYSTEM ###
export MODEL_NAME="mask_rcnn_mobilenet_v1_400_coco_117k"
export TF_PATH="/home/gustav/workspace/tensorflow/tensorflow"
export REPO_PATH="/home/gustav/workspace/realtime_object_detection"
export ROOT_PATH="/home/gustav/workspace/realtime_object_detection"
### DO NOT CHANGE THIS ###
export MODEL_PATH="${REPO_PATH}/models/${MODEL_NAME}"
export MODEL_PATH="${ROOT_PATH}/models/${MODEL_NAME}"
export IN_GRAPH="${MODEL_PATH}/frozen_inference_graph.pb"
export OUT_GRAPH="${MODEL_PATH}/optimized_inference_graph.pb"
export TFLITE_GRAPH="${MODEL_PATH}/frozen_inference_graph.tflite"
Expand Down Expand Up @@ -42,7 +42,7 @@ sort_by_execution_order
echo "> doublecheck all paths:"
echo "MODEL_NAME: $MODEL_NAME"
echo "TF_PATH: $TF_PATH"
echo "REPO_PATH: $REPO_PATH"
echo "ROOT_PATH: $ROOT_PATH"

########################
# Possible Transforms are:
Expand Down
8 changes: 5 additions & 3 deletions stuff/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
import six.moves.urllib as urllib
from tensorflow.core.framework import graph_pb2

from object_detection.utils import label_map_util
from object_detection.utils import visualization_utils as vis_util

import sys
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3
Expand All @@ -29,6 +26,11 @@
elif PY3:
import queue as Queue

from object_detection.utils import label_map_util
from object_detection.utils import visualization_utils as vis_util




class Model:
"""
Expand Down
4 changes: 2 additions & 2 deletions stuff/object_detection/core/box_list_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"""
import tensorflow as tf

from object_detection.core import box_list
from object_detection.utils import shape_utils
from stuff.object_detection.core import box_list
from stuff.object_detection.utils import shape_utils


class SortOrder(object):
Expand Down
2 changes: 1 addition & 1 deletion stuff/object_detection/utils/label_map_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import tensorflow as tf
from google.protobuf import text_format
from object_detection.protos import string_int_label_map_pb2
from stuff.object_detection.protos import string_int_label_map_pb2


def _validate_label_map(label_map):
Expand Down
178 changes: 0 additions & 178 deletions stuff/object_detection/utils/new/label_map_util.py

This file was deleted.

Loading

0 comments on commit 99ec7e6

Please sign in to comment.