open-mmlab / mmocr

OpenMMLab Text Detection, Recognition and Understanding Toolbox
https://mmocr.readthedocs.io/en/dev-1.x/
Apache License 2.0
4.37k stars 755 forks source link

AssertionError while training DRRG model with totaltext dataset, thanks for read and help #346

Closed whynot08 closed 3 years ago

whynot08 commented 3 years ago

When I try to train drrg in dataset totaltext, There are some problems while they didn't happen in icdar2015 and ctw1500. I checked the totaltext dataset and discovered that it seems labled irrefularly, data samples are lable with 4 coordinates, 6 coordinates or more coordinates. I would like to know whether such a reason caused the AssertionError and how to solve it.

2021-07-03 05:53:22,382 - mmocr - INFO - Set random seed to 1, deterministic: True 2021-07-03 05:53:22,784 - mmdet - INFO - load model from: /home/aisvr/Public/hyc/mmocr_1/checkpoints/resnet50.pth 2021-07-03 05:53:22,784 - mmdet - INFO - Use load_from_local loader 2021-07-03 05:53:23,046 - mmdet - WARNING - The model and loaded state dict do not match exactly

unexpected key in source state_dict: fc.weight, fc.bias

loading annotations into memory... Done (t=0.06s) creating index... index created! fatal: Not a git repository (or any parent up to mount point /home) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). /home/aisvr/Public/hyc/mmocr_fce_1/mmocr/apis/train.py:76: UserWarning: config is now expected to have a runner section, please set runner in your config. 'please set runner in your config.', UserWarning) loading annotations into memory... Done (t=0.01s) creating index... index created! 2021-07-03 05:53:25,758 - mmocr - INFO - Start running, host: root@876380069dac, work_dir: /home/aisvr/Public/hyc/mmocr_fce_1/work_dirs/drrg_res 2021-07-03 05:53:25,758 - mmocr - INFO - workflow: [('train', 1)], max: 800 epochs 2021-07-03 05:53:30,691 - mmocr - INFO - Epoch [1][1/309] lr: 7.000e-03, eta: 13 days, 19:06:32, time: 4.822, data_time: 3.752, memory: 7285, loss_text: 0.6934, loss_center: 1.0398, loss_height: 4.2561, loss_sin: 0.2681, loss_cos: 0.3528, loss_gcn: 0.6321, loss: 7.2423 2021-07-03 05:53:31,702 - mmocr - INFO - Epoch [1][2/309] lr: 7.000e-03, eta: 8 days, 9:49:50, time: 1.057, data_time: 0.270, memory: 7565, loss_text: 0.6920, loss_center: 1.0393, loss_height: 4.6738, loss_sin: 0.0494, loss_cos: 0.1509, loss_gcn: 0.6370, loss: 7.2423 2021-07-03 05:53:32,498 - mmocr - INFO - Epoch [1][3/309] lr: 7.000e-03, eta: 6 days, 8:45:30, time: 0.795, data_time: 0.241, memory: 7565, loss_text: 0.6904, loss_center: 1.0370, loss_height: 4.6252, loss_sin: 0.0454, loss_cos: 0.1749, loss_gcn: 0.6135, loss: 7.1863 2021-07-03 05:53:33,273 - mmocr - INFO - Epoch [1][4/309] lr: 7.000e-03, eta: 5 days, 7:52:26, time: 0.775, data_time: 0.237, memory: 7565, loss_text: 0.6882, loss_center: 1.0326, loss_height: 4.3717, loss_sin: 0.0168, loss_cos: 0.1251, loss_gcn: 0.6238, loss: 6.8581 2021-07-03 05:53:34,048 - mmocr - INFO - Epoch [1][5/309] lr: 7.000e-03, eta: 4 days, 16:56:30, time: 0.775, data_time: 0.211, memory: 7565, loss_text: 0.6854, loss_center: 1.0254, loss_height: 4.0952, loss_sin: 0.0852, loss_cos: 0.2597, loss_gcn: 0.5938, loss: 6.7447 2021-07-03 05:53:34,765 - mmocr - INFO - Epoch [1][6/309] lr: 7.000e-03, eta: 4 days, 6:18:53, time: 0.716, data_time: 0.214, memory: 7565, loss_text: 0.6817, loss_center: 1.0155, loss_height: 4.3611, loss_sin: 0.0918, loss_cos: 0.1192, loss_gcn: 0.5867, loss: 6.8561 2021-07-03 05:53:35,511 - mmocr - INFO - Epoch [1][7/309] lr: 7.000e-03, eta: 3 days, 23:01:16, time: 0.747, data_time: 0.230, memory: 7565, loss_text: 0.6770, loss_center: 1.0020, loss_height: 4.4039, loss_sin: 0.0544, loss_cos: 0.2174, loss_gcn: 0.5698, loss: 6.9245 2021-07-03 05:53:36,565 - mmocr - INFO - Epoch [1][8/309] lr: 7.000e-03, eta: 3 days, 20:11:16, time: 1.054, data_time: 0.211, memory: 7566, loss_text: 0.6712, loss_center: 0.9840, loss_height: 4.3944, loss_sin: 0.0059, loss_cos: 0.1104, loss_gcn: 0.6188, loss: 6.7848 2021-07-03 05:53:37,470 - mmocr - INFO - Epoch [1][9/309] lr: 7.000e-03, eta: 3 days, 16:51:06, time: 0.905, data_time: 0.238, memory: 7566, loss_text: 0.6647, loss_center: 0.9638, loss_height: 3.9284, loss_sin: 0.0333, loss_cos: 0.1407, loss_gcn: 0.5482, loss: 6.2790 2021-07-03 05:53:38,193 - mmocr - INFO - Epoch [1][10/309] lr: 7.000e-03, eta: 3 days, 12:55:22, time: 0.722, data_time: 0.217, memory: 7566, loss_text: 0.6571, loss_center: 0.9393, loss_height: 4.5955, loss_sin: 0.0235, loss_cos: 0.1614, loss_gcn: 0.5779, loss: 6.9546 2021-07-03 05:53:39,068 - mmocr - INFO - Epoch [1][11/309] lr: 7.000e-03, eta: 3 days, 10:40:01, time: 0.875, data_time: 0.236, memory: 7566, loss_text: 0.6487, loss_center: 0.9143, loss_height: 4.1835, loss_sin: 0.0347, loss_cos: 0.0820, loss_gcn: 0.5931, loss: 6.4563 2021-07-03 05:53:39,856 - mmocr - INFO - Epoch [1][12/309] lr: 7.000e-03, eta: 3 days, 8:17:19, time: 0.788, data_time: 0.253, memory: 7566, loss_text: 0.6397, loss_center: 0.8865, loss_height: 4.3839, loss_sin: 0.0168, loss_cos: 0.1905, loss_gcn: 0.5845, loss: 6.7019 2021-07-03 05:53:40,598 - mmocr - INFO - Epoch [1][13/309] lr: 7.000e-03, eta: 3 days, 6:01:42, time: 0.741, data_time: 0.187, memory: 7566, loss_text: 0.6304, loss_center: 0.8622, loss_height: 4.4688, loss_sin: 0.0372, loss_cos: 0.0897, loss_gcn: 0.5194, loss: 6.6077 2021-07-03 05:53:41,496 - mmocr - INFO - Epoch [1][14/309] lr: 7.000e-03, eta: 3 days, 4:51:22, time: 0.897, data_time: 0.244, memory: 7566, loss_text: 0.6209, loss_center: 0.8287, loss_height: 4.0151, loss_sin: 0.0400, loss_cos: 0.1762, loss_gcn: 0.6010, loss: 6.2820 2021-07-03 05:53:42,489 - mmocr - INFO - Epoch [1][15/309] lr: 7.000e-03, eta: 3 days, 4:16:50, time: 0.994, data_time: 0.377, memory: 7566, loss_text: 0.6120, loss_center: 0.8095, loss_height: 3.9925, loss_sin: 0.0791, loss_cos: 0.2362, loss_gcn: 0.6066, loss: 6.3359 2021-07-03 05:53:43,159 - mmocr - INFO - Epoch [1][16/309] lr: 7.000e-03, eta: 3 days, 2:23:09, time: 0.670, data_time: 0.069, memory: 7566, loss_text: 0.6031, loss_center: 0.7839, loss_height: 3.8200, loss_sin: 0.0413, loss_cos: 0.1084, loss_gcn: 0.5038, loss: 5.8605 2021-07-03 05:53:43,938 - mmocr - INFO - Epoch [1][17/309] lr: 7.000e-03, eta: 3 days, 1:09:43, time: 0.780, data_time: 0.205, memory: 7566, loss_text: 0.5948, loss_center: 0.7708, loss_height: 4.6687, loss_sin: 0.0026, loss_cos: 0.0693, loss_gcn: 0.5841, loss: 6.6903 2021-07-03 05:53:45,045 - mmocr - INFO - Epoch [1][18/309] lr: 7.000e-03, eta: 3 days, 1:18:58, time: 1.106, data_time: 0.258, memory: 7566, loss_text: 0.5876, loss_center: 0.7565, loss_height: 3.9006, loss_sin: 0.0031, loss_cos: 0.1530, loss_gcn: 0.6355, loss: 6.0364 2021-07-03 05:53:46,038 - mmocr - INFO - Epoch [1][19/309] lr: 7.000e-03, eta: 3 days, 1:03:32, time: 0.997, data_time: 0.251, memory: 7566, loss_text: 0.5815, loss_center: 0.7483, loss_height: 4.1268, loss_sin: 0.0312, loss_cos: 0.1820, loss_gcn: 0.4618, loss: 6.1316 2021-07-03 05:53:46,935 - mmocr - INFO - Epoch [1][20/309] lr: 7.000e-03, eta: 3 days, 0:28:25, time: 0.894, data_time: 0.254, memory: 7566, loss_text: 0.5764, loss_center: 0.7465, loss_height: 4.1593, loss_sin: 0.0728, loss_cos: 0.1533, loss_gcn: 0.5496, loss: 6.2578 2021-07-03 05:53:47,754 - mmocr - INFO - Epoch [1][21/309] lr: 7.000e-03, eta: 2 days, 23:41:53, time: 0.818, data_time: 0.232, memory: 7566, loss_text: 0.5719, loss_center: 0.7352, loss_height: 4.2271, loss_sin: 0.0444, loss_cos: 0.2473, loss_gcn: 0.6117, loss: 6.4375 2021-07-03 05:53:48,585 - mmocr - INFO - Epoch [1][22/309] lr: 7.000e-03, eta: 2 days, 23:02:05, time: 0.832, data_time: 0.277, memory: 7566, loss_text: 0.5686, loss_center: 0.7410, loss_height: 4.3646, loss_sin: 0.0152, loss_cos: 0.1255, loss_gcn: 0.4443, loss: 6.2593 2021-07-03 05:53:49,364 - mmocr - INFO - Epoch [1][23/309] lr: 7.000e-03, eta: 2 days, 22:16:09, time: 0.778, data_time: 0.200, memory: 7566, loss_text: 0.5667, loss_center: 0.7143, loss_height: 3.7701, loss_sin: 0.0069, loss_cos: 0.0930, loss_gcn: 0.6573, loss: 5.8083 2021-07-03 05:53:50,120 - mmocr - INFO - Epoch [1][24/309] lr: 7.000e-03, eta: 2 days, 21:30:16, time: 0.756, data_time: 0.230, memory: 7566, loss_text: 0.5654, loss_center: 0.7433, loss_height: 4.2064, loss_sin: 0.0146, loss_cos: 0.2056, loss_gcn: 0.4800, loss: 6.2152 2021-07-03 05:53:50,996 - mmocr - INFO - Epoch [1][25/309] lr: 7.000e-03, eta: 2 days, 21:07:44, time: 0.876, data_time: 0.222, memory: 7566, loss_text: 0.5647, loss_center: 0.7175, loss_height: 3.7079, loss_sin: 0.0658, loss_cos: 0.1532, loss_gcn: 0.6498, loss: 5.8589 2021-07-03 05:53:51,913 - mmocr - INFO - Epoch [1][26/309] lr: 7.000e-03, eta: 2 days, 20:53:35, time: 0.918, data_time: 0.270, memory: 7566, loss_text: 0.5647, loss_center: 0.7218, loss_height: 3.6319, loss_sin: 0.0257, loss_cos: 0.1318, loss_gcn: 0.6486, loss: 5.7245 2021-07-03 05:53:52,685 - mmocr - INFO - Epoch [1][27/309] lr: 7.000e-03, eta: 2 days, 20:18:04, time: 0.771, data_time: 0.212, memory: 7566, loss_text: 0.5644, loss_center: 0.7581, loss_height: 4.0951, loss_sin: 0.0209, loss_cos: 0.1536, loss_gcn: 0.4322, loss: 6.0243 2021-07-03 05:53:53,541 - mmocr - INFO - Epoch [1][28/309] lr: 7.000e-03, eta: 2 days, 19:57:39, time: 0.856, data_time: 0.215, memory: 7566, loss_text: 0.5654, loss_center: 0.7437, loss_height: 4.1792, loss_sin: 0.0483, loss_cos: 0.1931, loss_gcn: 0.5544, loss: 6.2841 2021-07-03 05:53:54,589 - mmocr - INFO - Epoch [1][29/309] lr: 7.000e-03, eta: 2 days, 20:06:00, time: 1.049, data_time: 0.241, memory: 7566, loss_text: 0.5662, loss_center: 0.7555, loss_height: 3.6119, loss_sin: 0.0033, loss_cos: 0.0871, loss_gcn: 0.6210, loss: 5.6450 2021-07-03 05:53:55,498 - mmocr - INFO - Epoch [1][30/309] lr: 7.000e-03, eta: 2 days, 19:54:35, time: 0.909, data_time: 0.247, memory: 7566, loss_text: 0.5667, loss_center: 0.7669, loss_height: 3.8632, loss_sin: 0.0022, loss_cos: 0.0762, loss_gcn: 0.5485, loss: 5.8236 2021-07-03 05:53:56,241 - mmocr - INFO - Epoch [1][31/309] lr: 7.000e-03, eta: 2 days, 19:21:48, time: 0.742, data_time: 0.216, memory: 7566, loss_text: 0.5682, loss_center: 0.7693, loss_height: 3.7740, loss_sin: 0.0172, loss_cos: 0.1090, loss_gcn: 0.5927, loss: 5.8305 2021-07-03 05:53:57,151 - mmocr - INFO - Epoch [1][32/309] lr: 7.000e-03, eta: 2 days, 19:12:51, time: 0.912, data_time: 0.220, memory: 7566, loss_text: 0.5682, loss_center: 0.7594, loss_height: 3.9449, loss_sin: 0.0622, loss_cos: 0.1774, loss_gcn: 0.4820, loss: 5.9941 2021-07-03 05:53:58,072 - mmocr - INFO - Epoch [1][33/309] lr: 7.000e-03, eta: 2 days, 19:05:22, time: 0.919, data_time: 0.241, memory: 7566, loss_text: 0.5695, loss_center: 0.7841, loss_height: 3.6652, loss_sin: 0.0223, loss_cos: 0.1614, loss_gcn: 0.6105, loss: 5.8129 2021-07-03 05:53:58,834 - mmocr - INFO - Epoch [1][34/309] lr: 7.000e-03, eta: 2 days, 18:39:22, time: 0.763, data_time: 0.251, memory: 7566, loss_text: 0.5699, loss_center: 0.7677, loss_height: 4.0811, loss_sin: 0.0573, loss_cos: 0.2040, loss_gcn: 0.3388, loss: 6.0188 2021-07-03 05:53:59,735 - mmocr - INFO - Epoch [1][35/309] lr: 7.000e-03, eta: 2 days, 18:31:00, time: 0.900, data_time: 0.209, memory: 7566, loss_text: 0.5712, loss_center: 0.7512, loss_height: 3.1095, loss_sin: 0.0844, loss_cos: 0.1383, loss_gcn: 0.6860, loss: 5.3406 2021-07-03 05:54:00,723 - mmocr - INFO - Epoch [1][36/309] lr: 7.000e-03, eta: 2 days, 18:33:04, time: 0.987, data_time: 0.219, memory: 7566, loss_text: 0.5703, loss_center: 0.7534, loss_height: 3.6907, loss_sin: 0.0353, loss_cos: 0.1289, loss_gcn: 0.4675, loss: 5.6461 2021-07-03 05:54:01,577 - mmocr - INFO - Epoch [1][37/309] lr: 7.000e-03, eta: 2 days, 18:20:24, time: 0.856, data_time: 0.248, memory: 7566, loss_text: 0.5706, loss_center: 0.7431, loss_height: 3.5986, loss_sin: 0.0008, loss_cos: 0.0474, loss_gcn: 0.5400, loss: 5.5005 2021-07-03 05:54:02,276 - mmocr - INFO - Epoch [1][38/309] lr: 7.000e-03, eta: 2 days, 17:51:23, time: 0.699, data_time: 0.229, memory: 7566, loss_text: 0.5706, loss_center: 0.7530, loss_height: 4.0849, loss_sin: 0.0328, loss_cos: 0.2434, loss_gcn: 0.4479, loss: 6.1326 2021-07-03 05:54:03,112 - mmocr - INFO - Epoch [1][39/309] lr: 7.000e-03, eta: 2 days, 17:38:14, time: 0.835, data_time: 0.233, memory: 7566, loss_text: 0.5697, loss_center: 0.7557, loss_height: 3.9193, loss_sin: 0.0296, loss_cos: 0.1600, loss_gcn: 0.5687, loss: 6.0029 2021-07-03 05:54:03,966 - mmocr - INFO - Epoch [1][40/309] lr: 7.000e-03, eta: 2 days, 17:27:46, time: 0.855, data_time: 0.260, memory: 7566, loss_text: 0.5710, loss_center: 0.7482, loss_height: 3.5182, loss_sin: 0.0520, loss_cos: 0.1402, loss_gcn: 0.5112, loss: 5.5410 2021-07-03 05:54:04,766 - mmocr - INFO - Epoch [1][41/309] lr: 7.000e-03, eta: 2 days, 17:12:25, time: 0.801, data_time: 0.252, memory: 7566, loss_text: 0.5699, loss_center: 0.7192, loss_height: 3.1246, loss_sin: 0.0360, loss_cos: 0.0689, loss_gcn: 0.5814, loss: 5.0999 2021-07-03 05:54:05,563 - mmocr - INFO - Epoch [1][42/309] lr: 7.000e-03, eta: 2 days, 16:57:21, time: 0.796, data_time: 0.247, memory: 7566, loss_text: 0.5682, loss_center: 0.7363, loss_height: 3.8977, loss_sin: 0.0004, loss_cos: 0.0419, loss_gcn: 0.5749, loss: 5.8193 2021-07-03 05:54:06,560 - mmocr - INFO - Epoch [1][43/309] lr: 7.000e-03, eta: 2 days, 17:02:12, time: 0.997, data_time: 0.226, memory: 7567, loss_text: 0.5677, loss_center: 0.7355, loss_height: 4.1193, loss_sin: 0.0170, loss_cos: 0.1309, loss_gcn: 0.6168, loss: 6.1873 2021-07-03 05:54:07,418 - mmocr - INFO - Epoch [1][44/309] lr: 7.000e-03, eta: 2 days, 16:53:53, time: 0.859, data_time: 0.220, memory: 7567, loss_text: 0.5682, loss_center: 0.7250, loss_height: 3.2230, loss_sin: 0.1150, loss_cos: 0.2311, loss_gcn: 0.5093, loss: 5.3717 2021-07-03 05:54:08,248 - mmocr - INFO - Epoch [1][45/309] lr: 7.000e-03, eta: 2 days, 16:43:16, time: 0.829, data_time: 0.219, memory: 7567, loss_text: 0.5672, loss_center: 0.7414, loss_height: 4.2582, loss_sin: 0.0266, loss_cos: 0.0762, loss_gcn: 0.6006, loss: 6.2702 2021-07-03 05:54:09,186 - mmocr - INFO - Epoch [1][46/309] lr: 7.000e-03, eta: 2 days, 16:42:49, time: 0.938, data_time: 0.257, memory: 7567, loss_text: 0.5665, loss_center: 0.7336, loss_height: 4.3154, loss_sin: 0.0229, loss_cos: 0.1163, loss_gcn: 0.5024, loss: 6.2572 2021-07-03 05:54:10,058 - mmocr - INFO - Epoch [1][47/309] lr: 7.000e-03, eta: 2 days, 16:36:37, time: 0.872, data_time: 0.241, memory: 7567, loss_text: 0.5664, loss_center: 0.7537, loss_height: 3.6542, loss_sin: 0.0210, loss_cos: 0.1421, loss_gcn: 0.4322, loss: 5.5696 2021-07-03 05:54:10,971 - mmocr - INFO - Epoch [1][48/309] lr: 7.000e-03, eta: 2 days, 16:34:09, time: 0.913, data_time: 0.340, memory: 7567, loss_text: 0.5668, loss_center: 0.7283, loss_height: 3.1193, loss_sin: 0.0060, loss_cos: 0.0518, loss_gcn: 0.4886, loss: 4.9607 2021-07-03 05:54:11,561 - mmocr - INFO - Epoch [1][49/309] lr: 7.000e-03, eta: 2 days, 16:04:42, time: 0.590, data_time: 0.069, memory: 7567, loss_text: 0.5664, loss_center: 0.7287, loss_height: 3.3285, loss_sin: 0.0266, loss_cos: 0.2726, loss_gcn: 0.5189, loss: 5.4416 2021-07-03 05:54:12,270 - mmocr - INFO - Epoch [1][50/309] lr: 7.000e-03, eta: 2 days, 15:46:14, time: 0.709, data_time: 0.266, memory: 7567, loss_text: 0.5663, loss_center: 0.7357, loss_height: 3.3700, loss_sin: 0.0101, loss_cos: 0.1171, loss_gcn: 0.3786, loss: 5.1778 2021-07-03 05:54:13,070 - mmocr - INFO - Epoch [1][51/309] lr: 7.000e-03, eta: 2 days, 15:35:45, time: 0.799, data_time: 0.071, memory: 7567, loss_text: 0.5648, loss_center: 0.7314, loss_height: 3.3882, loss_sin: 0.0362, loss_cos: 0.1348, loss_gcn: 0.4585, loss: 5.3138 2021-07-03 05:54:14,153 - mmocr - INFO - Epoch [1][52/309] lr: 7.000e-03, eta: 2 days, 15:48:08, time: 1.083, data_time: 0.336, memory: 7567, loss_text: 0.5642, loss_center: 0.7363, loss_height: 3.6221, loss_sin: 0.0166, loss_cos: 0.1603, loss_gcn: 0.5693, loss: 5.6687 2021-07-03 05:54:15,018 - mmocr - INFO - Epoch [1][53/309] lr: 7.000e-03, eta: 2 days, 15:43:06, time: 0.865, data_time: 0.071, memory: 7567, loss_text: 0.5643, loss_center: 0.7311, loss_height: 3.9907, loss_sin: 0.0009, loss_cos: 0.0555, loss_gcn: 0.6118, loss: 5.9543 2021-07-03 05:54:15,839 - mmocr - INFO - Epoch [1][54/309] lr: 7.000e-03, eta: 2 days, 15:34:58, time: 0.822, data_time: 0.235, memory: 7567, loss_text: 0.5657, loss_center: 0.7380, loss_height: 3.6009, loss_sin: 0.0050, loss_cos: 0.0895, loss_gcn: 0.5650, loss: 5.5640 2021-07-03 05:54:16,566 - mmocr - INFO - Epoch [1][55/309] lr: 7.000e-03, eta: 2 days, 15:19:59, time: 0.726, data_time: 0.148, memory: 7567, loss_text: 0.5653, loss_center: 0.7407, loss_height: 4.2168, loss_sin: 0.1281, loss_cos: 0.1262, loss_gcn: 0.5603, loss: 6.3375 2021-07-03 05:54:17,384 - mmocr - INFO - Epoch [1][56/309] lr: 7.000e-03, eta: 2 days, 15:12:17, time: 0.818, data_time: 0.241, memory: 7567, loss_text: 0.5644, loss_center: 0.7378, loss_height: 4.0704, loss_sin: 0.0018, loss_cos: 0.0528, loss_gcn: 0.5259, loss: 5.9530 Traceback (most recent call last): File "/home/aisvr/Public/hyc/mmocr_fce_1/tools/train.py", line 210, in main() File "/home/aisvr/Public/hyc/mmocr_fce_1/tools/train.py", line 206, in main meta=meta) File "/home/aisvr/Public/hyc/mmocr_fce_1/mmocr/apis/train.py", line 149, in train_detector runner.run(data_loaders, cfg.workflow) File "/opt/conda/envs/mmocr/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 125, in run epoch_runner(data_loaders[i], **kwargs) File "/opt/conda/envs/mmocr/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 47, in train for i, data_batch in enumerate(self.data_loader): File "/opt/conda/envs/mmocr/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 363, in next data = self._next_data() File "/opt/conda/envs/mmocr/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 989, in _next_data return self._process_data(data) File "/opt/conda/envs/mmocr/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1014, in _process_data data.reraise() File "/opt/conda/envs/mmocr/lib/python3.7/site-packages/torch/_utils.py", line 395, in reraise raise self.exc_type(msg) AssertionError: Caught AssertionError in DataLoader worker process 0. Original Traceback (most recent call last): File "/opt/conda/envs/mmocr/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 185, in _worker_loop data = fetcher.fetch(index) File "/opt/conda/envs/mmocr/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/opt/conda/envs/mmocr/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/opt/conda/envs/mmocr/lib/python3.7/site-packages/mmdet/datasets/custom.py", line 193, in getitem data = self.prepare_train_img(idx) File "/opt/conda/envs/mmocr/lib/python3.7/site-packages/mmdet/datasets/custom.py", line 216, in prepare_train_img return self.pipeline(results) File "/opt/conda/envs/mmocr/lib/python3.7/site-packages/mmdet/datasets/pipelines/compose.py", line 40, in call data = t(data) File "/home/aisvr/Public/hyc/mmocr_fce_1/mmocr/datasets/pipelines/textdet_targets/base_textdet_targets.py", line 167, in call results = self.generate_targets(results) File "/home/aisvr/Public/hyc/mmocr_fce_1/mmocr/datasets/pipelines/textdet_targets/drrg_targets.py", line 508, in generate_targets polygon_masks) File "/home/aisvr/Public/hyc/mmocr_fce_1/mmocr/datasets/pipelines/textdet_targets/drrg_targets.py", line 194, in generate_center_mask_attribmaps , _, top_line, bot_line = self.reorder_poly_edge(polygon_points) File "/home/aisvr/Public/hyc/mmocr_fce_1/mmocr/datasets/pipelines/textdet_targets/textsnake_targets.py", line 177, in reorder_poly_edge assert points.shape[0] >= 4 AssertionError

cuhk-hbsun commented 3 years ago

It seems some labels of trainset are improper for drrg, just as you mentioned. To skip the data in trainset, you can use TextDetDataset (set test_mode=False will skip these data) instead of IcdarDataset.

And use command below to convert instances_training.json to instances_training.txt

python tools/data/textdet/coco_to_line_dict.py --in-path /home/aisvr/Public/hyc/totaltext/instances_training.json --out-path /home/aisvr/Public/hyc/totaltext/instances_training.txt

BTW, we will verify the error you mentioned above.

whynot08 commented 3 years ago

It seems some bad data in trainset. To skip the bad data in trainset, you can use TextDetDataset (set test_mode=False will skip bad data) instead of IcdarDataset.

And use command below to convert instances_training.json to instances_training.txt

python tools/data/textdet/coco_to_line_dict.py --in-path /home/aisvr/Public/hyc/totaltext/instances_training.json --out-path /home/aisvr/Public/hyc/totaltext/instances_training.txt

thanks for your reply I'll try it soon.

whynot08 commented 3 years ago

It seems some labels of trainset are improper for drrg, just as you mentioned. To skip the data in trainset, you can use TextDetDataset (set test_mode=False will skip these data) instead of IcdarDataset.

And use command below to convert instances_training.json to instances_training.txt

python tools/data/textdet/coco_to_line_dict.py --in-path /home/aisvr/Public/hyc/totaltext/instances_training.json --out-path /home/aisvr/Public/hyc/totaltext/instances_training.txt

BTW, we will verify the error you mentioned above.

it works, thanks again!