paddlex/configs 更新为 paddlex/configs/modules。anomaly_detection 更新为 image_anomaly_detectionface_recognition 更新为 face_featuregeneral_recognition 更新为 image_featuremultilabel_classification 更新为 image_multilabel_classificationpedestrian_attribute 更新为 pedestrian_attribute_recognitionstructure_analysis 更新为 layout_detectiontable_recognition 更新为 table_structure_recognitiontext_detection_seal 更新为 seal_text_detectionvehicle_attribute 更新为 vehicle_attribute_recognitioncreate_model()参数修改:
model_name:只能传入字符串类型的模型名。model_dir:指定本地推理模型文件目录,默认为 None,表示自动下载官方模型并使用。batch_size:指定推理时批处理的大小,默认为 1。topk。use_hpip 和 hpi_params:用于支持高性能推理,默认不开启。功能更新:
dict 类型,但格式有所变化:{'key1': val} 改为 {"res": {'key': val}},即以 "res" 作为键,原结果数据作为值。save_to_xxx() 方法保存预测结果时,若 save_path 为目录,存储文件命名方式有变更。例如,保存为 JSON 格式时为 输入文件前缀名_res.json;保存为图像格式时为 输入文件前缀名_res_img.输入文件后缀名。paddlex/pipelines 更新为 paddlex/configs/pipelines。ts_fc 更新为 ts_forecastts_ad 更新为 ts_anomaly_detectionts_cls 更新为 ts_classification--topk 参数,指定返回的前 n 个结果。--serial_number,高性能推理不再需要传入序列号。create_pipeline()hpi_params 参数中的 serial_number 参数,高性能推理不再需要传入序列号。batch_size、阈值等。save_to_xxx() 方法保存预测结果时,若 save_path 为目录,存储文件命名方式更新。page_index 字段,仅当输入的预测样本为PDF文件时,标志当前预测结果的页码序号。text_det_params 字段,值为文本检测模型的后处理设置。配置文件格式更新:
产线配置文件内容更新后,分为三部分:产线名称、产线相关参数设置、子产线与子模块构成。例如:
pipeline_name: pipeline # 产线名称
threshold: 0.5 # 产线推理相关参数
SubPipelines: # 子产线
DocPreprocessor:
pipeline_name: doc_preprocessor
use_doc_unwarping: True # 子产线 DocPreprocessor 的相关设置
SubModules: # 子模块
TextDetection:
module_name: text_detection
model_name: PP-OCRv4_mobile_det
model_dir: null
limit_side_len: 960 # 子模块 TextDetection 的相关设置
limit_type: max
max_side_limit: 4000
thresh: 0.3
box_thresh: 0.6
unclip_ratio: 1.5
OCR.yaml 中相关参数控制。新增功能:
更新功能: