mirror of
				https://github.com/PaddlePaddle/FastDeploy.git
				synced 2025-10-31 20:02:53 +08:00 
			
		
		
		
	 89181042f5
			
		
	
	89181042f5
	
	
	
		
			
			* update .gitignore * Added checking for cmake include dir * fixed missing trt_backend option bug when init from trt * remove un-need data layout and add pre-check for dtype * changed RGB2BRG to BGR2RGB in ppcls model * add model_zoo yolov6 c++/python demo * fixed CMakeLists.txt typos * update yolov6 cpp/README.md * add yolox c++/pybind and model_zoo demo * move some helpers to private * fixed CMakeLists.txt typos * add normalize with alpha and beta * add version notes for yolov5/yolov6/yolox * add copyright to yolov5.cc * revert normalize * fixed some bugs in yolox
YOLOv6部署示例
当前支持模型版本为:YOLOv6 v0.1.0
本文档说明如何进行YOLOv6的快速部署推理。本目录结构如下
.
├── cpp                 # C++ 代码目录
│   ├── CMakeLists.txt  # C++ 代码编译CMakeLists文件
│   ├── README.md       # C++ 代码编译部署文档
│   └── yolov6.cc       # C++ 示例代码
├── README.md           # YOLOv6 部署文档
└── yolov6.py           # Python示例代码
安装FastDeploy
使用如下命令安装FastDeploy,注意到此处安装的是vision-cpu,也可根据需求安装vision-gpu
# 安装fastdeploy-python工具
pip install fastdeploy-python
# 安装vision-cpu模块
fastdeploy install vision-cpu
Python部署
执行如下代码即会自动下载YOLOv6模型和测试图片
python yolov6.py
执行完成后会将可视化结果保存在本地vis_result.jpg,同时输出检测结果如下
DetectionResult: [xmin, ymin, xmax, ymax, score, label_id]
11.772949,229.269287, 792.933838, 748.294189, 0.954794, 5
667.140381,396.185455, 807.701721, 881.810120, 0.900997, 0
223.271011,405.105743, 345.740723, 859.328552, 0.898938, 0
50.135777,405.863129, 245.485519, 904.153809, 0.888936, 0
0.000000,549.002869, 77.864723, 869.455017, 0.614145, 0