ultralytics / yolov3

YOLOv3 in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
10.16k stars 3.44k forks source link

Ultralytics iDetection app on the Apple iOS App Store #92

Closed fourth-archive closed 3 years ago

fourth-archive commented 5 years ago

Is there a pipeline available to export YOLOv3 models from this repository to iOS apps using CoreML?

glenn-jocher commented 5 years ago

Yes. We just recently published a solution for this. iOS devices using Apple's latest A12 chips (i.e. iPhone XS and XR) achieve about 10-15 FPS with full YOLOv3 running at 416 pixels. App tested on iPhone XS, results on other hardware may differ.

Screenshot 2019-04-29 at 14 30 36
Lepiloff commented 5 years ago

@glenn-jocher It would be very interesting to do this by myself. Maybe you can give an explanation with the sequence of steps for this or some short tutorial? And elso I see in your code (detect.py) using ONNX_EXPORT. Is it mean what is also possible to translate data into a format ONNX?

jw-pyo commented 5 years ago

@glenn-jocher It would be very interesting to do this by myself. Maybe you can give an explanation with the sequence of steps for this or some short tutorial? And elso I see in your code (detect.py) using ONNX_EXPORT. Is it mean what is also possible to translate data into a format ONNX?

I'm also looking forward to waiting about this tutorial! @glenn-jocher , do you have a plan to make a tutorial for iOS exporting(Pytorch -> ONNX -> CoreML)??

heatherlock commented 5 years ago

I'm also interested in a tutorial to see how to do this pytorch -> onnx -> coreml -> app.

Vicnent commented 5 years ago

it is exactly what I want to do (and then on Android) So, where is the pipe ? thx in advance

avantgardnerio commented 4 years ago

@Vicnent I was able to use this to convert darknet weights to tflite and run models on Android: https://github.com/wics1224/yolov3-android-tflite (it works out of the box with the non-tiny model, and google translate does a pretty good job helping English speakers understand what's going on)

hope-yao commented 4 years ago

@Vicnent I was able to use this to convert darknet weights to tflite and run models on Android: https://github.com/wics1224/yolov3-android-tflite (it works out of the box with the non-tiny model, and google translate does a pretty good job helping English speakers understand what's going on)

Hi @avantgardnerio , just wondering if you have encountered the following issue: NotImplementedError: Resize version 11 is not implemented.

I was trying to do pt->onnx->pb->tflite conversion and got this error at the last step. Thanks!

avantgardnerio commented 4 years ago

@hope-yao the above comment was in regards to darknet -> tflite.

I was also able to train on the Ultralytics implementation, then export (pt->onnx->pb->tflite), but I had to use: https://github.com/nerox8664/onnx2keras (but even that required changes)

https://github.com/daquexian/onnx-simplifier was helpful

github-actions[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.