mirror of
https://github.com/ultralytics/ultralytics.git
synced 2025-09-15 15:48:41 +08:00
Dockerfile export Sony IMX with YOLO11 (#20367)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
41a812a0a5
commit
b6088ad7f2
@ -42,7 +42,7 @@ RUN uv pip install --system numpy==1.26.4
|
||||
# Run exports to AutoInstall packages
|
||||
RUN yolo export model=tmp/yolo11n.pt format=edgetpu imgsz=32
|
||||
RUN yolo export model=tmp/yolo11n.pt format=ncnn imgsz=32
|
||||
RUN yolo export model=tmp/yolov8n.pt format=imx imgsz=32
|
||||
RUN yolo export model=tmp/yolo11n.pt format=imx imgsz=32
|
||||
RUN uv pip install --system paddlepaddle x2paddle
|
||||
|
||||
# Remove extra build files
|
||||
|
||||
@ -42,7 +42,7 @@ RUN uv pip install --system numpy==1.26.4
|
||||
# Run exports to AutoInstall packages
|
||||
RUN yolo export model=tmp/yolo11n.pt format=edgetpu imgsz=32
|
||||
RUN yolo export model=tmp/yolo11n.pt format=ncnn imgsz=32
|
||||
RUN yolo export model=tmp/yolov8n.pt format=imx imgsz=32
|
||||
RUN yolo export model=tmp/yolo11n.pt format=imx imgsz=32
|
||||
RUN uv pip install --system paddlepaddle x2paddle
|
||||
|
||||
# Remove extra build files
|
||||
|
||||
@ -22,18 +22,18 @@ Here's a brief description of our CI actions:
|
||||
|
||||
Below is the table showing the status of these CI tests for our main repositories:
|
||||
|
||||
| Repository | CI | Docker Deployment | Broken Links | CodeQL | PyPI and Docs Publishing |
|
||||
| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [yolov3](https://github.com/ultralytics/yolov3) | [](https://github.com/ultralytics/yolov3/actions/workflows/ci-testing.yml) | [](https://github.com/ultralytics/yolov3/actions/workflows/docker.yml) | [](https://github.com/ultralytics/yolov3/actions/workflows/links.yml) | [](https://github.com/ultralytics/yolov3/actions/workflows/github-code-scanning/codeql) | |
|
||||
| [yolov5](https://github.com/ultralytics/yolov5) | [](https://github.com/ultralytics/yolov5/actions/workflows/ci-testing.yml) | [](https://github.com/ultralytics/yolov5/actions/workflows/docker.yml) | [](https://github.com/ultralytics/yolov5/actions/workflows/links.yml) | [](https://github.com/ultralytics/yolov5/actions/workflows/github-code-scanning/codeql) | |
|
||||
| [ultralytics](https://github.com/ultralytics/ultralytics) | [](https://github.com/ultralytics/ultralytics/actions/workflows/ci.yml) | [](https://github.com/ultralytics/ultralytics/actions/workflows/docker.yml) | [](https://github.com/ultralytics/ultralytics/actions/workflows/links.yml) | [](https://github.com/ultralytics/ultralytics/actions/workflows/github-code-scanning/codeql) | [](https://github.com/ultralytics/ultralytics/actions/workflows/publish.yml) |
|
||||
| [hub-sdk](https://github.com/ultralytics/hub-sdk) | [](https://github.com/ultralytics/hub-sdk/actions/workflows/ci.yml) | | [](https://github.com/ultralytics/hub-sdk/actions/workflows/links.yml) | [](https://github.com/ultralytics/hub-sdk/actions/workflows/github-code-scanning/codeql) | [](https://github.com/ultralytics/hub-sdk/actions/workflows/publish.yml) |
|
||||
| [hub](https://github.com/ultralytics/hub) | [](https://github.com/ultralytics/hub/actions/workflows/ci.yml) | | [](https://github.com/ultralytics/hub/actions/workflows/links.yml) | | |
|
||||
| [mkdocs](https://github.com/ultralytics/mkdocs) | [](https://github.com/ultralytics/mkdocs/actions/workflows/format.yml) | | | [](https://github.com/ultralytics/mkdocs/actions/workflows/github-code-scanning/codeql) | [](https://github.com/ultralytics/mkdocs/actions/workflows/publish.yml) |
|
||||
| [thop](https://github.com/ultralytics/thop) | [](https://github.com/ultralytics/thop/actions/workflows/format.yml) | | | [](https://github.com/ultralytics/thop/actions/workflows/github-code-scanning/codeql) | [](https://github.com/ultralytics/mkdocs/actions/workflows/publish.yml) |
|
||||
| [actions](https://github.com/ultralytics/mkdocs) | [](https://github.com/ultralytics/actions/actions/workflows/format.yml) | | | [](https://github.com/ultralytics/actions/actions/workflows/github-code-scanning/codeql) | [](https://github.com/ultralytics/actions/actions/workflows/publish.yml) |
|
||||
| [docs](https://github.com/ultralytics/docs) | [](https://github.com/ultralytics/docs/actions/workflows/format.yml) | | [](https://github.com/ultralytics/docs/actions/workflows/links.yml)[](https://github.com/ultralytics/docs/actions/workflows/check_domains.yml) | | [](https://github.com/ultralytics/docs/actions/workflows/pages/pages-build-deployment) |
|
||||
| [handbook](https://github.com/ultralytics/handbook) | [](https://github.com/ultralytics/handbook/actions/workflows/format.yml) | | [](https://github.com/ultralytics/handbook/actions/workflows/links.yml) | | [](https://github.com/ultralytics/handbook/actions/workflows/pages/pages-build-deployment) |
|
||||
| Repository | CI | Docker Deployment | Broken Links | CodeQL | PyPI and Docs Publishing |
|
||||
| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [yolov3](https://github.com/ultralytics/yolov3) | [](https://github.com/ultralytics/yolov3/actions/workflows/ci-testing.yml) | [](https://github.com/ultralytics/yolov3/actions/workflows/docker.yml) | [](https://github.com/ultralytics/yolov3/actions/workflows/links.yml) | [](https://github.com/ultralytics/yolov3/actions/workflows/github-code-scanning/codeql) | |
|
||||
| [yolov5](https://github.com/ultralytics/yolov5) | [](https://github.com/ultralytics/yolov5/actions/workflows/ci-testing.yml) | [](https://github.com/ultralytics/yolov5/actions/workflows/docker.yml) | [](https://github.com/ultralytics/yolov5/actions/workflows/links.yml) | [](https://github.com/ultralytics/yolov5/actions/workflows/github-code-scanning/codeql) | |
|
||||
| [ultralytics](https://github.com/ultralytics/ultralytics) | [](https://github.com/ultralytics/ultralytics/actions/workflows/ci.yml) | [](https://github.com/ultralytics/ultralytics/actions/workflows/docker.yml) | [](https://github.com/ultralytics/ultralytics/actions/workflows/links.yml) | [](https://github.com/ultralytics/ultralytics/actions/workflows/github-code-scanning/codeql) | [](https://github.com/ultralytics/ultralytics/actions/workflows/publish.yml) [](https://github.com/conda-forge/ultralytics-feedstock/actions/workflows/check-prs.yml) |
|
||||
| [hub-sdk](https://github.com/ultralytics/hub-sdk) | [](https://github.com/ultralytics/hub-sdk/actions/workflows/ci.yml) | | [](https://github.com/ultralytics/hub-sdk/actions/workflows/links.yml) | [](https://github.com/ultralytics/hub-sdk/actions/workflows/github-code-scanning/codeql) | [](https://github.com/ultralytics/hub-sdk/actions/workflows/publish.yml) |
|
||||
| [hub](https://github.com/ultralytics/hub) | [](https://github.com/ultralytics/hub/actions/workflows/ci.yml) | | [](https://github.com/ultralytics/hub/actions/workflows/links.yml) | | |
|
||||
| [mkdocs](https://github.com/ultralytics/mkdocs) | [](https://github.com/ultralytics/mkdocs/actions/workflows/format.yml) | | | [](https://github.com/ultralytics/mkdocs/actions/workflows/github-code-scanning/codeql) | [](https://github.com/ultralytics/mkdocs/actions/workflows/publish.yml) |
|
||||
| [thop](https://github.com/ultralytics/thop) | [](https://github.com/ultralytics/thop/actions/workflows/format.yml) | | | [](https://github.com/ultralytics/thop/actions/workflows/github-code-scanning/codeql) | [](https://github.com/ultralytics/mkdocs/actions/workflows/publish.yml) |
|
||||
| [actions](https://github.com/ultralytics/mkdocs) | [](https://github.com/ultralytics/actions/actions/workflows/format.yml) | | | [](https://github.com/ultralytics/actions/actions/workflows/github-code-scanning/codeql) | [](https://github.com/ultralytics/actions/actions/workflows/publish.yml) |
|
||||
| [docs](https://github.com/ultralytics/docs) | [](https://github.com/ultralytics/docs/actions/workflows/format.yml) | | [](https://github.com/ultralytics/docs/actions/workflows/links.yml)[](https://github.com/ultralytics/docs/actions/workflows/check_domains.yml) | | [](https://github.com/ultralytics/docs/actions/workflows/pages/pages-build-deployment) |
|
||||
| [handbook](https://github.com/ultralytics/handbook) | [](https://github.com/ultralytics/handbook/actions/workflows/format.yml) | | [](https://github.com/ultralytics/handbook/actions/workflows/links.yml) | | [](https://github.com/ultralytics/handbook/actions/workflows/pages/pages-build-deployment) |
|
||||
|
||||
Each badge shows the status of the last run of the corresponding CI test on the `main` branch of the respective repository. If a test fails, the badge will display a "failing" status, and if it passes, it will display a "passing" status.
|
||||
|
||||
|
||||
@ -700,7 +700,7 @@ class Exporter:
|
||||
|
||||
@try_export
|
||||
def export_mnn(self, prefix=colorstr("MNN:")):
|
||||
"""YOLOv8 MNN export using MNN https://github.com/alibaba/MNN."""
|
||||
"""YOLO MNN export using MNN https://github.com/alibaba/MNN."""
|
||||
f_onnx, _ = self.export_onnx() # get onnx model first
|
||||
|
||||
check_requirements("MNN>=2.9.6")
|
||||
|
||||
@ -47,7 +47,7 @@ class DetectionPredictor(BasePredictor):
|
||||
(list): List of Results objects containing the post-processed predictions.
|
||||
|
||||
Examples:
|
||||
>>> predictor = DetectionPredictor(overrides=dict(model="yolov8n.pt"))
|
||||
>>> predictor = DetectionPredictor(overrides=dict(model="yolo11n.pt"))
|
||||
>>> results = predictor.predict("path/to/image.jpg")
|
||||
>>> processed_results = predictor.postprocess(preds, img, orig_imgs)
|
||||
"""
|
||||
|
||||
@ -29,16 +29,15 @@ class YOLO(Model):
|
||||
(YOLOWorld or YOLOE) based on the model filename.
|
||||
|
||||
Args:
|
||||
model (str | Path): Model name or path to model file, i.e. 'yolo11n.pt', 'yolov8n.yaml'.
|
||||
model (str | Path): Model name or path to model file, i.e. 'yolo11n.pt', 'yolo11n.yaml'.
|
||||
task (str | None): YOLO task specification, i.e. 'detect', 'segment', 'classify', 'pose', 'obb'.
|
||||
Defaults to auto-detection based on model.
|
||||
verbose (bool): Display model info on load.
|
||||
|
||||
Examples:
|
||||
>>> from ultralytics import YOLO
|
||||
>>> model = YOLO("yolov8n.pt") # load a pretrained YOLOv8n detection model
|
||||
>>> model = YOLO("yolov8n-seg.pt") # load a pretrained YOLOv8n segmentation model
|
||||
>>> model = YOLO("yolo11n.pt") # load a pretrained YOLOv11n detection model
|
||||
>>> model = YOLO("yolo11n-seg.pt") # load a pretrained YOLO11n segmentation model
|
||||
"""
|
||||
path = Path(model)
|
||||
if "-world" in path.stem and path.suffix in {".pt", ".yaml", ".yml"}: # if YOLOWorld PyTorch model
|
||||
|
||||
@ -65,7 +65,7 @@ class OBBTrainer(yolo.detect.DetectionTrainer):
|
||||
|
||||
Examples:
|
||||
>>> trainer = OBBTrainer()
|
||||
>>> model = trainer.get_model(cfg="yolov8n-obb.yaml", weights="yolov8n-obb.pt")
|
||||
>>> model = trainer.get_model(cfg="yolo11n-obb.yaml", weights="yolo11n-obb.pt")
|
||||
"""
|
||||
model = OBBModel(cfg, nc=self.data["nc"], ch=self.data["channels"], verbose=verbose and RANK == -1)
|
||||
if weights:
|
||||
|
||||
@ -41,7 +41,7 @@ class PosePredictor(DetectionPredictor):
|
||||
Examples:
|
||||
>>> from ultralytics.utils import ASSETS
|
||||
>>> from ultralytics.models.yolo.pose import PosePredictor
|
||||
>>> args = dict(model="yolov8n-pose.pt", source=ASSETS)
|
||||
>>> args = dict(model="yolo11n-pose.pt", source=ASSETS)
|
||||
>>> predictor = PosePredictor(overrides=args)
|
||||
>>> predictor.predict_cli()
|
||||
"""
|
||||
|
||||
@ -53,7 +53,7 @@ class PoseTrainer(yolo.detect.DetectionTrainer):
|
||||
|
||||
Examples:
|
||||
>>> from ultralytics.models.yolo.pose import PoseTrainer
|
||||
>>> args = dict(model="yolov8n-pose.pt", data="coco8-pose.yaml", epochs=3)
|
||||
>>> args = dict(model="yolo11n-pose.pt", data="coco8-pose.yaml", epochs=3)
|
||||
>>> trainer = PoseTrainer(overrides=args)
|
||||
>>> trainer.train()
|
||||
"""
|
||||
|
||||
@ -62,7 +62,7 @@ class PoseValidator(DetectionValidator):
|
||||
|
||||
Examples:
|
||||
>>> from ultralytics.models.yolo.pose import PoseValidator
|
||||
>>> args = dict(model="yolov8n-pose.pt", data="coco8-pose.yaml")
|
||||
>>> args = dict(model="yolo11n-pose.pt", data="coco8-pose.yaml")
|
||||
>>> validator = PoseValidator(args=args)
|
||||
>>> validator()
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ class SegmentationTrainer(yolo.detect.DetectionTrainer):
|
||||
|
||||
Examples:
|
||||
>>> from ultralytics.models.yolo.segment import SegmentationTrainer
|
||||
>>> args = dict(model="yolov8n-seg.pt", data="coco8-seg.yaml", epochs=3)
|
||||
>>> args = dict(model="yolo11n-seg.pt", data="coco8-seg.yaml", epochs=3)
|
||||
>>> trainer = SegmentationTrainer(overrides=args)
|
||||
>>> trainer.train()
|
||||
"""
|
||||
@ -62,8 +62,8 @@ class SegmentationTrainer(yolo.detect.DetectionTrainer):
|
||||
|
||||
Examples:
|
||||
>>> trainer = SegmentationTrainer()
|
||||
>>> model = trainer.get_model(cfg="yolov8n-seg.yaml")
|
||||
>>> model = trainer.get_model(weights="yolov8n-seg.pt", verbose=False)
|
||||
>>> model = trainer.get_model(cfg="yolo11n-seg.yaml")
|
||||
>>> model = trainer.get_model(weights="yolo11n-seg.pt", verbose=False)
|
||||
"""
|
||||
model = SegmentationModel(cfg, nc=self.data["nc"], ch=self.data["channels"], verbose=verbose and RANK == -1)
|
||||
if weights:
|
||||
|
||||
@ -90,7 +90,7 @@ class AutoBackend(nn.Module):
|
||||
_model_type: Determine the model type from file path.
|
||||
|
||||
Examples:
|
||||
>>> model = AutoBackend(weights="yolov8n.pt", device="cuda")
|
||||
>>> model = AutoBackend(weights="yolo11n.pt", device="cuda")
|
||||
>>> results = model(img)
|
||||
"""
|
||||
|
||||
|
||||
@ -136,7 +136,7 @@ def benchmark(
|
||||
assert not is_end2end
|
||||
assert not isinstance(model, YOLOWorld), "YOLOWorldv2 IMX exports not supported"
|
||||
assert model.task == "detect", "IMX only supported for detection task"
|
||||
assert "C2f" in model.__str__(), "IMX only supported for YOLOv8"
|
||||
assert "C2f" in model.__str__(), "IMX only supported for YOLOv8" # TODO: enable for YOLO11
|
||||
if i == 15: # RKNN
|
||||
assert not isinstance(model, YOLOWorld), "YOLOWorldv2 RKNN exports not supported yet"
|
||||
assert not is_end2end, "End-to-end models not supported by RKNN yet"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user