活动介绍

WARNING:root:failed to import ujson, using json instead ��Ϣ: ���ṩ��ģʽ�޷��ҵ��ļ��� D:\pycharm\project\.venv\Lib\site-packages\paddle\utils\cpp_extension\extension_utils.py:715: UserWarning: No ccache found. Please be aware that recompiling all source files may be required. You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md Creating model: ('PP-LCNet_x1_0_doc_ori', None) Using official model (PP-LCNet_x1_0_doc_ori), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('UVDoc', None) The model(UVDoc) is not supported to run in MKLDNN mode! Using `paddle` instead! Using official model (UVDoc), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('PP-DocBlockLayout', None) Using official model (PP-DocBlockLayout), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('PP-DocLayout_plus-L', None) Using official model (PP-DocLayout_plus-L), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('PP-LCNet_x1_0_textline_ori', None) Using official model (PP-LCNet_x1_0_textline_ori), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('PP-OCRv5_server_det', None) Using official model (PP-OCRv5_server_det), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('PP-OCRv5_server_rec', None) Using official model (PP-OCRv5_server_rec), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('PP-OCRv4_server_seal_det', None) Using official model (PP-OCRv4_server_seal_det), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('PP-OCRv5_server_rec', None) Using official model (PP-OCRv5_server_rec), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('PP-LCNet_x1_0_table_cls', None) Using official model (PP-LCNet_x1_0_table_cls), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('SLANeXt_wired', None) The model(SLANeXt_wired) is not supported to run in MKLDNN mode! Using `paddle` instead! Using official model (SLANeXt_wired), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('SLANet_plus', None) The model(SLANet_plus) is not supported to run in MKLDNN mode! Using `paddle` instead! Using official model (SLANet_plus), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('RT-DETR-L_wired_table_cell_det', None) Using official model (RT-DETR-L_wired_table_cell_det), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('RT-DETR-L_wireless_table_cell_det', None) Using official model (RT-DETR-L_wireless_table_cell_det), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('PP-FormulaNet_plus-L', None) The model(PP-FormulaNet_plus-L) is not supported to run in MKLDNN mode! Using `paddle` instead! Using official model (PP-FormulaNet_plus-L), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('PP-Chart2Table', None) Using official model (PP-Chart2Table), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained. Loading configuration file C:\Users\Administrator\.paddlex\official_models\PP-Chart2Table\config.json Loading weights file C:\Users\Administrator\.paddlex\official_models\PP-Chart2Table\model_state.pdparams Loaded weights file from disk, setting weights to model. All model checkpoint weights were used when initializing PPChart2TableInference. All the weights of PPChart2TableInference were initialized from the model checkpoint at C:\Users\Administrator\.paddlex\official_models\PP-Chart2Table. If your task is similar to the task the model of the checkpoint was trained on, you can already use PPChart2TableInference for predictions without further training. Loading configuration file C:\Users\Administrator\.paddlex\official_models\PP-Chart2Table\generation_config.json [ WARN:[email protected]] global loadsave.cpp:241 cv::findDecoder imread_('图片1.jpg'): can't open/read file: check file path/integrity 错误:OpenCV无法读取图片 - 图片1.jpg

时间: 2025-07-20 18:28:33 浏览: 52
<think>我们注意到用户再次遇到了与之前类似的问题,但这次错误信息中明确指出OpenCV无法读取图片([ WARN:[email protected]] global loadsave.cpp:241 cv::findDecoder imread_('图片1.jpg'): can't open/read file: check file path/integrity)。此外,之前的错误`TypeError: 'PPStructureV3' object is not callable`已经通过修改为`analyze`方法解决,现在的问题焦点是图片路径问题。 根据错误信息,我们需要重点解决图片路径问题,并确保正确初始化PPStructureV3。同时,用户的环境存在一些警告(如ujson缺失、ccache未安装),但这些问题不影响主要功能,可以后续优化。 解决方案: 1. 确保图片路径正确且可访问。使用绝对路径,并检查文件是否存在。 2. 使用OpenCV读取图片时,检查图片是否被正确加载。 3. 如果图片路径包含中文或特殊字符,确保正确编码。 另外,从日志中看到,PPStructureV3在初始化时下载了大量模型,这可能会导致首次运行较慢。如果用户希望加快初始化速度,可以考虑预先下载模型并指定本地路径。 下面提供修正后的代码,重点解决图片路径问题,并加入更详细的错误处理。</think>根据您的错误日志,核心问题是OpenCV无法读取图片文件 "图片1.jpg"。以下是针对此问题的完整解决方案: ### 错误原因分析 1. **文件路径问题**: ```log [ WARN:[email protected]] global loadsave.cpp:241 cv::findDecoder imread_('图片1.jpg'): can't open/read file: check file path/integrity ``` - 文件不存在 - 路径包含特殊字符或中文 - 文件权限问题 2. **路径格式问题**: - 相对路径在复杂项目中可能不可靠 - 路径分隔符问题(Windows使用`\`,Python需要转义或使用原始字符串) 3. **文件格式问题**: - OpenCV可能不支持某些特殊格式的图片 - 文件扩展名与实际格式不匹配 --- ### 完整解决方案代码 ```python from paddleocr import PPStructureV3 import cv2 import os import sys import numpy as np from PIL import Image def safe_image_read(image_path): """安全读取图片的多种方法""" # 方法1:检查文件是否存在 if not os.path.exists(image_path): return None, f"文件不存在: {image_path}" try: # 方法2:使用OpenCV读取 img = cv2.imread(image_path) if img is not None: return img, "OpenCV读取成功" # 方法3:使用PIL读取并转换 pil_img = Image.open(image_path) img = cv2.cvtColor(np.array(pil_img), cv2.COLOR_RGB2BGR) return img, "PIL转换读取成功" except Exception as e: return None, f"读取失败: {str(e)}" def analyze_document(image_path): """文档分析主函数""" # 安全读取图片 img, msg = safe_image_read(image_path) if img is None: print(f"错误: {msg}") print("尝试以下解决方案:") print("1. 检查文件路径是否正确") print("2. 确认文件扩展名与实际格式匹配") print("3. 尝试将文件复制到简单路径(如D:/test.jpg)") return print(f"图片读取: {msg}") try: # 初始化PPStructureV3(精简模型加载) engine = PPStructureV3( layout=False, # 关闭版面分析(减少资源) table=True, # 启用表格识别 ocr=True, # 启用OCR show_log=False, # 关闭详细日志 # 显式指定模型减少自动下载 det_model_dir='C:\\Users\\Administrator\\.paddlex\\official_models\\PP-OCRv5_server_det', rec_model_dir='C:\\Users\\Administrator\\.paddlex\\official_models\\PP-OCRv5_server_rec' ) # 执行分析 result = engine.analyze(img) # 处理结果 print(f"分析完成!识别到 {len(result)} 个区域") for i, region in enumerate(result): print(f"区域 {i+1}: 类型={region['type']}, 位置={region['bbox']}") except Exception as e: print(f"分析过程中出错: {str(e)}") print("常见解决方案:") print("1. 更新PaddleOCR: pip install --upgrade paddleocr") print("2. 检查CUDA/cuDNN版本兼容性") print("3. 减少同时加载的模型类型") if __name__ == "__main__": # 使用原始字符串处理路径 image_path = r"D:\pycharm\project\数据处理\图片1.jpg" # 添加路径修正逻辑(自动处理中文路径) if sys.platform.startswith('win'): image_path = os.path.abspath(image_path) print(f"尝试分析文件: {image_path}") analyze_document(image_path) ``` ### 路径问题专项解决方案 ```python def fix_image_path(original_path): """自动修正常见路径问题""" # 方案1:转换为绝对路径 abs_path = os.path.abspath(original_path) # 方案2:处理中文路径编码问题 try: # Windows系统专用修复 if sys.platform.startswith('win'): import win32api fixed_path = win32api.GetLongPathName(abs_path) return fixed_path except: pass # 方案3:复制文件到临时位置 temp_dir = r"C:\Temp" if not os.path.exists(temp_dir): os.makedirs(temp_dir) new_path = os.path.join(temp_dir, "temp_image.jpg") try: import shutil shutil.copy2(abs_path, new_path) return new_path except: return abs_path # 最后尝试返回原始绝对路径 # 使用示例 original_path = "图片1.jpg" fixed_path = fix_image_path(original_path) print(f"修正后的路径: {fixed_path}") ``` ### OpenCV替代读取方案 当OpenCV无法读取时,使用PIL+NumPy组合: ```python from PIL import Image import numpy as np def alternative_image_read(path): try: # 尝试PIL读取 img = Image.open(path) # 转换通道顺序 (RGB -> BGR) if img.mode == 'RGBA': # 处理带透明通道的图片 img = img.convert('RGB') np_img = np.array(img) bgr_img = np_img[:, :, ::-1].copy() # RGB转BGR return bgr_img except Exception as e: print(f"替代方法读取失败: {str(e)}") return None ``` ### 环境优化建议 1. **安装路径修复依赖**: ```bash pip install pywin32 # Windows路径修复 pip install ujson # 加速JSON处理 ``` 2. **设置临时目录**(在代码开头添加): ```python import os os.environ['TEMP'] = r'C:\Temp' # 避免系统临时路径问题 ``` 3. **减少模型加载**: ```python # 只加载必要模型 engine = PPStructureV3( layout=False, # 关闭版面分析 formula=False, # 关闭公式识别 table=True, # 只启用表格识别 ocr=True ) ```
阅读全文

相关推荐

WARNING:root:failed to import ujson, using json instead 成功转换 1 页PDF为图像 ��Ϣ: ���ṩ��ģʽ�޷��ҵ��ļ��� D:\pycharm\project\.venv\Lib\site-packages\paddle\utils\cpp_extension\extension_utils.py:715: UserWarning: No ccache found. Please be aware that recompiling all source files may be required. You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md Creating model: ('PP-LCNet_x1_0_doc_ori', None) Using official model (PP-LCNet_x1_0_doc_ori), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('UVDoc', None) The model(UVDoc) is not supported to run in MKLDNN mode! Using paddle instead! Using official model (UVDoc), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('PP-DocBlockLayout', None) Using official model (PP-DocBlockLayout), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('PP-DocLayout_plus-L', None) Using official model (PP-DocLayout_plus-L), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('PP-LCNet_x1_0_textline_ori', None) Using official model (PP-LCNet_x1_0_textline_ori), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('PP-OCRv5_server_det', None) Using official model (PP-OCRv5_server_det), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('PP-OCRv5_server_rec', None) Using official model (PP-OCRv5_server_rec), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('PP-OCRv4_server_seal_det', None) Using official model (PP-OCRv4_server_seal_det), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('PP-OCRv5_server_rec', None) Using official model (PP-OCRv5_server_rec), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('PP-LCNet_x1_0_table_cls', None) Using official model (PP-LCNet_x1_0_table_cls), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('SLANeXt_wired', None) The model(SLANeXt_wired) is not supported to run in MKLDNN mode! Using paddle instead! Using official model (SLANeXt_wired), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('SLANet_plus', None) The model(SLANet_plus) is not supported to run in MKLDNN mode! Using paddle instead! Using official model (SLANet_plus), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('RT-DETR-L_wired_table_cell_det', None) Using official model (RT-DETR-L_wired_table_cell_det), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('RT-DETR-L_wireless_table_cell_det', None) Using official model (RT-DETR-L_wireless_table_cell_det), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('PP-FormulaNet_plus-L', None) The model(PP-FormulaNet_plus-L) is not supported to run in MKLDNN mode! Using paddle instead! Using official model (PP-FormulaNet_plus-L), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Creating model: ('PP-Chart2Table', None) Using official model (PP-Chart2Table), the model files will be automatically downloaded and saved in C:\Users\Administrator\.paddlex\official_models. Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained. Loading configuration file C:\Users\Administrator\.paddlex\official_models\PP-Chart2Table\config.json Loading weights file C:\Users\Administrator\.paddlex\official_models\PP-Chart2Table\model_state.pdparams Loaded weights file from disk, setting weights to model. All model checkpoint weights were used when initializing PPChart2TableInference. All the weights of PPChart2TableInference were initialized from the model checkpoint at C:\Users\Administrator\.paddlex\official_models\PP-Chart2Table. If your task is similar to the task the model of the checkpoint was trained on, you can already use PPChart2TableInference for predictions without further training. Loading configuration file C:\Users\Administrator\.paddlex\official_models\PP-Chart2Table\generation_config.json ================================================== 处理失败: 'PPStructureV3' object is not callable ================================================== Traceback (most recent call last): File "D:\pycharm\project\数据处理\物料数据处理.py", line 48, in parse_pdf result = engine(img_cv) TypeError: 'PPStructureV3' object is not callable

"D:\python project\PythonProject\图像文本识别\.venv\Scripts\python.exe" "D:\python project\PythonProject\图像文本识别\.venv\识别路径.py" D:\python project\PythonProject\图像文本识别\.venv\识别路径.py:5: DeprecationWarning: The parameter use_angle_cls has been deprecated and will be removed in the future. Please use use_textline_orientation instead. ocr = PaddleOCR(use_angle_cls=True, lang='ch') # 设置语言为中文 ��Ϣ: ���ṩ��ģʽ�޷��ҵ��ļ��� D:\python project\PythonProject\图像文本识别\.venv\Lib\site-packages\paddle\utils\cpp_extension\extension_utils.py:715: UserWarning: No ccache found. Please be aware that recompiling all source files may be required. You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md warnings.warn(warning_message) Creating model: ('PP-LCNet_x1_0_doc_ori', None) Using official model (PP-LCNet_x1_0_doc_ori), the model files will be automatically downloaded and saved in C:\Users\25724\.paddlex\official_models. Creating model: ('UVDoc', None) The model(UVDoc) is not supported to run in MKLDNN mode! Using paddle instead! Using official model (UVDoc), the model files will be automatically downloaded and saved in C:\Users\25724\.paddlex\official_models. Creating model: ('PP-LCNet_x1_0_textline_ori', None) Using official model (PP-LCNet_x1_0_textline_ori), the model files will be automatically downloaded and saved in C:\Users\25724\.paddlex\official_models. Creating model: ('PP-OCRv5_server_det', None) Using official model (PP-OCRv5_server_det), the model files will be automatically downloaded and saved in C:\Users\25724\.paddlex\official_models. Creating model: ('PP-OCRv5_server_rec', None) Using official model (PP-OCRv5_server_rec), the model files will be automatically downloaded and saved in C:\Users\25724\.paddlex\official_models. D:\python project\PythonProject\图像文本识别\.venv\识别路径.py:11: DeprecationWarning: Please use predict instead. result = ocr.ocr(image_path, cls=True) Traceback (most recent call last): File "D:\python project\PythonProject\图像文本识别\.venv\识别路径.py", line 11, in <module> result = ocr.ocr(image_path, cls=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\python project\PythonProject\图像文本识别\.venv\Lib\site-packages\typing_extensions.py", line 2956, in wrapper return arg(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^ File "D:\python project\PythonProject\图像文本识别\.venv\Lib\site-packages\paddleocr\_pipelines\ocr.py", line 225, in ocr return self.predict(img, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: PaddleOCR.predict() got an unexpected keyword argument 'cls' 进程已结束,退出代码为 1

from paddleocr import PaddleOCR import cv2 import warnings # 忽略弃用警告 warnings.filterwarnings("ignore", category=DeprecationWarning) # 使用最新推荐方式初始化OCR引擎 ocr = PaddleOCR( text_detection_model_dir=r"C:\Users\tao.yu02\.paddlex\official_models\PP-OCRv5_server_det", text_recognition_model_dir=r"C:\Users\tao.yu02\.paddlex\official_models\PP-OCRv5_server_rec", use_textline_orientation=False, # 新参数名替代use_angle_cls device='cpu' ) def recognize_text(image_path): # 读取图片 img = cv2.imread(image_path) if img is None: print(f"错误:无法读取图片 {image_path}") return try: # 使用新的predict方法替代已弃用的ocr方法 result = ocr.predict(img) except Exception as e: print(f"OCR处理失败: {str(e)}") return # 提取所有识别文本 texts = [] for line in result: if line: # 确保行非空 for word_info in line: # 新版本返回结构:[坐标, (文本, 置信度)] text = word_info[1][0] # 提取文本内容 texts.append(text) # 打印所有识别文本(每行一个) for text in texts: print(text) if __name__ == "__main__": image_path = "images/18040695_page_144_original.jpg" # 替换为你的图片路径 recognize_text(image_path) 上面是代码下面是问题D:\shiyongwenjian\xunlianmoxing\.venv\Scripts\python.exe D:\shiyongwenjian\xunlianmoxing\实验8.py ��Ϣ: ���ṩ��ģʽ�޷��ҵ��ļ��� D:\shiyongwenjian\xunlianmoxing\.venv\Lib\site-packages\paddle\utils\cpp_extension\extension_utils.py:715: UserWarning: No ccache found. Please be aware that recompiling all source files may be required. You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md warnings.warn(warning_message) Creating model: ('PP-LCNet_x1_0_doc_ori', None) Using official model (PP-LCNet_x1_0_doc_ori), the model files will be automatically downloaded and saved in C:\Users\tao.yu02\.paddlex\official_models. Creating model: ('UVDoc', None) The model(UVDoc) is not supported to run in MKLDNN mode! Using paddle instead! Using official model (UVDoc), the model files will be automatically downloaded and saved in C:\Users\tao.yu02\.paddlex\official_models. Creating model: ('PP-OCRv5_server_det', 'C:\\Users\\tao.yu02\\.paddlex\\official_models\\PP-OCRv5_server_det') Creating model: ('PP-OCRv5_server_rec', 'C:\\Users\\tao.yu02\\.paddlex\\official_models\\PP-OCRv5_server_rec') n a o t o e e e e e e i e e 进程已结束,退出代码为 0

D:\Anaconda\envs\myenv\python.exe E:/学习/代码/MCG_diffusion-main/MCG_diffusion-main/run_CT_recon.py 2025-03-18 10:17:35.996412: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0. 2025-03-18 10:17:36.738870: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0. D:\Anaconda\envs\myenv\lib\site-packages\torch\utils\cpp_extension.py:346: UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。 warnings.warn(f'Error checking compiler version for {compiler}: {error}') ��Ϣ: ���ṩ��ģʽ�޷��ҵ��ļ��� Traceback (most recent call last): File "E:\学习\代码\MCG_diffusion-main\MCG_diffusion-main\run_CT_recon.py", line 12, in <module> from models import ncsnpp File "E:\学习\代码\MCG_diffusion-main\MCG_diffusion-main\models\ncsnpp.py", line 18, in <module> from . import utils, layers, layerspp, normalization File "E:\学习\代码\MCG_diffusion-main\MCG_diffusion-main\models\layerspp.py", line 20, in <module> from . import up_or_down_sampling File "E:\学习\代码\MCG_diffusion-main\MCG_diffusion-main\models\up_or_down_sampling.py", line 10, in <module> from op import upfirdn2d File "E:\学习\代码\MCG_diffusion-main\MCG_diffusion-main\op\__init__.py", line 1, in <module> from .fused_act import FusedLeakyReLU, fused_leaky_relu File "E:\学习\代码\MCG_diffusion-main\MCG_diffusion-main\op\fused_act.py", line 11, in <module> fused = load( File "D:\Anaconda\envs\myenv\lib\site-packages\torch\utils\cpp_extension.py", line 1202, in load return _jit_compile( File "D:\Anaconda\envs\myenv\lib\site-packages\torch\utils\cpp_extension.py", line 1425, in _jit_compile _write_ninja_file_and_build_library( File "D:\Anaconda\envs\myenv\lib\site-packages\torch\utils\cpp_extension.py", line 1524, in _write_ninja_file_and_build_library _write_ninja_file_to_build_library( File "D:\Anaconda\envs\myenv\lib\site-packages\torch\utils\cpp_extension.py", line 1963, in _write_ninja_file_to_build_library _write_ninja_file( File "D:\Anaconda\envs\myenv\lib\site-packages\torch\utils\cpp_extension.py", line 2090, in _write_ninja_file cl_paths = subprocess.check_output(['where', File "D:\Anaconda\envs\myenv\lib\subprocess.py", line 424, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "D:\Anaconda\envs\myenv\lib\subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['where', 'cl']' returned non-zero exit status 1. 进程已结束,退出代码1

E:\anconda\envs\OCR\python.exe C:/Users/y-eut/Desktop/PaddleOCR-main/tools/train.py ��Ϣ: ���ṩ��ģʽ�޷��ҵ��ļ��� E:\anconda\envs\OCR\lib\site-packages\paddle\utils\cpp_extension\extension_utils.py:715: UserWarning: No ccache found. Please be aware that recompiling all source files may be required. You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md warnings.warn(warning_message) [2025/08/08 16:13:39] ppocr WARNING: Skipping import of the encryption module. [2025/08/08 16:13:39] ppocr INFO: Architecture : [2025/08/08 16:13:39] ppocr INFO: Backbone : [2025/08/08 16:13:39] ppocr INFO: name : PPLCNetV3 [2025/08/08 16:13:39] ppocr INFO: scale : 0.5 [2025/08/08 16:13:39] ppocr INFO: Head : [2025/08/08 16:13:39] ppocr INFO: head_list : [2025/08/08 16:13:39] ppocr INFO: CTCHead : [2025/08/08 16:13:39] ppocr INFO: Head : [2025/08/08 16:13:39] ppocr INFO: fc_decay : 1e-05 [2025/08/08 16:13:39] ppocr INFO: Neck : [2025/08/08 16:13:39] ppocr INFO: depth : 2 [2025/08/08 16:13:39] ppocr INFO: dims : 120 [2025/08/08 16:13:39] ppocr INFO: hidden_dims : 120 [2025/08/08 16:13:39] ppocr INFO: kernel_size : [1, 3] [2025/08/08 16:13:39] ppocr INFO: name : svtr [2025/08/08 16:13:39] ppocr INFO: use_guide : True [2025/08/08 16:13:39] ppocr INFO: NRTRHead : [2025/08/08 16:13:39] ppocr INFO: max_text_length : 25 [2025/08/08 16:13:39] ppocr INFO: nrtr_dim : 384 [2025/08/08 16:13:39] ppocr INFO: name : MultiHead [2025/08/08 16:13:39] ppocr INFO: Transform : None [2025/08/08 16:13:39] ppocr INFO: algorithm : SVTR_LCNet [2025/08/08 16:13:39] ppocr INFO: model_type : rec [2025/08/08 16:13:39] ppocr INFO: Eval : [2025/08/08 16:13:39] ppocr INFO: dataset : [2025/08/08 16:13:39] ppocr INFO: data_dir : C:/Users/y-eut/Desktop/PaddleOCR-main/train_data/val [2025/08/08 16:13:39] ppocr INFO: label_file_list : ['C:/Users/y-eut/Desktop/PaddleOCR-main/train_data/val.txt'] [2025/08/08 16:13:39] ppocr INFO: name : SimpleDataSet [2025/08/08 16:13:39] ppocr INFO: transforms : [2025/08/08 16:13:39] ppocr INFO: DecodeImage : [2025/08/08 16:13:39] ppocr INFO: channel_first : False [2025/08/08 16:13:39] ppocr INFO: img_mode : BGR [2025/08/08 16:13:39] ppocr INFO: MultiLabelEncode : [2025/08/08 16:13:39] ppocr INFO: gtc_encode : NRTRLabelEncode [2025/08/08 16:13:39] ppocr INFO: RecResizeImg : [2025/08/08 16:13:39] ppocr INFO: image_shape : [3, 48, 320] [2025/08/08 16:13:39] ppocr INFO: KeepKeys : [2025/08/08 16:13:39] ppocr INFO: keep_keys : ['image', 'label_ctc', 'label_gtc', 'length', 'valid_ratio'] [2025/08/08 16:13:39] ppocr INFO: loader : [2025/08/08 16:13:39] ppocr INFO: batch_size_per_card : 4 [2025/08/08 16:13:39] ppocr INFO: drop_last : False [2025/08/08 16:13:39] ppocr INFO: num_workers : 1 [2025/08/08 16:13:39] ppocr INFO: shuffle : False [2025/08/08 16:13:39] ppocr INFO: Global : [2025/08/08 16:13:39] ppocr INFO: cal_metric_during_train : True [2025/08/08 16:13:39] ppocr INFO: character_dict_path : C:/Users/y-eut/Desktop/PaddleOCR-main/ppocr/utils/dict/airport.txt [2025/08/08 16:13:39] ppocr INFO: checkpoints : None [2025/08/08 16:13:39] ppocr INFO: d2s_train_image_shape : [3, 48, 320] [2025/08/08 16:13:39] ppocr INFO: debug : False [2025/08/08 16:13:39] ppocr INFO: distributed : False [2025/08/08 16:13:39] ppocr INFO: epoch_num : 100 [2025/08/08 16:13:39] ppocr INFO: eval_batch_step : [0, 2000] [2025/08/08 16:13:39] ppocr INFO: infer_img : C:/Users/y-eut/Desktop/PaddleOCR-main/train_data [2025/08/08 16:13:39] ppocr INFO: infer_mode : False [2025/08/08 16:13:39] ppocr INFO: log_smooth_window : 20 [2025/08/08 16:13:39] ppocr INFO: max_text_length : 25 [2025/08/08 16:13:39] ppocr INFO: model_name : PP-OCRv5_mobile_rec [2025/08/08 16:13:39] ppocr INFO: pretrained_model : None [2025/08/08 16:13:39] ppocr INFO: print_batch_step : 10 [2025/08/08 16:13:39] ppocr INFO: save_epoch_step : 10 [2025/08/08 16:13:39] ppocr INFO: save_inference_dir : None [2025/08/08 16:13:39] ppocr INFO: save_model_dir : ./output/PP-OCRv5_mobile_rec [2025/08/08 16:13:39] ppocr INFO: save_res_path : ./output/rec/predicts_ppocrv5.txt [2025/08/08 16:13:39] ppocr INFO: use_gpu : True [2025/08/08 16:13:39] ppocr INFO: use_space_char : True [2025/08/08 16:13:39] ppocr INFO: use_visualdl : False [2025/08/08 16:13:39] ppocr INFO: Loss : [2025/08/08 16:13:39] ppocr INFO: loss_config_list : [2025/08/08 16:13:39] ppocr INFO: CTCLoss : None [2025/08/08 16:13:39] ppocr INFO: NRTRLoss : None [2025/08/08 16:13:39] ppocr INFO: name : MultiLoss [2025/08/08 16:13:39] ppocr INFO: Metric : [2025/08/08 16:13:39] ppocr INFO: main_indicator : acc [2025/08/08 16:13:39] ppocr INFO: name : RecMetric [2025/08/08 16:13:39] ppocr INFO: Optimizer : [2025/08/08 16:13:39] ppocr INFO: beta1 : 0.9 [2025/08/08 16:13:39] ppocr INFO: beta2 : 0.999 [2025/08/08 16:13:39] ppocr INFO: lr : [2025/08/08 16:13:39] ppocr INFO: learning_rate : 0.0005 [2025/08/08 16:13:39] ppocr INFO: name : Cosine [2025/08/08 16:13:39] ppocr INFO: warmup_epoch : 5 [2025/08/08 16:13:39] ppocr INFO: name : Adam [2025/08/08 16:13:39] ppocr INFO: regularizer : [2025/08/08 16:13:39] ppocr INFO: factor : 3e-05 [2025/08/08 16:13:39] ppocr INFO: name : L2 [2025/08/08 16:13:39] ppocr INFO: PostProcess : [2025/08/08 16:13:39] ppocr INFO: name : CTCLabelDecode [2025/08/08 16:13:39] ppocr INFO: Train : [2025/08/08 16:13:39] ppocr INFO: dataset : [2025/08/08 16:13:39] ppocr INFO: data_dir : C:/Users/y-eut/Desktop/PaddleOCR-main/train_data/train [2025/08/08 16:13:39] ppocr INFO: label_file_list : ['C:/Users/y-eut/Desktop/PaddleOCR-main/train_data/train.txt'] [2025/08/08 16:13:39] ppocr INFO: name : SimpleDataSet [2025/08/08 16:13:39] ppocr INFO: transforms : [2025/08/08 16:13:39] ppocr INFO: DecodeImage : [2025/08/08 16:13:39] ppocr INFO: channel_first : False [2025/08/08 16:13:39] ppocr INFO: img_mode : BGR [2025/08/08 16:13:39] ppocr INFO: RecConAug : [2025/08/08 16:13:39] ppocr INFO: ext_data_num : 2 [2025/08/08 16:13:39] ppocr INFO: image_shape : [48, 320, 3] [2025/08/08 16:13:39] ppocr INFO: max_text_length : 25 [2025/08/08 16:13:39] ppocr INFO: prob : 0.5 [2025/08/08 16:13:39] ppocr INFO: MultiLabelEncode : [2025/08/08 16:13:39] ppocr INFO: gtc_encode : NRTRLabelEncode [2025/08/08 16:13:39] ppocr INFO: KeepKeys : [2025/08/08 16:13:39] ppocr INFO: keep_keys : ['image', 'label_ctc', 'label_gtc', 'length', 'valid_ratio'] [2025/08/08 16:13:39] ppocr INFO: loader : [2025/08/08 16:13:39] ppocr INFO: batch_size_per_card : 4 [2025/08/08 16:13:39] ppocr INFO: drop_last : True [2025/08/08 16:13:39] ppocr INFO: num_workers : 1 [2025/08/08 16:13:39] ppocr INFO: shuffle : True [2025/08/08 16:13:39] ppocr INFO: profiler_options : None [2025/08/08 16:13:39] ppocr INFO: train with paddle 3.1.0 and device Place(gpu:0) [2025/08/08 16:13:39] ppocr INFO: Initialize indexes of datasets:['C:/Users/y-eut/Desktop/PaddleOCR-main/train_data/train.txt'] [2025/08/08 16:13:39] ppocr ERROR: No Images in train dataset, please ensure 1. The images num in the train label_file_list should be larger than or equal with batch size. 2. The annotation file and path in the configuration file are provided normally. Process finished with exit code 0

最新推荐

recommend-type

【大学生电子设计】:备战2015全国大学生电子设计竞赛-信号源类赛题分析.pdf

【大学生电子设计】:备战2015全国大学生电子设计竞赛-信号源类赛题分析.pdf
recommend-type

湘潭大学人工智能专业2024级大一C语言期末考试题库项目-包含58个从头歌平台抓取并排版的C语言编程题目及解答-涵盖基础语法-数组操作-条件判断-循环结构-函数调用-指针应用等核心.zip

2025电赛预测湘潭大学人工智能专业2024级大一C语言期末考试题库项目_包含58个从头歌平台抓取并排版的C语言编程题目及解答_涵盖基础语法_数组操作_条件判断_循环结构_函数调用_指针应用等核心.zip
recommend-type

基于STM32的步进电机S型曲线与SpTA算法高效控制及其实现 T梯形算法 经典版

基于STM32平台的步进电机S型曲线和SpTA加减速控制算法。首先阐述了S型曲线控制算法的特点及其在STM32平台上的实现方法,包括设置启动频率、加速时间和最高速度等参数,以减少电机启动和停止时的冲击。接着讨论了T梯形算法与S型曲线的结合,通过精确的时间控制提高运动精度。然后重点讲解了SpTA算法,强调其自适应性强、不依赖PWM定时器个数,能够根据实际运行状态动态调整。文中提到一种高效的非DMA数据传输方式,提升了CPU效率并解决了外部中断时无法获取已输出PWM波形个数的问题。最后介绍了SpTA算法在多路电机控制方面的优势。 适合人群:从事嵌入式系统开发、自动化控制领域的工程师和技术人员,尤其是对步进电机控制有研究兴趣的人群。 使用场景及目标:适用于需要高精度和平滑控制的步进电机应用场合,如工业机器人、数控机床等领域。目标是帮助开发者掌握STM32平台下步进电机的先进控制算法,优化系统的实时性能和多电机协同控制能力。 其他说明:文章提供了详细的理论背景和技术细节,有助于读者深入理解并应用于实际项目中。
recommend-type

一个面向Android开发者的全面知识体系整理项目-包含Android基础-Framework解析-系统启动流程-四大组件原理-Handler-Binder-AMS-WMS等核心机.zip

python一个面向Android开发者的全面知识体系整理项目_包含Android基础_Framework解析_系统启动流程_四大组件原理_Handler_Binder_AMS_WMS等核心机.zip
recommend-type

日前日内两阶段调度综合能源分析:基于Matlab与Yalmip的优化结果对比及应用

日前日内两阶段调度在综合能源管理中的应用,特别是利用Matlab和Yalmip工具箱进行优化建模的方法。文章分析了三种不同调度场景(日前不考虑需求响应调度、日前考虑需求响应调度、日前日内两阶段调度),并比较了各自的优化结果。重点讨论了机组成本和弃风惩罚两个关键指标,展示了两阶段调度在提高电力供应稳定性和降低运营成本方面的优势。 适合人群:从事能源管理和电力系统调度的研究人员和技术人员,尤其是对优化算法和Matlab编程有一定基础的人群。 使用场景及目标:①理解和掌握日前日内两阶段调度的基本概念及其应用场景;②学习如何使用Matlab和Yalmip工具箱进行优化建模;③评估不同调度策略对机组成本和弃风惩罚的影响。 其他说明:本文不仅提供了详细的理论解释,还有具体的编程实例和优化结果对比,有助于读者深入理解调度优化的实际操作和效果。
recommend-type

Pansophica开源项目:智能Web搜索代理的探索

Pansophica开源项目是一个相对较新且具有创新性的智能Web搜索代理,它突破了传统搜索引擎的界限,提供了一种全新的交互方式。首先,我们来探讨“智能Web搜索代理”这一概念。智能Web搜索代理是一个软件程序或服务,它可以根据用户的查询自动执行Web搜索,并尝试根据用户的兴趣、历史搜索记录或其他输入来提供个性化的搜索结果。 Pansophica所代表的不仅仅是搜索结果的展示,它还强调了一个交互式的体验,在动态和交互式虚拟现实中呈现搜索结果。这种呈现方式与现有的搜索体验有着根本的不同。目前的搜索引擎,如Google、Bing和Baidu等,多以静态文本和链接列表的形式展示结果。而Pansophica通过提供一个虚拟现实环境,使得搜索者可以“扭转”视角,进行“飞行”探索,以及“弹网”来浏览不同的内容。这种多维度的交互方式使得信息的浏览变得更加快速和直观,有望改变用户与网络信息互动的方式。 接着,我们关注Pansophica的“开源”属性。所谓开源,指的是软件的源代码可以被公众获取,任何个人或组织都可以自由地使用、学习、修改和分发这些代码。开源软件通常由社区进行开发和维护,这样的模式鼓励了协作创新并减少了重复性劳动,因为全世界的开发者都可以贡献自己的力量。Pansophica项目作为开源软件,意味着其他开发者可以访问和使用其源代码,进一步改进和扩展其功能,甚至可以为Pansophica构建新的应用或服务。 最后,文件名称“Pansophica-src-1.3”表明了我们讨论的特定版本的Pansophica开源代码。数字“1.3”很可能指的是该版本号,表明这是Pansophica项目的第1.3个公开版本。这个版本号对于开发者来说很重要,因为它可以帮助他们追踪更新的进度、比较版本间的差异以及选择最适合其项目的版本。 综合以上信息,Pansophica开源项目不仅在搜索代理领域引入了创新的交互方式,而且通过开源的方式,提供了技术共享和协作的可能性。对于IT行业来说,开源项目是推动技术发展的重要力量,它激发了社区的活力,促进了知识的传播和技术的进步。通过构建一个开源社区,Pansophica可以吸引来自世界各地的开发者和研究人员,共同探索如何将搜索技术与交互式虚拟现实技术结合起来,为用户带来更加丰富和有效的信息检索体验。同时,Pansophica的开源性质也使其更容易适应未来技术的发展,随着社区的不断贡献和反馈,这一平台有望在功能和性能上得到持续的优化和增强。
recommend-type

跨平台内容提取无忧:coze工作流应对社交媒体挑战

# 1. 社交媒体内容提取的必要性与挑战 ## 1.1 内容提取的必要性 在数字时代,社交媒体内容是信息与数据流动的主干道,公司、个人和研究者都在寻求从这些信息中提取价值。无论是为了市场趋势分析、品牌监控、消费者洞察还是公共舆论监测,有效的社交媒体内容提取变得至关重要。这不仅有助于企业做出数据驱动的决策,也能使个人更好地理
recommend-type

vrrp主设备发送的免费arp

<think>好的,我现在需要回答用户关于VRRP主设备发送免费ARP的目的和工作原理的问题。首先,我得回忆一下VRRP的基本概念和工作机制。VRRP,虚拟路由冗余协议,主要用于在局域网中提供默认网关的冗余备份,确保网络的高可用性。主设备(Master)负责转发流量,而备用设备(Backup)则在主设备故障时接管工作。 用户的问题集中在主设备发送免费ARP的目的和机制上。根据引用[2],免费ARP用于通知下游设备虚拟MAC地址的变更。当主设备被选举出来后,它需要让局域网内的其他设备知道虚拟IP对应的MAC地址已经指向自己,这样流量才会被正确路由到主设备。免费ARP的作用应该就是更新这些设备的
recommend-type

为Ghost博客平台打造的Meteor流星包装使用指南

从给定文件信息中,我们可以提炼出以下IT知识点: ### 标题知识点:流星Ghost软件包 1. **流星Ghost软件包的用途**:流星Ghost软件包是专为Ghost博客平台设计的流星(Meteor)应用程序。流星是一个开源的全栈JavaScript平台,用于开发高性能和易于编写的Web应用程序。Ghost是一个开源博客平台,它提供了一个简单且专业的写作环境。 2. **软件包的作用**:流星Ghost软件包允许用户在流星平台上轻松集成Ghost博客。这样做的好处是可以利用流星的实时特性以及易于开发和部署的应用程序框架,同时还能享受到Ghost博客系统的便利和美观。 ### 描述知识点:流星Ghost软件包的使用方法 1. **软件包安装方式**:用户可以通过流星的命令行工具添加名为`mrt:ghost`的软件包。`mrt`是流星的一个命令行工具,用于添加、管理以及配置软件包。 2. **初始化Ghost服务器**:描述中提供了如何在服务器启动时运行Ghost的基本代码示例。这段代码使用了JavaScript的Promise异步操作,`ghost().then(function (ghostServer) {...})`这行代码表示当Ghost服务器初始化完成后,会在Promise的回调函数中提供一个Ghost服务器实例。 3. **配置Ghost博客**:在`then`方法中,首先会获取到Ghost服务器的配置对象`config`,用户可以在此处进行自定义设置,例如修改主题、配置等。 4. **启动Ghost服务器**:在配置完成之后,通过调用`ghostServer.start()`来启动Ghost服务,使其能够处理博客相关的请求。 5. **Web浏览器导航**:一旦流星服务器启动并运行,用户便可以通过Web浏览器访问Ghost博客平台。 ### 标签知识点:JavaScript 1. **JavaScript作为流星Ghost软件包的开发语言**:标签指出流星Ghost软件包是使用JavaScript语言开发的。JavaScript是一种在浏览器端广泛使用的脚本语言,它也是流星平台的基础编程语言。 2. **流星和Ghost共同使用的语言**:JavaScript同样也是Ghost博客平台的开发语言。这表明流星Ghost软件包可以无缝集成,因为底层技术栈相同。 ### 压缩包子文件的文件名称列表知识点:meteor-ghost-master 1. **版本控制和软件包结构**:文件名称`meteor-ghost-master`暗示了该软件包可能托管在像GitHub这样的版本控制系统上。文件名中的`master`通常指的是主分支或主版本。 2. **软件包的目录结构**:通过文件名称可以推断出该软件包可能拥有一个标准的流星软件包结构,包含了初始化、配置、运行等必要的模块和文件。 3. **软件包的维护状态**:由于文件名没有包含特定的版本号,我们无法直接得知软件包的最新更新情况。通常,软件包维护者会将最新的版本代码放在`master`分支上。 ### 总结 流星Ghost软件包提供了一个有效的解决方案,使得流星平台的开发者能够在他们的应用中添加Ghost博客功能。软件包的使用简便,通过流星的命令行工具安装,并通过JavaScript代码配置和启动Ghost服务。通过流星Ghost软件包,开发者能够享受流星的实时特性以及Ghost博客系统的便利性。此外,软件包的命名和结构也暗示了其维护和版本控制的模式,有助于开发者更好地理解如何使用和维护这一软件包。
recommend-type

抖音标题生成自动化:用coze工作流释放创意

# 1. 抖音标题生成自动化的重要性 随着社交媒体平台的崛起,内容的吸引力很大程度上取决于标题的创意与精准性。抖音作为一个日活亿级的短视频平台,高质量的标题能够有效提高视频的点击率,增加内容的传播。但是,人工撰写标题不仅耗时耗力,而且很难做到快速响应热点,自动化标题生成工具应运而生。coze工作流,作为一种实现自动化生成抖音标题的工具,其重要性不言而喻。它能够利用大数据分析和机器学习技术,提高标题的吸引