Find Jobs
Hire Freelancers

convert models in Onxx and run it on iOS

$250-750 USD

Closed
Posted over 3 years ago

$250-750 USD

Paid on delivery
We have a few models that we want to run on iOS using CoreML. Currently the models are in ONNX format using OnnxRuntime to perform inference. We'd like to convert the models and perform inference on the Neural Engine chip. Deliverable should be: 1. Any scripts required to convert the model to CoreML format 2. Convert a sample program to run the models on iOS using CoreML for inference. 3. A sample iOS program that can simply press a button to load a JPEG image and run it through the inference code and output the processing time in milliseconds. You will be needed to know neural network models (pytorch, onnx, etc) I'll prep a c++ package for you with some instructions. This will be our inference on c++. The goal is to convert the model to coreml and swap out the OCR code for obj c so that it can run on the I using the neural engine chip Here's a sample OCR C++ inference example. To set it up: 1. Download a prebuilt OnnxRuntime package. 2. Update your [login to view URL] to point to your OnnxRuntime lib and header path: SET(ONNXRUNTIME_LIBS /storage/projects/alpr/libraries/libonnxruntime/build/Linux/Release/libonnxruntime.so.1.4.0 ) SET(ONNXRUNTIME_INCLUDE /storage/projects/alpr/libraries/libonnxruntime/include/ ) 3. Update [login to view URL] to point to your "runtime" folder full path: std::string ocr_root = "/home/mhill/Downloads/ocr_test/runtime"; 4. Install OpenCV to your system. cmake should find it automatically 5. From the root directory, to build: mkdir build/ cd build/ cmake .. make -j8 6. To run: ./ocr_test ../[login to view URL] Expected output: Processing: ../[login to view URL] Processing time (1 crops): 0.10924 Region: za-ec : 99.9968 : 0 - F - 94.9996 : 1 - F - 94.9988 : 2 - N - 94.9996 : 3 - 2 - 94.9996 : 4 - 0 - 94.9996 : 5 - 6 - 94.9994 : 6 - E - 94.9996 : 7 - C - 94.9996 If you make your changes in a new file (e.g., [login to view URL]) and make sure it's API compatible with ocr.h, we should be able to swap it in when IOS is used. Once we get this working on iPhone we can send over a sample for the next two models Please send us an update at least every 2nd day (what you're working on currently, if you're stuck on anything, and if there's any decisions that need to be made) The ocr_x file is ONNX Attaching pytorch model as well. We'd prefer to convert from Onnx, but can convert from Pytorch to if necessary Files: [login to view URL] [login to view URL]
Project ID: 27969092

About the project

4 proposals
Remote project
Active 3 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs

About the client

Flag of PAKISTAN
lahore, Pakistan
5.0
258
Payment method verified
Member since Dec 19, 2017

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.