when I run sh run/mot17_half_train.sh , An error has been caught in function 'launch', process 'MainProcess' (1603977), thread 'MainThread' (139680443574080): #1
2023-08-30 19:16:24.166 | INFO | yolox.core.trainer:before_train:126 - args: Namespace(batch_size=4, ckpt='external/weights/yolox_x.pth', devices=1, dist_backend=None, dist_url=None, exp_file='exps/example/mot/yolox_x_ablation.py', experiment_name='yolox_x_ablation', fp16=True, local_rank=0, machine_rank=0, name=None, num_machines=1, occupy=True, opts=[], resume=False, start_epoch=None)
2023-08-30 19:16:24.167 | INFO | yolox.core.trainer:before_train:127 - exp value:
╒══════════════════╤═══════════════════════════╕
│ keys │ values │
╞══════════════════╪═══════════════════════════╡
│ seed │ None │
├──────────────────┼───────────────────────────┤
│ output_dir │ './YOLOX_outputs' │
├──────────────────┼───────────────────────────┤
│ print_interval │ 20 │
├──────────────────┼───────────────────────────┤
│ eval_interval │ 5 │
├──────────────────┼───────────────────────────┤
│ num_classes │ 1 │
├──────────────────┼───────────────────────────┤
│ depth │ 1.33 │
├──────────────────┼───────────────────────────┤
│ width │ 1.25 │
├──────────────────┼───────────────────────────┤
│ act │ 'silu' │
├──────────────────┼───────────────────────────┤
│ data_num_workers │ 4 │
├──────────────────┼───────────────────────────┤
│ input_size │ (800, 1440) │
├──────────────────┼───────────────────────────┤
│ multiscale_range │ 5 │
├──────────────────┼───────────────────────────┤
│ data_dir │ None │
├──────────────────┼───────────────────────────┤
│ train_ann │ 'train_half.json' │
├──────────────────┼───────────────────────────┤
│ val_ann │ 'val_half.json' │
├──────────────────┼───────────────────────────┤
│ test_ann │ 'instances_test2017.json' │
├──────────────────┼───────────────────────────┤
│ mosaic_prob │ 1.0 │
├──────────────────┼───────────────────────────┤
│ mixup_prob │ 1.0 │
├──────────────────┼───────────────────────────┤
│ hsv_prob │ 1.0 │
├──────────────────┼───────────────────────────┤
│ flip_prob │ 0.5 │
├──────────────────┼───────────────────────────┤
│ degrees │ 10.0 │
├──────────────────┼───────────────────────────┤
│ translate │ 0.1 │
├──────────────────┼───────────────────────────┤
│ mosaic_scale │ (0.1, 2) │
├──────────────────┼───────────────────────────┤
│ mixup_scale │ (0.5, 1.5) │
├──────────────────┼───────────────────────────┤
│ shear │ 2.0 │
├──────────────────┼───────────────────────────┤
│ enable_mixup │ True │
├──────────────────┼───────────────────────────┤
│ warmup_epochs │ 1 │
├──────────────────┼───────────────────────────┤
│ max_epoch │ 80 │
├──────────────────┼───────────────────────────┤
│ warmup_lr │ 0 │
├──────────────────┼───────────────────────────┤
│ basic_lr_per_img │ 1.5625e-05 │
├──────────────────┼───────────────────────────┤
│ scheduler │ 'yoloxwarmcos' │
├──────────────────┼───────────────────────────┤
│ no_aug_epochs │ 10 │
├──────────────────┼───────────────────────────┤
│ min_lr_ratio │ 0.05 │
├──────────────────┼───────────────────────────┤
│ ema │ True │
├──────────────────┼───────────────────────────┤
│ weight_decay │ 0.0005 │
├──────────────────┼───────────────────────────┤
│ momentum │ 0.9 │
├──────────────────┼───────────────────────────┤
│ exp_name │ 'yolox_x_ablation' │
├──────────────────┼───────────────────────────┤
│ test_size │ (800, 1440) │
├──────────────────┼───────────────────────────┤
│ test_conf │ 0.1 │
├──────────────────┼───────────────────────────┤
│ nmsthre │ 0.7 │
├──────────────────┼───────────────────────────┤
│ random_size │ (18, 32) │
╘══════════════════╧═══════════════════════════╛
2023-08-30 19:16:24.569 | INFO | yolox.core.trainer:before_train:132 - Model Summary: Params: 99.00M, Gflops: 793.21
2023-08-30 19:16:26.162 | INFO | yolox.core.trainer:resume_train:286 - loading checkpoint for fine tuning
2023-08-30 19:16:26.438 | WARNING | yolox.utils.checkpoint:load_ckpt:24 - Shape of head.cls_preds.0.weight in checkpoint is torch.Size([80, 320, 1, 1]), while shape of head.cls_preds.0.weight in model is torch.Size([1, 320, 1, 1]).
2023-08-30 19:16:26.438 | WARNING | yolox.utils.checkpoint:load_ckpt:24 - Shape of head.cls_preds.0.bias in checkpoint is torch.Size([80]), while shape of head.cls_preds.0.bias in model is torch.Size([1]).
2023-08-30 19:16:26.438 | WARNING | yolox.utils.checkpoint:load_ckpt:24 - Shape of head.cls_preds.1.weight in checkpoint is torch.Size([80, 320, 1, 1]), while shape of head.cls_preds.1.weight in model is torch.Size([1, 320, 1, 1]).
2023-08-30 19:16:26.438 | WARNING | yolox.utils.checkpoint:load_ckpt:24 - Shape of head.cls_preds.1.bias in checkpoint is torch.Size([80]), while shape of head.cls_preds.1.bias in model is torch.Size([1]).
2023-08-30 19:16:26.438 | WARNING | yolox.utils.checkpoint:load_ckpt:24 - Shape of head.cls_preds.2.weight in checkpoint is torch.Size([80, 320, 1, 1]), while shape of head.cls_preds.2.weight in model is torch.Size([1, 320, 1, 1]).
2023-08-30 19:16:26.438 | WARNING | yolox.utils.checkpoint:load_ckpt:24 - Shape of head.cls_preds.2.bias in checkpoint is torch.Size([80]), while shape of head.cls_preds.2.bias in model is torch.Size([1]).
2023-08-30 19:16:26.462 | ERROR | yolox.core.launch:launch:98 - An error has been caught in function 'launch', process 'MainProcess' (1605334), thread 'MainThread' (140146981652288):
Traceback (most recent call last):
File "tools/train.py", line 116, in
launch(
└ <function launch at 0x7f7557fbc1f0>
File "/home/wangtuo/Downloads/TOPICTrack-main/external/YOLOX/yolox/core/launch.py", line 98, in launch
main_func(*args)
│ └ (╒══════════════════╤════════════════════════════════════════════════════════════════════════════════════════════════════════...
└ <function main at 0x7f7551177dc0>
File "tools/train.py", line 101, in main
trainer.train()
│ └ <function Trainer.train at 0x7f75511fd4c0>
└ <yolox.core.trainer.Trainer object at 0x7f7551100a60>
File "/home/wangtuo/Downloads/TOPICTrack-main/external/YOLOX/yolox/core/trainer.py", line 70, in train
self.before_train()
│ └ <function Trainer.before_train at 0x7f755116b9d0>
└ <yolox.core.trainer.Trainer object at 0x7f7551100a60>
File "/home/wangtuo/Downloads/TOPICTrack-main/external/YOLOX/yolox/core/trainer.py", line 149, in before_train
cache_img=self.args.cache,
│ └ Namespace(batch_size=4, ckpt='external/weights/yolox_x.pth', devices=1, dist_backend=None, dist_url=None, exp_file='exps/exam...
└ <yolox.core.trainer.Trainer object at 0x7f7551100a60>
AttributeError: 'Namespace' object has no attribute 'cache'
We checked our release script, ./external/YOLOX/YOLOX/core/trainer. The script does have not cache content. Ensure you're using the trainer.py we provided, or try our latest releases.
2023-08-30 19:16:24.166 | INFO | yolox.core.trainer:before_train:126 - args: Namespace(batch_size=4, ckpt='external/weights/yolox_x.pth', devices=1, dist_backend=None, dist_url=None, exp_file='exps/example/mot/yolox_x_ablation.py', experiment_name='yolox_x_ablation', fp16=True, local_rank=0, machine_rank=0, name=None, num_machines=1, occupy=True, opts=[], resume=False, start_epoch=None) 2023-08-30 19:16:24.167 | INFO | yolox.core.trainer:before_train:127 - exp value: ╒══════════════════╤═══════════════════════════╕ │ keys │ values │ ╞══════════════════╪═══════════════════════════╡ │ seed │ None │ ├──────────────────┼───────────────────────────┤ │ output_dir │ './YOLOX_outputs' │ ├──────────────────┼───────────────────────────┤ │ print_interval │ 20 │ ├──────────────────┼───────────────────────────┤ │ eval_interval │ 5 │ ├──────────────────┼───────────────────────────┤ │ num_classes │ 1 │ ├──────────────────┼───────────────────────────┤ │ depth │ 1.33 │ ├──────────────────┼───────────────────────────┤ │ width │ 1.25 │ ├──────────────────┼───────────────────────────┤ │ act │ 'silu' │ ├──────────────────┼───────────────────────────┤ │ data_num_workers │ 4 │ ├──────────────────┼───────────────────────────┤ │ input_size │ (800, 1440) │ ├──────────────────┼───────────────────────────┤ │ multiscale_range │ 5 │ ├──────────────────┼───────────────────────────┤ │ data_dir │ None │ ├──────────────────┼───────────────────────────┤ │ train_ann │ 'train_half.json' │ ├──────────────────┼───────────────────────────┤ │ val_ann │ 'val_half.json' │ ├──────────────────┼───────────────────────────┤ │ test_ann │ 'instances_test2017.json' │ ├──────────────────┼───────────────────────────┤ │ mosaic_prob │ 1.0 │ ├──────────────────┼───────────────────────────┤ │ mixup_prob │ 1.0 │ ├──────────────────┼───────────────────────────┤ │ hsv_prob │ 1.0 │ ├──────────────────┼───────────────────────────┤ │ flip_prob │ 0.5 │ ├──────────────────┼───────────────────────────┤ │ degrees │ 10.0 │ ├──────────────────┼───────────────────────────┤ │ translate │ 0.1 │ ├──────────────────┼───────────────────────────┤ │ mosaic_scale │ (0.1, 2) │ ├──────────────────┼───────────────────────────┤ │ mixup_scale │ (0.5, 1.5) │ ├──────────────────┼───────────────────────────┤ │ shear │ 2.0 │ ├──────────────────┼───────────────────────────┤ │ enable_mixup │ True │ ├──────────────────┼───────────────────────────┤ │ warmup_epochs │ 1 │ ├──────────────────┼───────────────────────────┤ │ max_epoch │ 80 │ ├──────────────────┼───────────────────────────┤ │ warmup_lr │ 0 │ ├──────────────────┼───────────────────────────┤ │ basic_lr_per_img │ 1.5625e-05 │ ├──────────────────┼───────────────────────────┤ │ scheduler │ 'yoloxwarmcos' │ ├──────────────────┼───────────────────────────┤ │ no_aug_epochs │ 10 │ ├──────────────────┼───────────────────────────┤ │ min_lr_ratio │ 0.05 │ ├──────────────────┼───────────────────────────┤ │ ema │ True │ ├──────────────────┼───────────────────────────┤ │ weight_decay │ 0.0005 │ ├──────────────────┼───────────────────────────┤ │ momentum │ 0.9 │ ├──────────────────┼───────────────────────────┤ │ exp_name │ 'yolox_x_ablation' │ ├──────────────────┼───────────────────────────┤ │ test_size │ (800, 1440) │ ├──────────────────┼───────────────────────────┤ │ test_conf │ 0.1 │ ├──────────────────┼───────────────────────────┤ │ nmsthre │ 0.7 │ ├──────────────────┼───────────────────────────┤ │ random_size │ (18, 32) │ ╘══════════════════╧═══════════════════════════╛ 2023-08-30 19:16:24.569 | INFO | yolox.core.trainer:before_train:132 - Model Summary: Params: 99.00M, Gflops: 793.21 2023-08-30 19:16:26.162 | INFO | yolox.core.trainer:resume_train:286 - loading checkpoint for fine tuning 2023-08-30 19:16:26.438 | WARNING | yolox.utils.checkpoint:load_ckpt:24 - Shape of head.cls_preds.0.weight in checkpoint is torch.Size([80, 320, 1, 1]), while shape of head.cls_preds.0.weight in model is torch.Size([1, 320, 1, 1]). 2023-08-30 19:16:26.438 | WARNING | yolox.utils.checkpoint:load_ckpt:24 - Shape of head.cls_preds.0.bias in checkpoint is torch.Size([80]), while shape of head.cls_preds.0.bias in model is torch.Size([1]). 2023-08-30 19:16:26.438 | WARNING | yolox.utils.checkpoint:load_ckpt:24 - Shape of head.cls_preds.1.weight in checkpoint is torch.Size([80, 320, 1, 1]), while shape of head.cls_preds.1.weight in model is torch.Size([1, 320, 1, 1]). 2023-08-30 19:16:26.438 | WARNING | yolox.utils.checkpoint:load_ckpt:24 - Shape of head.cls_preds.1.bias in checkpoint is torch.Size([80]), while shape of head.cls_preds.1.bias in model is torch.Size([1]). 2023-08-30 19:16:26.438 | WARNING | yolox.utils.checkpoint:load_ckpt:24 - Shape of head.cls_preds.2.weight in checkpoint is torch.Size([80, 320, 1, 1]), while shape of head.cls_preds.2.weight in model is torch.Size([1, 320, 1, 1]). 2023-08-30 19:16:26.438 | WARNING | yolox.utils.checkpoint:load_ckpt:24 - Shape of head.cls_preds.2.bias in checkpoint is torch.Size([80]), while shape of head.cls_preds.2.bias in model is torch.Size([1]). 2023-08-30 19:16:26.462 | ERROR | yolox.core.launch:launch:98 - An error has been caught in function 'launch', process 'MainProcess' (1605334), thread 'MainThread' (140146981652288): Traceback (most recent call last):
File "tools/train.py", line 116, in
launch(
└ <function launch at 0x7f7557fbc1f0>
File "tools/train.py", line 101, in main trainer.train() │ └ <function Trainer.train at 0x7f75511fd4c0> └ <yolox.core.trainer.Trainer object at 0x7f7551100a60>
File "/home/wangtuo/Downloads/TOPICTrack-main/external/YOLOX/yolox/core/trainer.py", line 70, in train self.before_train() │ └ <function Trainer.before_train at 0x7f755116b9d0> └ <yolox.core.trainer.Trainer object at 0x7f7551100a60>
File "/home/wangtuo/Downloads/TOPICTrack-main/external/YOLOX/yolox/core/trainer.py", line 149, in before_train cache_img=self.args.cache, │ └ Namespace(batch_size=4, ckpt='external/weights/yolox_x.pth', devices=1, dist_backend=None, dist_url=None, exp_file='exps/exam... └ <yolox.core.trainer.Trainer object at 0x7f7551100a60>
AttributeError: 'Namespace' object has no attribute 'cache'