PaddleOCR
PaddleOCR copied to clipboard
训练识别模型中途老是崩溃
使用 configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml 训练下自己的数据集。除了数据集地址,其他参数都没改。 经常跑几个epoch就崩溃了,应该是数据集的问题,这是图像尺寸还是label长度的问题啊? 如果是输入网络的图像尺寸不一样,难道paddle还没做resize嘛,明明有 RecResizeImg: image_shape: [3, 48, 320] 。
-
系统环境/System Environment:windows10
-
运行指令/Command Code:python tools/train.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml -o Global.pretrained_model=./pretrain_models/en_PP-OCRv3_rec_train/best_accuracy
-
完整报错/Complete Error Message: Exception in thread Thread-17: Traceback (most recent call last): File "D:\anaconda3_win\envs\paddle\lib\threading.py", line 932, in _bootstrap_inner self.run() File "D:\anaconda3_win\envs\paddle\lib\threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "D:\anaconda3_win\envs\paddle\lib\site-packages\paddle\fluid\dataloader\dataloader_iter.py", line 217, in _thread_loop batch = self._dataset_fetcher.fetch(indices, File "D:\anaconda3_win\envs\paddle\lib\site-packages\paddle\fluid\dataloader\fetcher.py", line 134, in fetch data = self.collate_fn(data) File "D:\anaconda3_win\envs\paddle\lib\site-packages\paddle\fluid\dataloader\collate.py", line 80, in default_collate_fn return [default_collate_fn(fields) for fields in zip(*batch)] File "D:\anaconda3_win\envs\paddle\lib\site-packages\paddle\fluid\dataloader\collate.py", line 80, in
return [default_collate_fn(fields) for fields in zip(*batch)] File "D:\anaconda3_win\envs\paddle\lib\site-packages\paddle\fluid\dataloader\collate.py", line 59, in default_collate_fn batch = np.stack(batch, axis=0) File "<array_function internals>", line 180, in stack File "D:\anaconda3_win\envs\paddle\lib\site-packages\numpy\core\shape_base.py", line 426, in stack raise ValueError('all input arrays must have the same shape') ValueError: all input arrays must have the same shape
个别数据有问题吧,检查下个别数据路径是否失效?