toandaominh1997 / EfficientDet.Pytorch

Implementation EfficientDet: Scalable and Efficient Object Detection in PyTorch
MIT License
1.44k stars 306 forks source link

train erro(coco data load0) #73

Closed Jasper-Bai closed 4 years ago

Jasper-Bai commented 4 years ago

0 epoch: start training.... index created! 0 epoch: start training.... Traceback (most recent call last): File "train.py", line 286, in main() File "train.py", line 279, in main args=(ngpus_per_node, args)) File "/home/baijun/home_storage/anaconda3/envs/yolonn/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 167, in spawn while not spawn_context.join(): File "/home/baijun/home_storage/anaconda3/envs/yolonn/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 114, in join raise Exception(msg) Exception:

-- Process 1 terminated with the following error: Traceback (most recent call last): File "/home/baijun/home_storage/anaconda3/envs/yolonn/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 19, in _wrap fn(i, *args) File "/data/baijun/Projects/EfficientDet-Pytorch/train.py", line 239, in main_worker train(train_loader, model, scheduler, optimizer, epoch, args) File "/data/baijun/Projects/EfficientDet-Pytorch/train.py", line 99, in train for idx, (images, annotations) in enumerate(train_loader): File "/home/baijun/home_storage/anaconda3/envs/yolonn/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 582, in next return self._process_next_batch(batch) File "/home/baijun/home_storage/anaconda3/envs/yolonn/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 606, in _process_next_batch raise Exception("KeyError:" + batch.exc_msg) Exception: KeyError:Traceback (most recent call last): File "/home/baijun/home_storage/anaconda3/envs/yolonn/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 99, in _worker_loop samples = collate_fn([dataset[i] for i in batch_indices]) File "/data/baijun/Projects/EfficientDet-Pytorch/datasets/augmentation.py", line 69, in collater imgs = [s['img'] for s in data] File "/data/baijun/Projects/EfficientDet-Pytorch/datasets/augmentation.py", line 69, in imgs = [s['img'] for s in data] KeyError: 'img'

toandaominh1997 commented 4 years ago

Hi @Jasper-Bai , I have fixed it at commit 133. You can checkout again

Jasper-Bai commented 4 years ago

@toandaominh1997 Thanks for your instant reply.maybe I can go ahead!