Repository navigation
YOLOV8+SAHI speed is a bit slow, how to improve speed? #1025
lhq15606085117
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Here is my code, which divides about 10 images and takes 15 seconds to complete the inference. Is there any way to improve the speed? Please reply, thank you!
yolov8_model_path = "best.pt"
download_yolov8s_model(yolov8_model_path)
detection_model = AutoDetectionModel.from_pretrained(
model_type='yolov8',
model_path=yolov8_model_path,
confidence_threshold=0.6,
device="cuda:0", # or 'cuda:0'
)
imgesData = "D:/ultralytics-main/ultralytics-main/save/12.jpg"
result = get_sliced_prediction(
imgesData,
detection_model,
slice_height=2880,
slice_width=2880,
overlap_height_ratio=0.1,
overlap_width_ratio=0.1,
postprocess_type="NMS",
postprocess_match_threshold=0.9,
postprocess_match_metric="IOS"
)
All reactions