Default to YOLO11 models (#16561)
This commit is contained in:
parent
b38831e790
commit
1797506c9f
1 changed files with 20 additions and 20 deletions
|
|
@ -42,11 +42,11 @@ TASK2DATA = {
|
||||||
"obb": "dota8.yaml",
|
"obb": "dota8.yaml",
|
||||||
}
|
}
|
||||||
TASK2MODEL = {
|
TASK2MODEL = {
|
||||||
"detect": "yolov8n.pt",
|
"detect": "yolo11n.pt",
|
||||||
"segment": "yolov8n-seg.pt",
|
"segment": "yolo11n-seg.pt",
|
||||||
"classify": "yolov8n-cls.pt",
|
"classify": "yolo11n-cls.pt",
|
||||||
"pose": "yolov8n-pose.pt",
|
"pose": "yolo11n-pose.pt",
|
||||||
"obb": "yolov8n-obb.pt",
|
"obb": "yolo11n-obb.pt",
|
||||||
}
|
}
|
||||||
TASK2METRIC = {
|
TASK2METRIC = {
|
||||||
"detect": "metrics/mAP50-95(B)",
|
"detect": "metrics/mAP50-95(B)",
|
||||||
|
|
@ -69,19 +69,19 @@ CLI_HELP_MSG = f"""
|
||||||
See all ARGS at https://docs.ultralytics.com/usage/cfg or with 'yolo cfg'
|
See all ARGS at https://docs.ultralytics.com/usage/cfg or with 'yolo cfg'
|
||||||
|
|
||||||
1. Train a detection model for 10 epochs with an initial learning_rate of 0.01
|
1. Train a detection model for 10 epochs with an initial learning_rate of 0.01
|
||||||
yolo train data=coco8.yaml model=yolov8n.pt epochs=10 lr0=0.01
|
yolo train data=coco8.yaml model=yolo11n.pt epochs=10 lr0=0.01
|
||||||
|
|
||||||
2. Predict a YouTube video using a pretrained segmentation model at image size 320:
|
2. Predict a YouTube video using a pretrained segmentation model at image size 320:
|
||||||
yolo predict model=yolov8n-seg.pt source='https://youtu.be/LNwODJXcvt4' imgsz=320
|
yolo predict model=yolo11n-seg.pt source='https://youtu.be/LNwODJXcvt4' imgsz=320
|
||||||
|
|
||||||
3. Val a pretrained detection model at batch-size 1 and image size 640:
|
3. Val a pretrained detection model at batch-size 1 and image size 640:
|
||||||
yolo val model=yolov8n.pt data=coco8.yaml batch=1 imgsz=640
|
yolo val model=yolo11n.pt data=coco8.yaml batch=1 imgsz=640
|
||||||
|
|
||||||
4. Export a YOLOv8n classification model to ONNX format at image size 224 by 128 (no TASK required)
|
4. Export a YOLO11n classification model to ONNX format at image size 224 by 128 (no TASK required)
|
||||||
yolo export model=yolov8n-cls.pt format=onnx imgsz=224,128
|
yolo export model=yolo11n-cls.pt format=onnx imgsz=224,128
|
||||||
|
|
||||||
5. Explore your datasets using semantic search and SQL with a simple GUI powered by Ultralytics Explorer API
|
5. Explore your datasets using semantic search and SQL with a simple GUI powered by Ultralytics Explorer API
|
||||||
yolo explorer data=data.yaml model=yolov8n.pt
|
yolo explorer data=data.yaml model=yolo11n.pt
|
||||||
|
|
||||||
6. Streamlit real-time webcam inference GUI
|
6. Streamlit real-time webcam inference GUI
|
||||||
yolo streamlit-predict
|
yolo streamlit-predict
|
||||||
|
|
@ -517,7 +517,7 @@ def handle_yolo_settings(args: List[str]) -> None:
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
>>> handle_yolo_settings(["reset"]) # Reset YOLO settings
|
>>> handle_yolo_settings(["reset"]) # Reset YOLO settings
|
||||||
>>> handle_yolo_settings(["default_cfg_path=yolov8n.yaml"]) # Update a specific setting
|
>>> handle_yolo_settings(["default_cfg_path=yolo11n.yaml"]) # Update a specific setting
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
- If no arguments are provided, the function will display the current settings.
|
- If no arguments are provided, the function will display the current settings.
|
||||||
|
|
@ -557,7 +557,7 @@ def handle_explorer(args: List[str]):
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
```bash
|
```bash
|
||||||
yolo explorer data=data.yaml model=yolov8n.pt
|
yolo explorer data=data.yaml model=yolo11n.pt
|
||||||
```
|
```
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
|
|
@ -611,9 +611,9 @@ def parse_key_value_pair(pair: str = "key=value"):
|
||||||
AssertionError: If the value is missing or empty.
|
AssertionError: If the value is missing or empty.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
>>> key, value = parse_key_value_pair("model=yolov8n.pt")
|
>>> key, value = parse_key_value_pair("model=yolo11n.pt")
|
||||||
>>> print(f"Key: {key}, Value: {value}")
|
>>> print(f"Key: {key}, Value: {value}")
|
||||||
Key: model, Value: yolov8n.pt
|
Key: model, Value: yolo11n.pt
|
||||||
|
|
||||||
>>> key, value = parse_key_value_pair("epochs=100")
|
>>> key, value = parse_key_value_pair("epochs=100")
|
||||||
>>> print(f"Key: {key}, Value: {value}")
|
>>> print(f"Key: {key}, Value: {value}")
|
||||||
|
|
@ -686,13 +686,13 @@ def entrypoint(debug=""):
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
Train a detection model for 10 epochs with an initial learning_rate of 0.01:
|
Train a detection model for 10 epochs with an initial learning_rate of 0.01:
|
||||||
>>> entrypoint("train data=coco8.yaml model=yolov8n.pt epochs=10 lr0=0.01")
|
>>> entrypoint("train data=coco8.yaml model=yolo11n.pt epochs=10 lr0=0.01")
|
||||||
|
|
||||||
Predict a YouTube video using a pretrained segmentation model at image size 320:
|
Predict a YouTube video using a pretrained segmentation model at image size 320:
|
||||||
>>> entrypoint("predict model=yolov8n-seg.pt source='https://youtu.be/LNwODJXcvt4' imgsz=320")
|
>>> entrypoint("predict model=yolo11n-seg.pt source='https://youtu.be/LNwODJXcvt4' imgsz=320")
|
||||||
|
|
||||||
Validate a pretrained detection model at batch-size 1 and image size 640:
|
Validate a pretrained detection model at batch-size 1 and image size 640:
|
||||||
>>> entrypoint("val model=yolov8n.pt data=coco8.yaml batch=1 imgsz=640")
|
>>> entrypoint("val model=yolo11n.pt data=coco8.yaml batch=1 imgsz=640")
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
- If no arguments are passed, the function will display the usage help message.
|
- If no arguments are passed, the function will display the usage help message.
|
||||||
|
|
@ -782,7 +782,7 @@ def entrypoint(debug=""):
|
||||||
# Model
|
# Model
|
||||||
model = overrides.pop("model", DEFAULT_CFG.model)
|
model = overrides.pop("model", DEFAULT_CFG.model)
|
||||||
if model is None:
|
if model is None:
|
||||||
model = "yolov8n.pt"
|
model = "yolo11n.pt"
|
||||||
LOGGER.warning(f"WARNING ⚠️ 'model' argument is missing. Using default 'model={model}'.")
|
LOGGER.warning(f"WARNING ⚠️ 'model' argument is missing. Using default 'model={model}'.")
|
||||||
overrides["model"] = model
|
overrides["model"] = model
|
||||||
stem = Path(model).stem.lower()
|
stem = Path(model).stem.lower()
|
||||||
|
|
@ -869,5 +869,5 @@ def copy_default_cfg():
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# Example: entrypoint(debug='yolo predict model=yolov8n.pt')
|
# Example: entrypoint(debug='yolo predict model=yolo11n.pt')
|
||||||
entrypoint(debug="")
|
entrypoint(debug="")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue