Skip to content

Commit

Permalink
docs: updated the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
picsalex committed Jan 31, 2025
1 parent 0e2f6e9 commit d4d57f7
Showing 1 changed file with 31 additions and 14 deletions.
45 changes: 31 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Ensure you have the following before you start:

- **Xcode:** The Ultralytics YOLO iOS App requires Xcode installed on your macOS machine. Download it from the [Mac App Store](https://apps.apple.com/us/app/xcode/id497799835).

- **An iOS Device:** For testing the app, you'll need an iPhone or iPad running [iOS 14.0](https://www.apple.com/ios/ios-18/) or later. Note: custom, fine-tuned models can only work on iPhone or iPad running **iOS 17.0** or later.
- **An iOS Device:** For testing the app, you'll need an iPhone or iPad running [iOS 14.0](https://www.apple.com/ios/ios-18/) or later. Note: trained models can only work on iPhone or iPad running **iOS 17.0** or later.

- **An Apple Developer Account:** A free Apple Developer account will suffice for device testing. Sign up [here](https://developer.apple.com/) if you haven't already.

Expand All @@ -62,19 +62,36 @@ Ensure you have the following before you start:

3. **Add YOLO11 Models to the Project:**

Since the YOLO CoreML models are not versionned in this repository, you'll need to create them by exporting CoreML INT8 models using the `ultralytics` Python package (with `pip install ultralytics`), or download them from our [GitHub release assets](https://github.com/ultralytics/yolo-ios-app/releases). You should have 5 YOLO11 models in total. Place these in the `YOLO/Models` directory as seen in the Xcode screenshot below.

```python
from ultralytics import YOLO

# Loop through all YOLO11 model sizes
for size in ("n", "s", "m", "l", "x"):
# Load a YOLO11 PyTorch model
model = YOLO(f"yolo11{size}.pt")

# Export the PyTorch model to CoreML INT8 format with NMS layers
model.export(format="coreml", int8=True, nms=True, imgsz=[640, 384])
```
Since the YOLO CoreML models are not versionned in this repository, you'll need to either:

1. Create them by exporting your trained models to CoreML INT8 models using the `ultralytics` Python package (with `pip install ultralytics`).

```python
from ultralytics import YOLO

# Load a trained YOLO11 PyTorch model
model = YOLO(f"path/to/your/trained/model.pt")

# Export the PyTorch model to CoreML INT8 format with NMS layers
# The imgsz property may be adjusted when you export a trained model
model.export(format="coreml", int8=True, nms=True, imgsz=640)
```

2. Download the base models from our [GitHub release assets](https://github.com/ultralytics/yolo-ios-app/releases).

```python
from ultralytics import YOLO

# Loop through all YOLO11 model sizes and exclude any trained models from the loop
for size in ("n", "s", "m", "l", "x"):
# Load a base YOLO11 PyTorch model
model = YOLO(f"yolo11{size}.pt")

# Export the PyTorch model to CoreML INT8 format with NMS layers
model.export(format="coreml", int8=True, nms=True)
```

You should have 5 YOLO11 models in total. Place these in the `YOLO/Models` directory as seen in the Xcode screenshot below.

4. **Run the Ultralytics YOLO iOS App:**

Expand Down

0 comments on commit d4d57f7

Please sign in to comment.