OneshotDet
OneshotDet copied to clipboard
Can't evaluate on supplied models.
I tried to train using command from readme:
CUDA_DEVICE_ORDER=PCI_BUS_ID CUDA_VISIBLE_DEVICES=0 python -m torch.distributed.launch --nproc_per_node=1 --master_port=$((RANDOM + 10000)) tools/train_net.py --skip-test --use-tensorboard --config-file configs/fcos/2019_10_25_vanilla_siamse_backbone.yaml DATALOADER.NUM_WORKERS 2 OUTPUT_DIR training_dir/2019_10_25_vanilla_siamse_backbone SOLVER.IMS_PER_BATCH 6
If use supplied config configs/fcos/2019_10_25_vanilla_siamse_backbone.yaml I get this error as I have not this model.
FileNotFoundError: [Errno 2] No such file or directory: 'training_dir/fsfcos_0918_close/model_0040000.pth'
I tried to download pretrain model FCOS_R_50_FPN_1x_center_giou and use by replacing weight in MODEL.WEIGHT in config, but I got an error:
RuntimeError: Error(s) in loading state_dict for GeneralizedRCNN:
size mismatch for rpn.head.cls_logits.weight: copying a param with shape torch.Size([80, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([1, 256, 3, 3]).
size mismatch for rpn.head.cls_logits.bias: copying a param with shape torch.Size([80]) from checkpoint, the shape in current model is torch.Size([1]).
Hi! The pretrained model is for the original FCOS, not our model. I would recommend training from scratch. Specifically, this error is due to the one-shot setting, the 80 classes from COCO becomes 1.
This fcos is "FCOS_R_50_FPN_1x_center_giou" from pretrained models(baidu link)
I wanted to train my fcos but there is no file "configs/fcos/fcos_R_50_FPN_1x_center_giou.yaml." The link to this config in https://github.com/RyanXLi/OneshotDet/tree/master/pretrain_models is broken. If you could upload this config then this would be great.
@RyanXLi