Spaces:
Runtime error
Runtime error
Commit
·
75844fb
1
Parent(s):
d40f1f1
AssoTracker
Browse files- inference.py +1 -1
- scripts/track_detection.py +7 -9
- scripts/track_eval.py +2 -0
inference.py
CHANGED
@@ -366,7 +366,7 @@ def do_associative_tracking(inference, image_shapes, width, height, image_meter_
|
|
366 |
|
367 |
json_data = tracker.finalize(min_length=min_length)
|
368 |
|
369 |
-
return json_data
|
370 |
|
371 |
@patch('json.encoder.c_make_encoder', None)
|
372 |
def json_dump_round_float(some_object, out_path, num_digits=4):
|
|
|
366 |
|
367 |
json_data = tracker.finalize(min_length=min_length)
|
368 |
|
369 |
+
return json_data, real_width, real_height
|
370 |
|
371 |
@patch('json.encoder.c_make_encoder', None)
|
372 |
def json_dump_round_float(some_object, out_path, num_digits=4):
|
scripts/track_detection.py
CHANGED
@@ -100,22 +100,20 @@ def track(in_loc_dir, out_loc_dir, metadata_path, seq, config, verbose):
|
|
100 |
image_meter_width = sequence['x_meter_stop'] - sequence['x_meter_start']
|
101 |
image_meter_height = sequence['y_meter_start'] - sequence['y_meter_stop']
|
102 |
|
103 |
-
print(len(inference))
|
104 |
-
print(len(inference[0]))
|
105 |
-
print(inference[0][0])
|
106 |
|
107 |
-
results = do_associative_tracking(inference, image_shapes, width, height, image_meter_width, image_meter_height, min_length=config['min_length'], max_age=config['max_age'], iou_thres=config['iou_threshold'], min_hits=config['min_hits'], verbose=verbose)
|
108 |
|
109 |
-
|
|
|
110 |
|
111 |
|
112 |
-
|
113 |
|
114 |
-
|
115 |
|
116 |
-
|
117 |
|
118 |
-
|
119 |
|
120 |
|
121 |
mot_rows = []
|
|
|
100 |
image_meter_width = sequence['x_meter_stop'] - sequence['x_meter_start']
|
101 |
image_meter_height = sequence['y_meter_start'] - sequence['y_meter_stop']
|
102 |
|
|
|
|
|
|
|
103 |
|
104 |
+
results, real_width, real_height = do_associative_tracking(inference, image_shapes, width, height, image_meter_width, image_meter_height, min_length=config['min_length'], max_age=config['max_age'], iou_thres=config['iou_threshold'], min_hits=config['min_hits'], verbose=verbose)
|
105 |
|
106 |
+
if False:
|
107 |
+
outputs = do_suppression(inference, conf_thres=config['conf_threshold'], iou_thres=config['nms_iou'], verbose=verbose)
|
108 |
|
109 |
|
110 |
+
if config['use_associative']:
|
111 |
|
112 |
+
do_confidence_boost(inference, outputs, conf_power=config['boost_power'], conf_decay=config['boost_decay'], verbose=verbose)
|
113 |
|
114 |
+
outputs = do_suppression(inference, conf_thres=config['conf_threshold'], iou_thres=config['nms_iou'], verbose=verbose)
|
115 |
|
116 |
+
all_preds, real_width, real_height = format_predictions(image_shapes, outputs, width, height, verbose=verbose)
|
117 |
|
118 |
|
119 |
mot_rows = []
|
scripts/track_eval.py
CHANGED
@@ -30,6 +30,8 @@ def main(args):
|
|
30 |
'use_associative': args.use_associative
|
31 |
}
|
32 |
|
|
|
|
|
33 |
track(infer_args, config=config, verbose=args.verbose)
|
34 |
|
35 |
evaluate(infer_args.output, "../frames/MOT", "../frames/metadata", infer_args.tracker, False)
|
|
|
30 |
'use_associative': args.use_associative
|
31 |
}
|
32 |
|
33 |
+
print("verbose", args.verbose)
|
34 |
+
|
35 |
track(infer_args, config=config, verbose=args.verbose)
|
36 |
|
37 |
evaluate(infer_args.output, "../frames/MOT", "../frames/metadata", infer_args.tracker, False)
|