Skip to content

Commit 4048d8b

Browse files
committed
Update model references from YOLO11 to YOLO26 across configuration and schema files
1 parent 89645c0 commit 4048d8b

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

examples/YOLO_server_api/backend/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313

1414
# Base model variants
1515
MODEL_VARIANTS_ENV: str = os.getenv(
16-
'MODEL_VARIANTS', 'yolo11x,yolo11l,yolo11m,yolo11s,yolo11n',
16+
'MODEL_VARIANTS', 'yolo26x,yolo26l,yolo26m,yolo26s,yolo26n',
1717
)
1818
MODEL_VARIANTS: list[str] = [
1919
v.strip() for v in MODEL_VARIANTS_ENV.split(',') if v.strip()
2020
]
2121
if not MODEL_VARIANTS: # Fallback protection
22-
MODEL_VARIANTS = ['yolo11n']
22+
MODEL_VARIANTS = ['yolo26n']
2323

2424
# Whether to enable lazy loading of models:
2525
# True means models are loaded only when first used

examples/YOLO_server_api/backend/schemas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ModelFileUpdate(BaseModel):
2626
Represents the data required to update a model file.
2727
2828
Attributes:
29-
model (str): The model identifier (e.g., 'yolo11n').
29+
model (str): The model identifier (e.g., 'yolo26n').
3030
file (UploadFile): The uploaded file (e.g., .pt file).
3131
"""
3232

src/live_stream_detection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class LiveStreamDetector:
3939
def __init__(
4040
self,
4141
api_url: str | None = None,
42-
model_key: str = 'yolo11n',
42+
model_key: str = 'yolo26n',
4343
output_folder: str | None = None,
4444
detect_with_server: bool = False,
4545
shared_token: SharedToken | None = None,
@@ -105,7 +105,7 @@ def __init__(
105105
)
106106
else:
107107
self.model = AutoDetectionModel.from_pretrained(
108-
'yolo11',
108+
'yolo26',
109109
model_path=str(
110110
Path('models/pt') /
111111
f"best_{self.model_key}.pt",
@@ -1236,7 +1236,7 @@ async def main() -> None:
12361236
)
12371237
parser.add_argument(
12381238
'--model_key', type=str,
1239-
default='yolo11n', help='YOLO model identifier key',
1239+
default='yolo26n', help='YOLO model identifier key',
12401240
)
12411241
parser.add_argument(
12421242
'--detect_with_server',

src/live_stream_tracker.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ class DetectionResult(TypedDict):
1919

2020
class LiveStreamDetector:
2121
"""
22-
A class to perform live stream detection and tracking using YOLO11.
22+
A class to perform live stream detection and tracking using YOLO26.
2323
"""
2424

2525
def __init__(
2626
self,
2727
stream_url: str,
28-
model_path: str = '../models/pt/best_yolo11n.pt',
28+
model_path: str = '../models/pt/best_yolo26n.pt',
2929
):
3030
"""
3131
Initialise live stream detector with video URL, YOLO model path.
3232
3333
Args:
3434
stream_url (str): The full URL to the live video stream.
35-
model_path (str): The path to the YOLO11 model file.
35+
model_path (str): The path to the YOLO26 model file.
3636
"""
3737
self.stream_url = stream_url
3838
self.model_path = model_path
@@ -60,7 +60,7 @@ def generate_detections(
6060
now = datetime.datetime.now()
6161
timestamp = now.timestamp() # Unix timestamp
6262

63-
# Run YOLO11 tracking, maintain tracks across frames
63+
# Run YOLO26 tracking, maintain tracks across frames
6464
results = self.model.track(source=frame, persist=True)
6565

6666
# If detections exist, extract IDs and data
@@ -117,7 +117,7 @@ def main():
117117
Main function to run the live stream detection.
118118
"""
119119
parser = argparse.ArgumentParser(
120-
description='Perform live stream detection and tracking using YOLO11.',
120+
description='Perform live stream detection and tracking using YOLO26.',
121121
)
122122
parser.add_argument(
123123
'--url',
@@ -128,7 +128,7 @@ def main():
128128
parser.add_argument(
129129
'--model',
130130
type=str,
131-
default='../models/yolo11n.pt',
131+
default='../models/pt/yolo26n.pt',
132132
help='Path to the YOLO model',
133133
)
134134
args = parser.parse_args()

src/model_fetcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def __init__(
3535
"""
3636
self.api_url = api_url
3737
self.models = models or [
38-
'yolo11n', 'yolo11s', 'yolo11m', 'yolo11l', 'yolo11x',
38+
'yolo26n', 'yolo26s', 'yolo26m', 'yolo26l', 'yolo26x',
3939
]
4040
self.local_dir = Path(local_dir)
4141

0 commit comments

Comments
 (0)