Spaces:
Runtime error
Runtime error
Commit
·
82b021d
1
Parent(s):
14cb5f0
Update track_detection.py
Browse files
scripts/track_detection.py
CHANGED
@@ -101,12 +101,11 @@ def track(in_loc_dir, out_loc_dir, metadata_path, seq, config, verbose):
|
|
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)
|
@@ -115,6 +114,8 @@ def track(in_loc_dir, out_loc_dir, metadata_path, seq, config, verbose):
|
|
115 |
|
116 |
all_preds, real_width, real_height = format_predictions(image_shapes, outputs, width, height, verbose=verbose)
|
117 |
|
|
|
|
|
118 |
|
119 |
mot_rows = []
|
120 |
for frame in results['frames']:
|
|
|
101 |
image_meter_height = sequence['y_meter_start'] - sequence['y_meter_stop']
|
102 |
|
103 |
|
|
|
|
|
104 |
if False:
|
105 |
+
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)
|
106 |
+
else:
|
107 |
outputs = do_suppression(inference, conf_thres=config['conf_threshold'], iou_thres=config['nms_iou'], verbose=verbose)
|
108 |
|
|
|
109 |
if config['use_associative']:
|
110 |
|
111 |
do_confidence_boost(inference, outputs, conf_power=config['boost_power'], conf_decay=config['boost_decay'], verbose=verbose)
|
|
|
114 |
|
115 |
all_preds, real_width, real_height = format_predictions(image_shapes, outputs, width, height, verbose=verbose)
|
116 |
|
117 |
+
results = do_tracking(all_preds, 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)
|
118 |
+
|
119 |
|
120 |
mot_rows = []
|
121 |
for frame in results['frames']:
|