lyuwenyu / RT-DETR

[CVPR 2024] Official RT-DETR (RTDETR paddle pytorch), Real-Time DEtection TRansformer, DETRs Beat YOLOs on Real-time Object Detection. 🔥 🔥 🔥
Apache License 2.0
2.61k stars 303 forks source link

FileNotFoundError: [Errno 2] No such file or directory: '../dataset/coco/train/_annotations.coco.json' #165

Open fang-lg opened 11 months ago

fang-lg commented 11 months ago

我的文件存在,路径也是正确的。为什么会报这个错误呢? task: detection

num_classes: 80 remap_mscoco_category: True

train_dataloader: type: DataLoader dataset: type: CocoDetection

img_folder: ../dataset/coco/train2017/

# ann_file: ../dataset/coco/annotations/instances_val2017.json
# ann_file: miniconda3/envs/torch2/RT-DETR-main/rtdetr_pytorch/configs/dataset/coco/annotations/instances_train2017.json
img_folder: ../dataset/coco/train/
ann_file: ../dataset/coco/train/_annotations.coco.json

transforms:
  type: Compose
  ops: ~

shuffle: True batch_size: 8 num_workers: 4 drop_last: True

val_dataloader: type: DataLoader dataset: type: CocoDetection

img_folder: ../dataset/coco/val2017/

# ann_file: ../dataset/coco/annotations/instances_val2017.json

img_folder: ../dataset/coco/valid/
ann_file: ../dataset/coco/valid/_annotations.coco.json
transforms:
  type: Compose
  ops: ~ 

shuffle: False batch_size: 8 num_workers: 4 drop_last: False

tommyjiang commented 10 months ago

建议用绝对路径试试