mxin262 / SwinTextSpotter

Pytorch re-implementation of Paper: SwinTextSpotter: Scene Text Spotting via Better Synergy between Text Detection and Text Recognition (CVPR 2022)
275 stars 42 forks source link

训练中途报错RuntimeError: The size of tensor a (300) must match the size of tensor b (553) at non-singleton dimension 0 #77

Open che525538919 opened 1 year ago

che525538919 commented 1 year ago

image 请问模型的训练是否对batchSize、imageSize、boundingbox等有要求。 SWINTS-swin-chn_pretrain.yaml :

BASE: "Base-SWINTS_swin.yaml" MODEL: WEIGHTS: "swin_imagenet_pretrain.pth" SWINTS: NUM_PROPOSALS: 300 NUM_CLASSES: 2 REC_HEAD: POOLER_RESOLUTION: (16,48) RESOLUTION: (32, 80) BATCH_SIZE: 16 NUM_CLASSES: 5463 DATASETS: TRAIN: ("totaltext_train",) TEST: ("totaltext_test",) SOLVER: STEPS: (160000,220000) MAX_ITER: 400000 # 260000 CHECKPOINT_PERIOD: 10000 IMS_PER_BATCH: 1 INPUT: FORMAT: "RGB"

che525538919 commented 1 year ago

使用的是自定义的中文字符级别数据集

mxin262 commented 1 year ago

可以尝试需要限制一下gt中的最大数量或者增大queries的数量,目前的默认配置只有300个queries

xiaoxiaoxiao99 commented 1 year ago

你好 请问你用自定义的中文数据集训练成功了吗?想请教一些问题,方便加个联系方式吗?我的邮箱18931787210@163.com