You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the YOLOv8 issues and discussions and found no similar questions.
Question
I have question about Predict method in batchwise.
I see that model.predict(img_path_list) works but it dosen't faster with considerting total time cost.
What i want is to get same time with 1)model.predict(single_img) and 2)model.predict(multiple_img)
Could you tell me if i missed some point. Thx.
Additional
No response
The text was updated successfully, but these errors were encountered:
Hello! Thanks for your question regarding batch-wise prediction speed using the YOLOv8 model. It sounds like you want to see similar time performance whether predicting on a single image or multiple images simultaneously.
If you're seeing slower predictions for batch mode relative to single image mode, this could be related to several factors, such as GPU utilization, I/O overhead from loading multiple images, or the efficient batching of GPU resources.
A few areas to explore:
Ensure your GPU is optimally utilized: Check if your GPU is being fully utilized during batch predictions. Tools like nvidia-smi can help monitor this.
Batch size adjustments: Consider adjusting the batch size for optimal performance based on your hardware specifications.
Image preprocessing: Ensure that image loading and preprocessing steps are not causing a bottleneck.
Here's a simple usage example ensuring GPU is utilized if accessible:
fromultralyticsimportYOLO# Load a modelmodel=YOLO('yolov8n.pt', device='cuda'iftorch.cuda.is_available() else'cpu') # Ensuring it tries to use GPU if available# Predict multiple imagesresults=model.predict(['im1.jpg', 'im2.jpg'])
If you continue to experience issues, profiling your inferencing times with detailed GPU metrics may offer more insights into where the delays occur. 🚀
Search before asking
Question
I have question about Predict method in batchwise.
I see that model.predict(img_path_list) works but it dosen't faster with considerting total time cost.
What i want is to get same time with 1)model.predict(single_img) and 2)model.predict(multiple_img)
Could you tell me if i missed some point. Thx.
Additional
No response
The text was updated successfully, but these errors were encountered: