你可以自己简单处理下,如果图像的宽度和高度比例小于一定的值,你把他旋转90度
您好,旋转这里我处理好来了,image进入model前我也保存看了没有问题了,不过去训练还是loss下降不下来,可能哪里有问题呢
[2023/02/28 12:57:52] ppocr INFO: epoch: [2/500], global_step: 910, lr: 0.000024, acc: 0.000000, norm_edit_dis: 0.006106, CTCLoss: 310.818420, SARLoss: 6.406378, loss: 317.229919, avg_reader_cost: 1.23864 s, avg_batch_cost: 1.61198 s, avg_samples: 89.6, ips: 55.58383 samples/s, eta: 9 days, 4:07:53
[2023/02/28 12:58:10] ppocr INFO: epoch: [2/500], global_step: 920, lr: 0.000024, acc: 0.000000, norm_edit_dis: 0.006677, CTCLoss: 310.127808, SARLoss: 6.398527, loss: 316.480713, avg_reader_cost: 1.22738 s, avg_batch_cost: 1.75810 s, avg_samples: 128.0, ips: 72.80597 samples/s, eta: 9 days, 4:07:32
[2023/02/28 12:58:23] ppocr INFO: epoch: [2/500], global_step: 930, lr: 0.000024, acc: 0.000000, norm_edit_dis: 0.006760, CTCLoss: 309.878357, SARLoss: 6.355027, loss: 316.247803, avg_reader_cost: 0.76346 s, avg_batch_cost: 1.29833 s, avg_samples: 128.0, ips: 98.58792 samples/s, eta: 9 days, 3:30:04
[2023/02/28 12:58:39] ppocr INFO: epoch: [2/500], global_step: 940, lr: 0.000025, acc: 0.000000, norm_edit_dis: 0.007354, CTCLoss: 309.566650, SARLoss: 6.409731, loss: 315.923218, avg_reader_cost: 1.11827 s, avg_batch_cost: 1.64835 s, avg_samples: 128.0, ips: 77.65359 samples/s, eta: 9 days, 3:21:21
[2023/02/28 12:58:53] ppocr INFO: epoch: [2/500], global_step: 950, lr: 0.000025, acc: 0.000000, norm_edit_dis: 0.007354, CTCLoss: 309.032684, SARLoss: 6.436466, loss: 315.395203, avg_reader_cost: 0.85524 s, avg_batch_cost: 1.39636 s, avg_samples: 128.0, ips: 91.66659 samples/s, eta: 9 days, 2:52:54
[2023/02/28 12:59:11] ppocr INFO: epoch: [2/500], global_step: 960, lr: 0.000025, acc: 0.000000, norm_edit_dis: 0.008305, CTCLoss: 308.398438, SARLoss: 6.423302, loss: 314.814636, avg_reader_cost: 1.25692 s, avg_batch_cost: 1.80362 s, avg_samples: 128.0, ips: 70.96822 samples/s, eta: 9 days, 2:56:53
[2023/02/28 12:59:24] ppocr INFO: epoch: [2/500], global_step: 970, lr: 0.000026, acc: 0.000000, norm_edit_dis: 0.007685, CTCLoss: 308.028992, SARLoss: 6.413594, loss: 314.516693, avg_reader_cost: 0.77235 s, avg_batch_cost: 1.30499 s, avg_samples: 128.0, ips: 98.08515 samples/s, eta: 9 days, 2:22:11
[2023/02/28 12:59:40] ppocr INFO: epoch: [2/500], global_step: 980, lr: 0.000026, acc: 0.000000, norm_edit_dis: 0.007668, CTCLoss: 307.679962, SARLoss: 6.401844, loss: 314.137085, avg_reader_cost: 1.03495 s, avg_batch_cost: 1.56928 s, avg_samples: 128.0, ips: 81.56628 samples/s, eta: 9 days, 2:08:26
[2023/02/28 12:59:52] ppocr INFO: epoch: [2/500], global_step: 990, lr: 0.000026, acc: 0.000000, norm_edit_dis: 0.007941, CTCLoss: 307.368652, SARLoss: 6.403132, loss: 313.789062, avg_reader_cost: 0.68935 s, avg_batch_cost: 1.22651 s, avg_samples: 128.0, ips: 104.36130 samples/s, eta: 9 days, 1:28:58
[2023/02/28 13:00:08] ppocr INFO: epoch: [2/500], global_step: 1000, lr: 0.000026, acc: 0.000000, norm_edit_dis: 0.007668, CTCLoss: 307.066040, SARLoss: 6.410324, loss: 313.484863, avg_reader_cost: 1.01300 s, avg_batch_cost: 1.55668 s, avg_samples: 128.0, ips: 82.22635 samples/s, eta: 9 days, 1:15:04
eval model:: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 16/16 [00:14<00:00, 1.11it/s]
[2023/02/28 13:00:22] ppocr INFO: cur metric, acc: 0.0, norm_edit_dis: 0.003059896835559517, fps: 2990.5085888047397
[2023/02/28 13:00:23] ppocr INFO: save best model is to /public/home/clhou/code/ocroutput/REC/SVRT/best_accuracy
[2023/02/28 13:00:23] ppocr INFO: best metric, acc: 0.0, norm_edit_dis: 0.003059896835559517, fps: 2990.5085888047397, best_epoch: 2
[2023/02/28 13:00:30] ppocr INFO: epoch: [2/500], global_step: 1010, lr: 0.000027, acc: 0.000000, norm_edit_dis: 0.008892, CTCLoss: 306.213898, SARLoss: 6.439404, loss: 312.625793, avg_reader_cost: 0.14822 s, avg_batch_cost: 0.67685 s, avg_samples: 128.0, ips: 189.11214 samples/s, eta: 8 days, 23:56:02
[2023/02/28 13:00:33] ppocr ERROR: When parsing line data_tps/comp/img_textline/image_934_204.jpg 槲𫣑
, error happened with msg: Traceback (most recent call last):
File "/public/home/clhou/code/ocr_test/design_2.5/ppocr/data/simple_dataset.py", line 170, in getitem
data['ext_data'] = self.get_ext_data()
File "/public/home/clhou/code/ocr_test/design_2.5/ppocr/data/simple_dataset.py", line 117, in get_ext_data
ii = Image.open(f)
File "/public/home/clhou/anaconda3/envs/paddle/lib/python3.8/site-packages/PIL/Image.py", line 3023, in open
raise UnidentifiedImageError(
PIL.UnidentifiedImageError: cannot identify image file <_io.BufferedReader name='/public/home/clhou/code/ancient_data/rec_data/rec_real/data_tps/MTH1200/img_textline/QL_7_264_29.jpg'>
[2023/02/28 13:00:45] ppocr INFO: epoch: [2/500], global_step: 1020, lr: 0.000027, acc: 0.000000, norm_edit_dis: 0.008723, CTCLoss: 305.908875, SARLoss: 6.395550, loss: 312.390076, avg_reader_cost: 0.97319 s, avg_batch_cost: 1.49989 s, avg_samples: 128.0, ips: 85.33952 samples/s, eta: 8 days, 23:39:08