pth 模型与 onnx 模型的测试结果相差较大

作者: weilanShi创建于 2026年4月10日更新于 2026年4月10日

<img width="895" height="620" alt="Image" src="https://GitHub.com/user-attachments/assets/541e32ba-f17c-4bcc-b087-09ba45431977" /> <img width="879" height="602" alt="Image" src="https://GitHub.com/user-attachments/assets/2fc5f96a-9331-43d4-874d-ef1097906715" /> As shown in the figure, the pth inference results are on the top, and the onnx inference results are on the bottom (the pth and onnx inference results of rep are aligned, and the model configuration is config_file = "configs/pretrain/yolo_world_v2_s_vlpan_bn_2e-3_100e_4x8gpus_obj365v1_goldg_train_lvis_minival.py" checkpoint = "weights_p/yolo_world_v2_s_obj365v1_goldg_pretrain-55b943ea.pth" text = "data/texts/obj365v1_class_texts.json" ), it can be seen that the difference in the results is quite large, the model, parameter thresholds, and input sizes are all aligned, and the debug input data processing is also consistent. After the data enters the backbone+neck+head, the output is incorrect, and we do not know whether there is a problem in the backbone+neck+head inference or in the text processing. Another phenomenon is that the same image_demo code, config, checkpoint, and text are all replaced with coco, and the inference results are normal. We really do not know where the problem is.

内容来源: AILab-CVC/YOLO-World