Replies: 2 comments
-
👋 Hello @abysshal, thank you for reaching out to the Ultralytics community 🚀! It seems you've encountered an issue with differing inference results between Ultralytics versions. 🤔 While we suggest using consistent versions for training and inference to ensure compatibility, there might be underlying factors worth exploring further. If this is a 🐛 Bug Report, please provide a minimum reproducible example to assist us in debugging. In the meantime, check out our Docs for guidance on usage and ensure you're following the Tips for Best Training Results. Stay connected with the Ultralytics community where it suits you. Join real-time conversations on Discord 🎧, engage in discussions on Discourse, or explore topics on our Subreddit. UpgradeTo ensure all is up-to-date, upgrade to the latest pip install -U ultralytics EnvironmentsYOLO can be run in any of the following environments with pre-configured dependencies:
StatusIf this badge is green, all Ultralytics CI tests are passing, confirming compatibility across various systems. This is an automated response, but an Ultralytics engineer will follow up with you soon. 👩💻👨💻 |
Beta Was this translation helpful? Give feedback.
-
@abysshal version differences can affect model inference results. It's recommended to use the same version for both training and inference to ensure consistency. For further details, please refer to the YOLO Common Issues Guide. |
Beta Was this translation helpful? Give feedback.
-
We used ultralytics==8.0.232 to fine-tune the yolov8s-cls model on our datasets. When tested under version 8.0.232, the top1 result shows the class name is 50022 with a score of 0.98, which is right. But when tested under version 8.2.78 with same model same parameters, the top5 results are totally different. This leaves us wondering what parameters are not set right, or is there really a law: the same version of the framework must be used to train and predict.
`test1> yolo classify predict model=yolov8s-cls-ep645_best.pt source=1080_608_out.jpg imgsz=224
Ultralytics YOLOv8.0.232 🚀 Python-3.9.0 torch-2.2.2 CPU (Intel Core(TM) i9-9880H 2.30GHz)
YOLOv8s-cls summary (fused): 73 layers, 5877106 parameters, 0 gradients, 13.1 GFLOPs
image 1/1 1080_608_out.jpg: 224x224 50022 0.98, 03709 0.02, 50030 0.00, 04103 0.00, 03812 0.00, 29.8ms
test1> yolo classify predict model=yolov8s-cls-ep645_best.pt source=1080_608_out.jpg imgsz=224
Speed: 2.2ms preprocess, 29.8ms inference, 0.1ms postprocess per image at shape (1, 3, 224, 224)
Ultralytics YOLOv8.2.78 🚀 Python-3.10.14 torch-2.2.2 CPU (Intel Core(TM) i9-9880H 2.30GHz)
YOLOv8s-cls summary (fused): 73 layers, 5,877,106 parameters, 0 gradients, 13.1 GFLOPs
image 1/1 1080_608_out.jpg: 224x224 04103 0.49, 50042 0.10, 04127 0.10, 04130 0.07, 03716 0.05, 60.2ms
Speed: 13.8ms preprocess, 60.2ms inference, 0.1ms postprocess per image at shape (1, 3, 224, 224)
`
Beta Was this translation helpful? Give feedback.
All reactions