diff --git a/README.md b/README.md
index d1a921cfd..953fb6dff 100644
--- a/README.md
+++ b/README.md
@@ -266,4 +266,6 @@ python -m scripts.run_code_style format
Aynur Susuz
-
+Pranav Durai
+
+
\ No newline at end of file
diff --git a/sahi/utils/yolov8.py b/sahi/utils/yolov8.py
index b94dc5538..919b9b414 100644
--- a/sahi/utils/yolov8.py
+++ b/sahi/utils/yolov8.py
@@ -17,6 +17,9 @@ class Yolov8TestConstants:
YOLOV8M_MODEL_URL = "https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8l.pt"
YOLOV8M_MODEL_PATH = "tests/data/models/yolov8/yolov8l.pt"
+ YOLOV8M_MODEL_URL = "https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8x.pt"
+ YOLOV8M_MODEL_PATH = "tests/data/models/yolov8/yolov8x.pt"
+
def download_yolov8n_model(destination_path: Optional[str] = None):
if destination_path is None:
@@ -68,3 +71,16 @@ def download_yolov8l_model(destination_path: Optional[str] = None):
Yolov8TestConstants.YOLOV8L_MODEL_URL,
destination_path,
)
+
+
+def download_yolov8x_model(destination_path: Optional[str] = None):
+ if destination_path is None:
+ destination_path = Yolov8TestConstants.YOLOV8X_MODEL_PATH
+
+ Path(destination_path).parent.mkdir(parents=True, exist_ok=True)
+
+ if not path.exists(destination_path):
+ urllib.request.urlretrieve(
+ Yolov8TestConstants.YOLOV8X_MODEL_URL,
+ destination_path,
+ )