microsoft / GLIP

Grounded Language-Image Pre-training
MIT License
2.07k stars 186 forks source link

AttributeError: 'NoneType' object has no attribute 'size' #156

Open DingLing113 opened 5 months ago

DingLing113 commented 5 months ago

微信截图_20240108220204 使用custom_data数据集进行eval,config如下所示 MODEL: ATSS: NUM_CLASSES: 7 # these fields are not used; just a placeholder FCOS: NUM_CLASSES: 7 ROI_BOX_HEAD: NUM_CLASSES: 7 DYHEAD: NUM_CLASSES: 7 DATASETS: REGISTER: coco_train: img_dir: "custom_data/train" ann_file: "custom_data/annotations/train_COCO.json" coco_val: img_dir: "custom_data/val" ann_file: "custom_data/annotations/val_COCO.json" TRAIN: ("coco_train",) TEST: ("coco_val",)

INPUT: MIN_SIZE_TRAIN: 800 MAX_SIZE_TRAIN: 1333 MIN_SIZE_TEST: 800 MAX_SIZE_TEST: 1333 DATALOADER: SIZE_DIVISIBILITY: 32 ASPECT_RATIO_GROUPING: False TEST: IMS_PER_BATCH: 8

执行命令为 python tools/test_grounding_net.py \ --config-file configs/pretrain/glip_Swin_T_O365_GoldG.yaml \ --task_config configs/coco/custom_data.yaml \ --weight MODEL/glip_tiny_model_o365_goldg_cc_sbu.pth \ TEST.IMS_PER_BATCH 1 \ MODEL.DYHEAD.SCORE_AGG "MEAN" \ TEST.EVAL_TASK detection \ MODEL.DYHEAD.FUSE_CONFIG.MLM_LOSS False \ OUTPUT_DIR /root/DL/GLIP/OUTPUT/evl_custom 请问是哪里报错?数据为手动标注的coco格式 image image

425her0 commented 5 months ago

数据集位置不对,建议重新检查一下。

DingLing113 commented 5 months ago

数据集位置不对,建议重新检查一下。

我上传了数据位置截图,请问是哪里不对 image