'types.SimpleNamespace' object has no attribute 'det_thresh'
rslim97 opened this issue · comments
Search before asking
- I have searched the Yolo Tracking issues and discussions and found no similar questions.
Yolo Tracking Component
Evolution
Bug
I am trying to tune parameters for hybridsort when I get this error:
evolve: yolo_model=/home/rslim/proj/rslim/yolo_tracking/examples/weights/yolov8n.pt, reid_model=/home/rslim/proj/rslim/yolo_tracking/examples/weights/osnet_x0_25_msmt17.pt, tracking_method=hybridsort, name=exp, project=/home/rslim/proj/rslim/yolo_tracking/examples/runs/evolve, classes=['0'], exist_ok=False, benchmark=MOT16, split=train, eval_existing=, conf=0.45, imgsz=[1280], gsi=False, device=[''], n_trials=100, resume=False, save=False, processes_per_device=2, objectives=['HOTA', 'MOTA', 'IDF1'], tracking_config=/home/rslim/proj/rslim/yolo_tracking/boxmot/configs/hybridsort.yaml
[I 2024-02-13 12:11:52,407] A new study created in memory with name: no-name-ce2c2921-775d-45c4-baee-39408100a50e
2024-02-13 12:11:52.409 | INFO | __main__:get_new_config:178 - Writing newly generated config for trial
Namespace(benchmark='MOT16', classes=['0'], conf=0.3993758979779549, device=[''], eval_existing='', exist_ok=False, gsi=False, imgsz=[1280], n_trials=100, name='exp', objectives=['HOTA', 'MOTA', 'IDF1'], processes_per_device=2, project=PosixPath('/home/rslim/proj/rslim/yolo_tracking/examples/runs/evolve'), reid_model=PosixPath('/home/rslim/proj/rslim/yolo_tracking/examples/weights/osnet_x0_25_msmt17.pt'), resume=False, save=False, split='train', tracking_config=PosixPath('/home/rslim/proj/rslim/yolo_tracking/boxmot/configs/hybridsort.yaml'), tracking_method='hybridsort', yolo_model=PosixPath('/home/rslim/proj/rslim/yolo_tracking/examples/weights/yolov8n.pt'))
2024-02-13 12:11:52.452 | INFO | val:download_mot_eval_tools:65 - Eval repo already downloaded Cmd('git') failed due to: exit code(128)
cmdline: git clone -v -- https://github.com/JonathonLuiten/TrackEval /home/rslim/proj/rslim/yolo_tracking/examples/val_utils
stderr: 'fatal: destination path '/home/rslim/proj/rslim/yolo_tracking/examples/val_utils' already exists and is not an empty directory.
'
sed: no input files
sed: no input files
sed: no input files
2024-02-13 12:12:00.627 | INFO | val:eval:203 - Staring evaluation process on /home/rslim/proj/rslim/yolo_tracking/examples/val_utils/data/MOT16/train/MOT16-02/img1
2024-02-13 12:12:00.649 | INFO | val:eval:203 - Staring evaluation process on /home/rslim/proj/rslim/yolo_tracking/examples/val_utils/data/MOT16/train/MOT16-04/img1
Traceback (most recent call last):
File "/home/rslim/proj/rslim/yolo_tracking/examples/track.py", line 197, in <module>
run(opt)
File "/home/rslim/.local/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/rslim/proj/rslim/yolo_tracking/examples/track.py", line 103, in run
for frame_idx, r in enumerate(results):
File "/home/rslim/.local/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 35, in generator_context
response = gen.send(None)
File "/home/rslim/miniconda3/envs/boxmot_env/lib/python3.8/site-packages/ultralytics/engine/predictor.py", line 252, in stream_inference
self.run_callbacks('on_predict_start')
File "/home/rslim/miniconda3/envs/boxmot_env/lib/python3.8/site-packages/ultralytics/engine/predictor.py", line 377, in run_callbacks
callback(self)
File "/home/rslim/proj/rslim/yolo_tracking/examples/track.py", line 44, in on_predict_start
tracker = create_tracker(
File "/home/rslim/proj/rslim/yolo_tracking/boxmot/tracker_zoo.py", line 107, in create_tracker
det_thresh=cfg.det_thresh,
AttributeError: 'types.SimpleNamespace' object has no attribute 'det_thresh'
I have modified the config file to include said parameter but of no effect. When I rerun the command, it rewrites the hybridsort.yaml file into this and empty dict, like this:
{}
Environment
-python 3.8.10 -ultralytics 8.0.228 -torch 2.1.2
Minimal Reproducible Example
cd yolo_tracking
python3 evolve.py --tracking-method hybridsort --benchmark MOT16 --n-trials 100
- You need to add the config file here: https://github.com/mikel-brostrom/yolo_tracking/tree/master/boxmot/configs
- Add a block of parameter suggestions like this one: https://github.com/mikel-brostrom/yolo_tracking/blob/09c4f226008c2b0f0806cdfc0cbddaa979c7ba43/examples/evolve.py#L121C9-L141
I would be more than happy to review a PR for this! 😄