Browse Source

car crash update

yigit
Yiğit Çolakoğlu 6 years ago
parent
commit
3b927fa743
2 changed files with 3 additions and 14 deletions
  1. +2
    -14
      server_side/api/modules/car_crash.py
  2. +1
    -0
      server_side/api/modules/databases/crashes.json

+ 2
- 14
server_side/api/modules/car_crash.py View File

@ -33,22 +33,10 @@ with open(users_path, 'r') as f:
users = json.load(f)
if sys.platform == "win32":
PATH_TO_LABELS = '../../traffic_analyzer/object_detection/data/mscoco_label_map.pbtxt'
PATH_TO_LABELS = '../../traffic_analyzer/object_detection/data/kitti_label_map.pbtxt'
PATH_TO_CKPT = 'modules/faster_rcnn_resnet101_kitti_2018_01_28/frozen_inference_graph.pb'
NUM_CLASSES = 8
detection_graph = tf.Graph()
with detection_graph.as_default():
od_graph_def = tf.GraphDef()
with tf.gfile.GFile(PATH_TO_CKPT, 'rb') as fid:
serialized_graph = fid.read()
od_graph_def.ParseFromString(serialized_graph)
tf.import_graph_def(od_graph_def, name='')
label_map = label_map_util.load_labelmap(PATH_TO_LABELS)
categories = label_map_util.convert_label_map_to_categories(label_map, max_num_classes=NUM_CLASSES, use_display_name=True)
category_index = label_map_util.create_category_index(categories)
category_index = label_map_util.create_category_index_from_labelmap(PATH_TO_LABELS, use_display_name=True)
def process_img(img):
pass


+ 1
- 0
server_side/api/modules/databases/crashes.json View File

@ -0,0 +1 @@
{}

Loading…
Cancel
Save