diff --git a/server_side/api/modules/car_crash.py b/server_side/api/modules/car_crash.py index 7ebd7fd..089dac6 100644 --- a/server_side/api/modules/car_crash.py +++ b/server_side/api/modules/car_crash.py @@ -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 diff --git a/server_side/api/modules/databases/crashes.json b/server_side/api/modules/databases/crashes.json index e69de29..9e26dfe 100644 --- a/server_side/api/modules/databases/crashes.json +++ b/server_side/api/modules/databases/crashes.json @@ -0,0 +1 @@ +{} \ No newline at end of file