【macOS Sonoma 14.1.2】Object Detection on Custom Dataset using YOLOv8 on MacBook Pro with M3 Pro
14-inch MacBook Pro with M3 Pro
【macOS Sonoma 14.1.2】Object Detection on Custom Dataset using YOLOv8 on MacBook Pro with M3 Pro
14-inch MacBook Pro with M3 Pro
1️⃣Create conda environment 2️⃣Clone official repository and install required packages 3️⃣Monitor resouce usage 4️⃣Demo inference on image using CPU and MPS 5️⃣Prepare custom.yaml file for custom training 6️⃣Train on custom dataset using CPU 7️⃣Train on custom dataset using MPS 8️⃣Inference on test.mp4 using CPU and MPS 9️⃣Results Acknowledgments and References
1️⃣Create conda environment
$ conda env list
$ conda create -n yolov8 python=3.9 -y

conda create -n yolov8 python=3.9 -y
2️⃣Clone official repository and install required packages
$ conda activate yolov8
$ cd src/
$ git clone https://github.com/ultralytics/ultralytics.git
$ cd ultralytics/

git clone https://github.com/ultralytics/ultralytics.git
$ pip install -r requirements.txt
$ pip install ultralytics

pip install -r requirements.txt
3️⃣Monitor resouce usage
$ top

top
$ sudo powermetrics --samplers gpu_power -i5000

sudo powermetrics — samplers gpu_power -i5000
4️⃣Demo inference on image using CPU and MPS
$ yolo task=detect mode=predict model=yolov8n.pt source="../yolov5/data/images/bus.jpg"
$ yolo task=detect mode=predict model=yolov8n.pt source="../yolov5/data/images/bus.jpg" device=mps

Demo
5️⃣Prepare custom.yaml file for custom training
$ vim custom.yaml

vim custom.yaml
6️⃣Train on custom dataset using CPU
$ yolo task=detect mode=train model=yolov8n.pt data=custom.yaml epochs=10 imgsz=640

yolo task=detect mode=train model=yolov8n.pt data=custom.yaml epochs=10 imgsz=640


top & sudo powermetrics — samplers gpu_power -i5000
7️⃣Train on custom dataset using MPS
$ yolo task=detect mode=train model=yolov8n.pt data=custom.yaml epochs=10 imgsz=640 device=mps

yolo task=detect mode=train model=yolov8n.pt data=custom.yaml epochs=10 imgsz=640 device=mps


top & sudo powermetrics — samplers gpu_power -i5000
8️⃣Inference on test.mp4 using CPU and MPS
$ yolo task=detect mode=predict model=runs/detect/train/weights/best.pt source="../test.mp4"
$ yolo task=detect mode=predict model=runs/detect/train2/weights/best.pt source="../test.mp4" device=mps

yolo task=detect mode=predict model=runs/detect/train/weights/best.pt source=”../test.mp4"

yolo task=detect mode=predict model=runs/detect/train2/weights/best.pt source=”../test.mp4" device=mps
9️⃣Results

Inference results
Acknowledgments and References
메타데이터
- post_id
- b2fe2e706db5
- slug
- macos-sonoma-14-1-2-object-detection-on-custom-dataset-using-yolov8-on-macbook-pro-with-m3-pro-b2fe2e706db5
- url
- https://medium.com/@scofield44165/macos-sonoma-14-1-2-object-detection-on-custom-dataset-using-yolov8-on-macbook-pro-with-m3-pro-b2fe2e706db5
- canonical_url
- https://medium.com/@scofield44165/macos-sonoma-14-1-2-object-detection-on-custom-dataset-using-yolov8-on-macbook-pro-with-m3-pro-b2fe2e706db5
- author_url
- https://medium.com/@scofield44165
- status
- ok
- fetched_at
- 2026-07-14 10:09:25