Skip to content

Commit a720e04

Browse files
committed
minor fixes
1 parent 8cf5bf0 commit a720e04

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ wandb/
99
*egg-info*
1010
fast_reid/datasets/MOT17-ReID
1111
*/__pycache__
12+
*.so

tools/mc_demo.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ def make_parser():
4747
parser.add_argument("--new_track_thresh", default=0.7, type=float, help="new track thresh")
4848
parser.add_argument("--track_buffer", type=int, default=30, help="the frames for keep lost tracks")
4949
parser.add_argument("--match_thresh", type=float, default=0.8, help="matching threshold for tracking")
50-
parser.add_argument("--aspect_ratio_thresh", type=float, default=1.6, help="threshold for filtering out boxes of which aspect ratio are above the given value.")
5150
parser.add_argument('--min_box_area', type=float, default=10, help='filter out tiny boxes')
5251
parser.add_argument("--fuse-score", dest="fuse_score", default=False, action="store_true", help="fuse score and iou for association")
5352

@@ -179,8 +178,7 @@ def image_demo(predictor, vis_folder, current_time, args):
179178
for t in online_targets:
180179
tlwh = t.tlwh
181180
tid = t.track_id
182-
vertical = tlwh[2] / tlwh[3] > args.aspect_ratio_thresh
183-
if tlwh[2] * tlwh[3] > args.min_box_area and not vertical:
181+
if tlwh[2] * tlwh[3] > args.min_box_area:
184182
online_tlwhs.append(tlwh)
185183
online_ids.append(tid)
186184
online_scores.append(t.score)
@@ -263,8 +261,7 @@ def imageflow_demo(predictor, vis_folder, current_time, args):
263261
for t in online_targets:
264262
tlwh = t.tlwh
265263
tid = t.track_id
266-
vertical = tlwh[2] / tlwh[3] > args.aspect_ratio_thresh
267-
if tlwh[2] * tlwh[3] > args.min_box_area and not vertical:
264+
if tlwh[2] * tlwh[3] > args.min_box_area:
268265
online_tlwhs.append(tlwh)
269266
online_ids.append(tid)
270267
online_scores.append(t.score)

tools/mc_demo_yolov7.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ def detect(save_img=False):
135135
tlbr = t.tlbr
136136
tid = t.track_id
137137
tcls = t.cls
138-
vertical = tlwh[2] / tlwh[3] > opt.aspect_ratio_thresh
139-
if tlwh[2] * tlwh[3] > opt.min_box_area and not vertical:
138+
if tlwh[2] * tlwh[3] > opt.min_box_area:
140139
online_tlwhs.append(tlwh)
141140
online_ids.append(tid)
142141
online_scores.append(t.score)
@@ -214,7 +213,7 @@ def detect(save_img=False):
214213

215214
# tracking args
216215
parser.add_argument("--track_high_thresh", type=float, default=0.3, help="tracking confidence threshold")
217-
parser.add_argument("--track_low_thresh", default=0.1, type=float, help="lowest detection threshold")
216+
parser.add_argument("--track_low_thresh", default=0.05, type=float, help="lowest detection threshold")
218217
parser.add_argument("--new_track_thresh", default=0.4, type=float, help="new track thresh")
219218
parser.add_argument("--track_buffer", type=int, default=30, help="the frames for keep lost tracks")
220219
parser.add_argument("--match_thresh", type=float, default=0.7, help="matching threshold for tracking")
@@ -239,6 +238,7 @@ def detect(save_img=False):
239238
help='threshold for rejecting low appearance similarity reid matches')
240239

241240
opt = parser.parse_args()
241+
242242
opt.jde = False
243243
opt.ablation = False
244244

tracker/mc_bot_sort.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ def update(self, output_results, img):
293293

294294
if len(dets) > 0:
295295
'''Detections'''
296-
if self.args.with_reid or self.args.jde:
296+
if self.args.with_reid:
297297
detections = [STrack(STrack.tlbr_to_tlwh(tlbr), s, c, f) for
298298
(tlbr, s, c, f) in zip(dets, scores_keep, classes_keep, features_keep)]
299299
else:

0 commit comments

Comments
 (0)