facebookresearch / GuidedDistillation

Official implementation of the paper "Guided Distillation for Semi-Supervised Instance Segmentation".
Other
35 stars 4 forks source link

KeyError: 'annotations' #4

Closed CStar-777 closed 8 months ago

CStar-777 commented 8 months ago

Hi, This is super impressive work. Unfortunately, I encountered an error while running the second phase(Train semi-supervised model using pretrained checkpoint) of the training code. I hope to receive assistance. INPUT: python3 train_net.py --config-file ./configs/coco/instance-segmentation/maskformer2_R50_bs16_50ep.yaml --num-gpus 4 --num-machines 1 SSL.PERCENTAGE 5 SSL.TRAIN_SSL True SSL.TEACHER_CKPT out/TEATHER/COCO/ResNet50/5/model_best.pth OUTPUT_DIR out/STUDENT/COCO/ResNet50/5 SSL.BURNIN_ITER 30000 OUTPUT: 1

2

CStar-777 commented 8 months ago

I made modifications to the “_train_loader_from_config(cfg, mapper=None, *, dataset=None, sampler=None)” in the “data/build.py”: a6b1c6a08e67d26d8292cd7e095f783

TariqBerrada commented 8 months ago

I found a few lines missing in the dataloader code, it needs to switch the sampler to a standard sampler for the unlabeled dataset. Can you check if it works after pulling the latest commit ?

Otherwise, you can set DATALOADER.SAMPLER_TRAIN = "TrainingSampler" in the config

CStar-777 commented 8 months ago

I found a few lines missing in the dataloader code, it needs to switch the sampler to a standard sampler for the unlabeled dataset. Can you check if it works after pulling the latest commit ?

Otherwise, you can set DATALOADER.SAMPLER_TRAIN = "TrainingSampler" in the config

Thank you for your answer!