Skip to content

Commit 5878c3f

Browse files
Boxmot refactor (#2005)
1 parent 9c0ddf8 commit 5878c3f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

boxmot/engine/cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ def main():
1818
default=[WEIGHTS / 'osnet_x0_25_msmt17.pt'],
1919
help='one or more ReID model weights (only for generate/eval/tune)'
2020
)
21+
eval_parent.add_argument('--classes', nargs='+', type=int,
22+
default=[0], help='filter by class indices')
2123

2224
# Common arguments for all commands (flags only, no positionals)
2325
common_parser = argparse.ArgumentParser(add_help=False, conflict_handler='resolve')
@@ -43,7 +45,7 @@ def main():
4345
help='IoU threshold for NMS')
4446
common_parser.add_argument('--device', default='', help='cuda device(s), e.g. 0 or 0,1,2,3 or cpu')
4547
common_parser.add_argument('--classes', nargs='+', type=int,
46-
default=[0], help='filter by class indices')
48+
help='filter by class indices')
4749
common_parser.add_argument('--project', type=Path, default=ROOT / 'runs',
4850
help='save results to project/name')
4951
common_parser.add_argument('--name', default='', help='save results to project/name')
@@ -152,9 +154,11 @@ def main():
152154
run_generate_mot_results(args)
153155
elif args.command in ('eval', 'all'):
154156
from boxmot.engine.val import main as run_eval
157+
args.classes = [0]
155158
run_eval(args)
156159
elif args.command == 'tune':
157160
from boxmot.engine.evolve import main as run_tuning
161+
args.classes = [0]
158162
run_tuning(args)
159163

160164

0 commit comments

Comments
 (0)