2021-08-16 07:45:32 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-12-01 16:28:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
										 
							
							
								# 飞桨训推一体全流程( )   
						 
					
						
							
								
									
										
										
										
											2021-08-16 07:45:32 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-10-18 12:45:52 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								## 1. 简介
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-12-01 16:28:59 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
										 
							
							
								飞桨除了基本的模型训练和预测, ( 
							 
						 
					
						
							
								
									
										
										
										
											2021-08-16 07:45:32 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-10-14 03:05:49 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								< div  align = "center" >  
						 
					
						
							
								
									
										
										
										
											2021-10-14 03:06:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								    < img  src = "docs/guide.png"  width = "1000" > 
							 
						 
					
						
							
								
									
										
										
										
											2021-10-14 03:05:49 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								< / div >  
						 
					
						
							
								
									
										
										
										
											2021-08-16 07:45:32 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-10-18 12:45:52 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								## 2. 汇总信息
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-10-14 07:22:06 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								打通情况汇总如下,已填写的部分表示可以使用本工具进行一键测试,未填写的表示正在支持中。
							 
						 
					
						
							
								
									
										
										
										
											2021-08-16 07:45:32 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-10-18 12:25:08 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								**字段说明:**
							 
						 
					
						
							
								
									
										
										
										
											2021-10-18 12:45:52 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
										 
							
							
								-  基础训练预测:  
						 
					
						
							
								
									
										
										
										
											2021-10-21 07:26:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								-  更多训练方式:包括多机多卡、混合精度。 
						 
					
						
							
								
									
										
										
										
											2021-10-21 06:42:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								-  模型压缩:包括裁剪、离线/在线量化、蒸馏。 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								-  其他预测部署:  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-10-21 07:26:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								更详细的mkldnn、Tensorrt等预测加速相关功能的支持情况可以查看各测试工具的[更多教程 ](#more )。
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| 算法论文 | 模型名称 | 模型类型 | 基础< br > 训练预测 | 更多< br > 训练方式 | 模型压缩 |  其他预测部署  |
							 
						 
					
						
							
								
									
										
										
										
											2021-10-21 06:42:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								| :--- | :--- |  :----:  | :--------: |  :----  |   :----  |   :----  |
							 
						 
					
						
							
								
									
										
										
										
											2021-11-18 06:27:46 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								| DB     |ch_ppocr_mobile_v2.0_det | 检测  | 支持 | 多机多卡 < br >  混合精度 | - | Paddle Inference: C++ < br >  Paddle Serving: Python, C++ < br >  Paddle-Lite: < br >  (1) ARM CPU(C++) |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| DB     |ch_ppocr_mobile_v2.0_det_FPGM | 检测  | 支持 | 多机多卡 < br >  混合精度 | FPGM裁剪 | Paddle Inference: C++ < br >  Paddle Serving: Python, C++ < br >  Paddle-Lite: < br >  (1) ARM CPU(C++) |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| DB     |ch_ppocr_mobile_v2.0_det_PACT | 检测  | 支持 | 多机多卡 < br >  混合精度 | PACT量化 | Paddle Inference: C++ < br >  Paddle Serving: Python, C++ < br >  Paddle-Lite: < br >  (1) ARM CPU(C++) |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| DB     |ch_ppocr_mobile_v2.0_det_KL | 检测  | 支持 | 多机多卡 < br >  混合精度 | 离线量化| Paddle Inference: C++ < br >  Paddle Serving: Python, C++ < br >  Paddle-Lite: < br >  (1) ARM CPU(C++) |
							 
						 
					
						
							
								
									
										
										
										
											2021-11-18 06:35:37 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								| DB     |ch_ppocr_server_v2.0_det | 检测  | 支持 | 多机多卡 < br >  混合精度 | - | Paddle Inference: C++ < br >  Paddle Serving: Python, C++ |
							 
						 
					
						
							
								
									
										
										
										
											2021-10-14 09:00:51 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								| DB     |ch_PP-OCRv2_det          | 检测  |
							 
						 
					
						
							
								
									
										
										
										
											2021-11-18 06:27:46 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								| CRNN   |ch_ppocr_mobile_v2.0_rec | 识别  | 支持 | 多机多卡 < br >  混合精度 | - | Paddle Inference: C++ < br >  Paddle Serving: Python, C++ < br >  Paddle-Lite: < br >  (1) ARM CPU(C++) |
							 
						 
					
						
							
								
									
										
										
										
											2021-11-18 06:35:37 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								| CRNN   |ch_ppocr_server_v2.0_rec | 识别  | 支持 | 多机多卡 < br >  混合精度 | - | Paddle Inference: C++ < br >  Paddle Serving: Python, C++ |
							 
						 
					
						
							
								
									
										
										
										
											2021-10-14 09:00:51 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								| CRNN   |ch_PP-OCRv2_rec          | 识别  |
							 
						 
					
						
							
								
									
										
										
										
											2021-10-21 07:02:01 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								| PP-OCR |ch_ppocr_mobile_v2.0 | 检测+识别  | 支持 | 多机多卡 < br >  混合精度 | - | Paddle Inference: C++ < br >  Paddle Serving: Python, C++ < br >  Paddle-Lite: < br >  (1) ARM CPU(C++) |
							 
						 
					
						
							
								
									
										
										
										
											2021-11-18 06:35:37 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								| PP-OCR |ch_ppocr_server_v2.0 | 检测+识别  | 支持 | 多机多卡 < br >  混合精度 | - | Paddle Inference: C++ < br >  Paddle Serving: Python, C++ |
							 
						 
					
						
							
								
									
										
										
										
											2021-10-21 06:52:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								|PP-OCRv2|ch_PP-OCRv2 | 检测+识别  |
							 
						 
					
						
							
								
									
										
										
										
											2021-10-14 07:03:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								| DB     |det_mv3_db_v2.0                | 检测  |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| DB     |det_r50_vd_db_v2.0             | 检测  |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| EAST   |det_mv3_east_v2.0              | 检测  |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| EAST   |det_r50_vd_east_v2.0           | 检测  |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| PSENet |det_mv3_pse_v2.0               | 检测  |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| PSENet |det_r50_vd_pse_v2.0            | 检测  |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| SAST   |det_r50_vd_sast_totaltext_v2.0 | 检测  |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| Rosetta|rec_mv3_none_none_ctc_v2.0     | 识别  |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| Rosetta|rec_r34_vd_none_none_ctc_v2.0  | 识别  |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| CRNN   |rec_mv3_none_bilstm_ctc_v2.0   | 识别  |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| CRNN   |rec_r34_vd_none_bilstm_ctc_v2.0| 识别  |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| StarNet|rec_mv3_tps_bilstm_ctc_v2.0    | 识别  |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| StarNet|rec_r34_vd_tps_bilstm_ctc_v2.0 | 识别  |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| RARE   |rec_mv3_tps_bilstm_att_v2.0    | 识别  |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| RARE   |rec_r34_vd_tps_bilstm_att_v2.0 | 识别  |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| SRN    |rec_r50fpn_vd_none_srn         | 识别  |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| NRTR   |rec_mtb_nrtr                   | 识别  |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| SAR    |rec_r31_sar                    | 识别  |
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								| PGNet  |rec_r34_vd_none_none_ctc_v2.0  | 端到端|
							 
						 
					
						
							
								
									
										
										
										
											2021-09-08 03:13:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-10-14 03:08:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-11-18 06:50:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								## 3. 测试工具简介
  
						 
					
						
							
								
									
										
										
										
											2021-10-14 03:08:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								### 目录介绍
  
						 
					
						
							
								
									
										
										
										
											2021-08-16 07:45:32 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-08 03:13:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								```shell
							 
						 
					
						
							
								
									
										
										
										
											2021-10-27 03:19:43 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								test_tipc/
							 
						 
					
						
							
								
									
										
										
										
											2021-10-14 03:05:49 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								├── configs/  # 配置文件目录
							 
						 
					
						
							
								
									
										
										
										
											2021-11-18 06:35:37 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								    ├── ch_ppocr_mobile_v2.0_det    # ch_ppocr_mobile_v2.0_det模型的测试配置文件目录
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								        ├── train_infer_python.txt      # 测试Linux上python训练预测( ) 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-12 06:13:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								        ├── model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt     # 测试Linux上c++预测的配置文件
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								        ├── model_linux_gpu_normal_normal_infer_python_jetson.txt         # 测试Jetson上python预测的配置文件
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								        ├── train_linux_gpu_fleet_amp_infer_python_linux_gpu_cpu.txt      # 测试Linux上多机多卡、混合精度训练和python预测的配置文件
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								        ├── ...  
							 
						 
					
						
							
								
									
										
										
										
											2021-11-18 06:35:37 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								    ├── ch_ppocr_server_v2.0_det               # ch_ppocr_server_v2.0_det模型的测试配置文件目录
							 
						 
					
						
							
								
									
										
										
										
											2021-11-12 06:13:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								        ├── ...  
							 
						 
					
						
							
								
									
										
										
										
											2021-11-18 06:35:37 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								    ├── ch_ppocr_mobile_v2.0_rec               # ch_ppocr_mobile_v2.0_rec模型的测试配置文件目录
							 
						 
					
						
							
								
									
										
										
										
											2021-11-12 06:13:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								        ├── ...  
							 
						 
					
						
							
								
									
										
										
										
											2021-11-18 06:35:37 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								    ├── ch_ppocr_server_v2.0_det               # ch_ppocr_server_v2.0_det模型的测试配置文件目录
							 
						 
					
						
							
								
									
										
										
										
											2021-11-12 06:13:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								        ├── ...  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								    ├── ...  
							 
						 
					
						
							
								
									
										
										
										
											2021-10-14 03:05:49 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								├── results/   # 预先保存的预测结果,用于和实际预测结果进行精读比对
							 
						 
					
						
							
								
									
										
										
										
											2021-11-18 19:26:39 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								    ├── python_ppocr_det_mobile_results_fp32.txt           # 预存的mobile版ppocr检测模型python预测fp32精度的结果
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								    ├── python_ppocr_det_mobile_results_fp16.txt           # 预存的mobile版ppocr检测模型python预测fp16精度的结果
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								    ├── cpp_ppocr_det_mobile_results_fp32.txt       # 预存的mobile版ppocr检测模型c++预测的fp32精度的结果
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								    ├── cpp_ppocr_det_mobile_results_fp16.txt       # 预存的mobile版ppocr检测模型c++预测的fp16精度的结果
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								    ├── ...
							 
						 
					
						
							
								
									
										
										
										
											2021-10-19 03:41:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								├── prepare.sh                        # 完成test_*.sh运行所需要的数据和模型下载
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								├── test_train_inference_python.sh    # 测试python训练预测的主程序
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								├── test_inference_cpp.sh             # 测试c++预测的主程序
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								├── test_serving.sh                   # 测试serving部署预测的主程序
							 
						 
					
						
							
								
									
										
										
										
											2021-11-18 10:50:18 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								├── test_lite_arm_cpu_cpp.sh          # 测试lite在arm_cpu上部署的C++预测的主程序
							 
						 
					
						
							
								
									
										
										
										
											2021-10-19 03:41:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								├── compare_results.py                # 用于对比log中的预测结果与results中的预存结果精度误差是否在限定范围内
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								└── readme.md                         # 使用文档
							 
						 
					
						
							
								
									
										
										
										
											2021-10-14 03:05:49 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2021-08-16 07:45:32 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-11-18 10:50:18 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								### 测试流程概述
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								使用本工具,可以测试不同功能的支持情况,以及预测结果是否对齐,测试流程概括如下:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								< div  align = "center" >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								    < img  src = "docs/test.png"  width = "800" > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								< / div >  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								1.  运行prepare.sh准备测试所需数据和模型;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								2.  运行要测试的功能对应的测试脚本`test_*.sh` , , ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								3.  用`compare_results.py` 对比log中的预测结果和预存在results目录下的结果, ( )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-11-18 19:17:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								测试单项功能仅需两行命令,**如需测试不同模型/功能,替换配置文件即可**,命令格式如下:
							 
						 
					
						
							
								
									
										
										
										
											2021-11-18 10:50:18 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								```shell
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# 功能:准备数据
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								# 格式:   
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								bash test_tipc/prepare.sh  configs/[model_name]/[params_file_name]  [Mode]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# 功能:运行测试
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								# 格式:   
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								bash test_tipc/test_train_inference_python.sh configs/[model_name]/[params_file_name]  [Mode]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								例如,测试基本训练预测功能的`lite_train_lite_infer` 模式,运行:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								```shell
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# 准备数据
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								bash test_tipc/prepare.sh ./test_tipc/configs/ch_ppocr_mobile_v2.0_det/train_infer_python.txt 'lite_train_lite_infer'
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								# 运行测试
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								bash test_tipc/test_train_inference_python.sh ./test_tipc/configs/ch_ppocr_mobile_v2.0_det/train_infer_python.txt 'lite_train_lite_infer'
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
								 
							
							
								```  
							 
						 
					
						
							
								
									
										
										
										
											2021-11-18 19:17:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								关于本示例命令的更多信息可查看[基础训练预测使用文档 ](https://github.com/PaddlePaddle/PaddleOCR/blob/dygraph/test_tipc/docs/test_train_inference_python.md#22-%E5%8A%9F%E8%83%BD%E6%B5%8B%E8%AF%95 )。
							 
						 
					
						
							
								
									
										
										
										
											2021-11-18 10:50:18 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-11-12 06:13:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								### 配置文件命名规范
  
						 
					
						
							
								
									
										
										
										
											2021-11-18 06:50:50 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								在`configs` 目录下,**按模型名称划分为子目录**,子目录中存放所有该模型测试需要用到的配置文件,配置文件的命名遵循如下规范:
							 
						 
					
						
							
								
									
										
										
										
											2021-11-12 06:13:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-11-18 06:35:37 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								1.  基础训练预测配置简单命名为:`train_infer_python.txt` ,表示**Linux环境下单机、不使用混合精度训练+python预测**,其完整命名对应`train_linux_gpu_normal_normal_infer_python_linux_gpu_cpu.txt` ,由于本配置文件使用频率较高,这里进行了名称简化。 
						 
					
						
							
								
									
										
										
										
											2021-11-12 06:13:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-11-18 06:35:37 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
										 
							
							
								2.  其他带训练配置命名格式为:`train_训练硬件环境(linux_gpu/linux_dcu/…)_是否多机(fleet/normal)_是否混合精度(amp/normal)_预测模式(infer/lite/serving/js)_语言(cpp/python/java)_预测硬件环境(linux_gpu/mac/jetson/opencl_arm_gpu/...).txt` 。如, `train_linux_gpu_fleet_amp_infer_python_linux_gpu_cpu.txt` , `train_linux_dcu_normal_normal_infer_python_linux_dcu.txt` 。 
						 
					
						
							
								
									
										
										
										
											2021-11-12 06:13:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-11-12 06:28:16 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
										 
							
							
								3.  仅预测的配置( ) : `model_训练硬件环境(linux_gpu/linux_dcu/…)_是否多机(fleet/normal)_是否混合精度(amp/normal)_(infer/lite/serving/js)_语言(cpp/python/java)_预测硬件环境(linux_gpu/mac/jetson/opencl_arm_gpu/...).txt` , , , , ,  
						 
					
						
							
								
									
										
										
										
											2021-11-12 06:13:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-11-18 19:17:25 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								**根据上述命名规范,可以直接从子目录名称和配置文件名找到需要测试的场景和功能对应的配置文件。**
							 
						 
					
						
							
								
									
										
										
										
											2021-11-12 06:13:17 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-09-16 19:54:16 +08:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-10-21 07:26:31 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								< a  name = "more" > < / a >  
						 
					
						
							
								
									
										
										
										
											2021-11-18 10:50:18 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
								 
							
							
								## 4. 开始测试
  
						 
					
						
							
								
									
										
										
										
											2021-10-19 04:02:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
										 
							
							
								各功能测试中涉及混合精度、裁剪、量化等训练相关, , : 
							 
						 
					
						
							
								
									
										
										
										
											2021-11-18 10:50:18 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
								
									
										 
							
							
								-  [test_train_inference_python 使用 ](docs/test_train_inference_python.md ) : ,  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								-  [test_inference_cpp 使用 ](docs/test_inference_cpp.md ):  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								-  [test_serving 使用 ](docs/test_serving.md ):  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								-  [test_lite_arm_cpu_cpp 使用 ](docs/test_lite_arm_cpu_cpp.md ):  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
								
									
										 
							
							
								-  [test_paddle2onnx 使用 ](docs/test_paddle2onnx.md ): ,