Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Training OSTrack on LASOT #119

Open
setarekhosravi opened this issue Aug 18, 2024 · 2 comments
Open

Training OSTrack on LASOT #119

setarekhosravi opened this issue Aug 18, 2024 · 2 comments

Comments

@setarekhosravi
Copy link

Hello Thank you for your great work, I want to train OSTrack on the LASOT dataset.
When I want to train, by the command below:
python tracking/train.py --script ostrack --config vitb_256_mae_32x4_ep300 --save_dir ./output --mode single --nproc_per_node 1 --use_wandb 0

I see this error:

script_name: ostrack.py  config_name: vitb_256_mae_32x4_ep300.yaml
New configuration is shown below.
MODEL configuration: {'PRETRAIN_FILE': 'mae_pretrain_vit_base.pth', 'EXTRA_MERGER': False, 'RETURN_INTER': False, 'RETURN_STAGES': [], 'BACKBONE': {'TYPE': 'vit_base_patch16_224', 'STRIDE': 16, 'MID_PE': False, 'SEP_SEG': False, 'CAT_MODE': 'direct', 'MERGE_LAYER': 0, 'ADD_CLS_TOKEN': False, 'CLS_TOKEN_USE_MODE': 'ignore', 'CE_LOC': [], 'CE_KEEP_RATIO': [], 'CE_TEMPLATE_RANGE': 'ALL'}, 'HEAD': {'TYPE': 'CENTER', 'NUM_CHANNELS': 256}}


TRAIN configuration: {'LR': 0.0004, 'WEIGHT_DECAY': 0.0001, 'EPOCH': 300, 'LR_DROP_EPOCH': 240, 'BATCH_SIZE': 32, 'NUM_WORKER': 10, 'OPTIMIZER': 'ADAMW', 'BACKBONE_MULTIPLIER': 0.1, 'GIOU_WEIGHT': 2.0, 'L1_WEIGHT': 5.0, 'FREEZE_LAYERS': [0], 'PRINT_INTERVAL': 50, 'VAL_EPOCH_INTERVAL': 20, 'GRAD_CLIP_NORM': 0.1, 'AMP': False, 'CE_START_EPOCH': 20, 'CE_WARM_EPOCH': 80, 'DROP_PATH_RATE': 0.1, 'SCHEDULER': {'TYPE': 'step', 'DECAY_RATE': 0.1}}


DATA configuration: {'SAMPLER_MODE': 'causal', 'MEAN': [0.485, 0.456, 0.406], 'STD': [0.229, 0.224, 0.225], 'MAX_SAMPLE_INTERVAL': 200, 'TRAIN': {'DATASETS_NAME': ['LASOT'], 'DATASETS_RATIO': [1, 1, 1, 1], 'SAMPLE_PER_EPOCH': 60000}, 'VAL': {'DATASETS_NAME': ['GOT10K_votval'], 'DATASETS_RATIO': [1], 'SAMPLE_PER_EPOCH': 10000}, 'SEARCH': {'SIZE': 256, 'FACTOR': 4.0, 'CENTER_JITTER': 3, 'SCALE_JITTER': 0.25, 'NUMBER': 1}, 'TEMPLATE': {'NUMBER': 1, 'SIZE': 128, 'FACTOR': 2.0, 'CENTER_JITTER': 0, 'SCALE_JITTER': 0}}


TEST configuration: {'TEMPLATE_FACTOR': 2.0, 'TEMPLATE_SIZE': 128, 'SEARCH_FACTOR': 4.0, 'SEARCH_SIZE': 256, 'EPOCH': 300}


sampler_mode causal
Load pretrained model from: /home/setare/Vision/Work/Tracking/Final Pro/OSTrack/lib/models/ostrack/../../../pretrained_models/mae_pretrain_vit_base.pth
Learnable parameters are shown below.
backbone.cls_token
backbone.pos_embed
backbone.pos_embed_z
backbone.pos_embed_x
backbone.patch_embed.proj.weight
backbone.patch_embed.proj.bias
backbone.blocks.0.norm1.weight
backbone.blocks.0.norm1.bias
backbone.blocks.0.attn.qkv.weight
backbone.blocks.0.attn.qkv.bias
backbone.blocks.0.attn.proj.weight
backbone.blocks.0.attn.proj.bias
backbone.blocks.0.norm2.weight
backbone.blocks.0.norm2.bias
backbone.blocks.0.mlp.fc1.weight
backbone.blocks.0.mlp.fc1.bias
backbone.blocks.0.mlp.fc2.weight
backbone.blocks.0.mlp.fc2.bias
backbone.blocks.1.norm1.weight
backbone.blocks.1.norm1.bias
backbone.blocks.1.attn.qkv.weight
backbone.blocks.1.attn.qkv.bias
backbone.blocks.1.attn.proj.weight
backbone.blocks.1.attn.proj.bias
backbone.blocks.1.norm2.weight
backbone.blocks.1.norm2.bias
backbone.blocks.1.mlp.fc1.weight
backbone.blocks.1.mlp.fc1.bias
backbone.blocks.1.mlp.fc2.weight
backbone.blocks.1.mlp.fc2.bias
backbone.blocks.2.norm1.weight
backbone.blocks.2.norm1.bias
backbone.blocks.2.attn.qkv.weight
backbone.blocks.2.attn.qkv.bias
backbone.blocks.2.attn.proj.weight
backbone.blocks.2.attn.proj.bias
backbone.blocks.2.norm2.weight
backbone.blocks.2.norm2.bias
backbone.blocks.2.mlp.fc1.weight
backbone.blocks.2.mlp.fc1.bias
backbone.blocks.2.mlp.fc2.weight
backbone.blocks.2.mlp.fc2.bias
backbone.blocks.3.norm1.weight
backbone.blocks.3.norm1.bias
backbone.blocks.3.attn.qkv.weight
backbone.blocks.3.attn.qkv.bias
backbone.blocks.3.attn.proj.weight
backbone.blocks.3.attn.proj.bias
backbone.blocks.3.norm2.weight
backbone.blocks.3.norm2.bias
backbone.blocks.3.mlp.fc1.weight
backbone.blocks.3.mlp.fc1.bias
backbone.blocks.3.mlp.fc2.weight
backbone.blocks.3.mlp.fc2.bias
backbone.blocks.4.norm1.weight
backbone.blocks.4.norm1.bias
backbone.blocks.4.attn.qkv.weight
backbone.blocks.4.attn.qkv.bias
backbone.blocks.4.attn.proj.weight
backbone.blocks.4.attn.proj.bias
backbone.blocks.4.norm2.weight
backbone.blocks.4.norm2.bias
backbone.blocks.4.mlp.fc1.weight
backbone.blocks.4.mlp.fc1.bias
backbone.blocks.4.mlp.fc2.weight
backbone.blocks.4.mlp.fc2.bias
backbone.blocks.5.norm1.weight
backbone.blocks.5.norm1.bias
backbone.blocks.5.attn.qkv.weight
backbone.blocks.5.attn.qkv.bias
backbone.blocks.5.attn.proj.weight
backbone.blocks.5.attn.proj.bias
backbone.blocks.5.norm2.weight
backbone.blocks.5.norm2.bias
backbone.blocks.5.mlp.fc1.weight
backbone.blocks.5.mlp.fc1.bias
backbone.blocks.5.mlp.fc2.weight
backbone.blocks.5.mlp.fc2.bias
backbone.blocks.6.norm1.weight
backbone.blocks.6.norm1.bias
backbone.blocks.6.attn.qkv.weight
backbone.blocks.6.attn.qkv.bias
backbone.blocks.6.attn.proj.weight
backbone.blocks.6.attn.proj.bias
backbone.blocks.6.norm2.weight
backbone.blocks.6.norm2.bias
backbone.blocks.6.mlp.fc1.weight
backbone.blocks.6.mlp.fc1.bias
backbone.blocks.6.mlp.fc2.weight
backbone.blocks.6.mlp.fc2.bias
backbone.blocks.7.norm1.weight
backbone.blocks.7.norm1.bias
backbone.blocks.7.attn.qkv.weight
backbone.blocks.7.attn.qkv.bias
backbone.blocks.7.attn.proj.weight
backbone.blocks.7.attn.proj.bias
backbone.blocks.7.norm2.weight
backbone.blocks.7.norm2.bias
backbone.blocks.7.mlp.fc1.weight
backbone.blocks.7.mlp.fc1.bias
backbone.blocks.7.mlp.fc2.weight
backbone.blocks.7.mlp.fc2.bias
backbone.blocks.8.norm1.weight
backbone.blocks.8.norm1.bias
backbone.blocks.8.attn.qkv.weight
backbone.blocks.8.attn.qkv.bias
backbone.blocks.8.attn.proj.weight
backbone.blocks.8.attn.proj.bias
backbone.blocks.8.norm2.weight
backbone.blocks.8.norm2.bias
backbone.blocks.8.mlp.fc1.weight
backbone.blocks.8.mlp.fc1.bias
backbone.blocks.8.mlp.fc2.weight
backbone.blocks.8.mlp.fc2.bias
backbone.blocks.9.norm1.weight
backbone.blocks.9.norm1.bias
backbone.blocks.9.attn.qkv.weight
backbone.blocks.9.attn.qkv.bias
backbone.blocks.9.attn.proj.weight
backbone.blocks.9.attn.proj.bias
backbone.blocks.9.norm2.weight
backbone.blocks.9.norm2.bias
backbone.blocks.9.mlp.fc1.weight
backbone.blocks.9.mlp.fc1.bias
backbone.blocks.9.mlp.fc2.weight
backbone.blocks.9.mlp.fc2.bias
backbone.blocks.10.norm1.weight
backbone.blocks.10.norm1.bias
backbone.blocks.10.attn.qkv.weight
backbone.blocks.10.attn.qkv.bias
backbone.blocks.10.attn.proj.weight
backbone.blocks.10.attn.proj.bias
backbone.blocks.10.norm2.weight
backbone.blocks.10.norm2.bias
backbone.blocks.10.mlp.fc1.weight
backbone.blocks.10.mlp.fc1.bias
backbone.blocks.10.mlp.fc2.weight
backbone.blocks.10.mlp.fc2.bias
backbone.blocks.11.norm1.weight
backbone.blocks.11.norm1.bias
backbone.blocks.11.attn.qkv.weight
backbone.blocks.11.attn.qkv.bias
backbone.blocks.11.attn.proj.weight
backbone.blocks.11.attn.proj.bias
backbone.blocks.11.norm2.weight
backbone.blocks.11.norm2.bias
backbone.blocks.11.mlp.fc1.weight
backbone.blocks.11.mlp.fc1.bias
backbone.blocks.11.mlp.fc2.weight
backbone.blocks.11.mlp.fc2.bias
backbone.norm.weight
backbone.norm.bias
box_head.conv1_ctr.0.weight
box_head.conv1_ctr.0.bias
box_head.conv1_ctr.1.weight
box_head.conv1_ctr.1.bias
box_head.conv2_ctr.0.weight
box_head.conv2_ctr.0.bias
box_head.conv2_ctr.1.weight
box_head.conv2_ctr.1.bias
box_head.conv3_ctr.0.weight
box_head.conv3_ctr.0.bias
box_head.conv3_ctr.1.weight
box_head.conv3_ctr.1.bias
box_head.conv4_ctr.0.weight
box_head.conv4_ctr.0.bias
box_head.conv4_ctr.1.weight
box_head.conv4_ctr.1.bias
box_head.conv5_ctr.weight
box_head.conv5_ctr.bias
box_head.conv1_offset.0.weight
box_head.conv1_offset.0.bias
box_head.conv1_offset.1.weight
box_head.conv1_offset.1.bias
box_head.conv2_offset.0.weight
box_head.conv2_offset.0.bias
box_head.conv2_offset.1.weight
box_head.conv2_offset.1.bias
box_head.conv3_offset.0.weight
box_head.conv3_offset.0.bias
box_head.conv3_offset.1.weight
box_head.conv3_offset.1.bias
box_head.conv4_offset.0.weight
box_head.conv4_offset.0.bias
box_head.conv4_offset.1.weight
box_head.conv4_offset.1.bias
box_head.conv5_offset.weight
box_head.conv5_offset.bias
box_head.conv1_size.0.weight
box_head.conv1_size.0.bias
box_head.conv1_size.1.weight
box_head.conv1_size.1.bias
box_head.conv2_size.0.weight
box_head.conv2_size.0.bias
box_head.conv2_size.1.weight
box_head.conv2_size.1.bias
box_head.conv3_size.0.weight
box_head.conv3_size.0.bias
box_head.conv3_size.1.weight
box_head.conv3_size.1.bias
box_head.conv4_size.0.weight
box_head.conv4_size.0.bias
box_head.conv4_size.1.weight
box_head.conv4_size.1.bias
box_head.conv5_size.weight
box_head.conv5_size.bias
checkpoints will be saved to /home/setare/Vision/Work/Tracking/Final Pro/OSTrack/output/checkpoints
Training crashed at epoch -1
Traceback for the error!
Traceback (most recent call last):
  File "/home/setare/Vision/Work/Tracking/Final Pro/OSTrack/lib/train/../../lib/train/trainers/base_trainer.py", line 75, in train
    self.load_checkpoint()
  File "/home/setare/Vision/Work/Tracking/Final Pro/OSTrack/lib/train/../../lib/train/trainers/base_trainer.py", line 196, in load_checkpoint
    assert net_type == checkpoint_dict['net_type'], 'Network is not of correct type.'
KeyError: 'net_type'

Restarting training from last epoch ...
Finished training!

Could you help me to solve the problem?

@setarekhosravi
Copy link
Author

I have the same problem when I change the config. I have downloaded vitb_256_mae_32x4_ep300, vitb_256_mae_ce_32x4_ep300 weights and put in projectroot/output/checkpoints/train/ostrack.

@Z-Z188
Copy link

Z-Z188 commented Sep 4, 2024

你看看工作目录下有没有output文件夹,删除之后再试试呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants