PaddlePaddle / PaddlePaddle/FastDeploy
原生yolo8与fd精度有差异
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.7k
- Forks
- 756
- Avg merge
- 19h 28m
- Merged PRs (30d)
- 4
Description
温馨提示:根据社区不完全统计,按照模板提问,可以加快回复和解决问题的速度
环境
- 【FastDeploy版本】: fastdeploy-gpu-python 1.0.6
- 【编译命令】如果您是自行编译的FastDeploy,请说明您的编译方式(参数命令)
- 【系统平台】: win11
- 【硬件】: 说明具体硬件型号,如 Nvidia GPU 3080TI, CUDA 11.2 CUDNN 8.3
- 【编译语言】: C++ / Python(3.7或3.8等)
问题日志及出现问题的操作流程
- 附上详细的问题日志有助于快速定位分析
- 【模型精度问题】
yolo8模型训练时imgsz=640,用原生yolo8预测时imgsz=4000,预测图片如下

导出onnx时imgsz也是4000,用fd进行预测,代码如下
cap = cv2.VideoCapture(test_img2)
success, frame = cap.read()
preprocessor = fd.vision.detection.YOLOv8Preprocessor()
preprocessor.size = [4000, 4000]
postprocessor = fd.vision.detection.YOLOv8Postprocessor()
postprocessor.nms_threshold = nms
postprocessor.conf_threshold = conf
# 暖机
res = model.predict(np.zeros_like(frame))
res = model.predict(frame)
预测图片如下:

可以看到基本没有预测效果
但是,将图片切成640X640的小图,用fd预测,并拼接后结果与原生yolo8预测基本一致,但也有可见精度差异。
求助以上结果产生原因及解决办法
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the discrepancy with the shown YOLOv8Preprocessor, YOLOv8Postprocessor, and model.predict flow, comparing full 4000×4000 inference with the 640×640 tiled workflow. Check that preprocessing, confidence and NMS thresholds, and image dimensions match the native YOLOv8 run. Done means identifying the cause and documenting or correcting the difference so the full-image and native results are consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- opencv, python
- Domain
- computer-vision, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100