tucan9389 / ObjectDetection-CoreML

An example running Object Detection using Core ML (YOLOv8, YOLOv5, YOLOv3, MobileNetV2+SSDLite)

Home Page:https://github.com/motlabs/awesome-ml-demos-with-ios

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when trying to run the code

pfcouto opened this issue · comments

After downloading the code I tried to run it, however the output is an error message: "cannot find 'yolov5s' in scope". Can you help me with that?

There may be better methods, but here's how I was able to resolve the issue by removing and re-adding the mlpackage file.

  1. Right-click "yolov8s" (or whichever mlpackage file isn't working) in XCode.
  2. Click "Delete".
  3. Click "Remove Reference".
  4. Add the mlpackage file back into the mlmodel/ folder.