Deploying Deep Learning Models On Web And Mobile (Apps)

By: Nidhin Pattaniyil (@npatta01) and Reshama Shaikh (@reshama)


BLOG

Deploying Deep Learning Models On Web And Mobile

ABOUT

Deploy deep learning models, with a production example for both web and mobile. Our example uses fastai. But, an output model file from any other deep learning library such as Keras or TensorFlow, etc. will work.

WEB APP

Heroku web app: food-img-classifier

MOBILE APP

Video of mobile app: 2-minute demo of Food classifier using fastai

iOS Apple store app: Food Classifier

Android Google Play app: Food Classifier

CONTACT

Any questions, please:

Sorry for the delay in getting this blog out. We appreciate your patience as we respond to inquiries.

(Reference: forums thread from Dec 2018.)

21 Likes

This looks very cool!!!
I wonder, how fast is inference of a single image with the ResNet34 on a free dyno?

1 Like

it’s fairly quick. In fact, the video on YouTube was based on the free app (before we published to both app stores).

Really like how you went all the way to build end-to-end apps and share the recipes. Thank you!

1 Like

My push to Heroku keeps failing as the slug size is 700M while max permitted is 500M. This is because of the large pytorch (.whl) file. Is there a workaround or a fix for this issue?

1 Like

Hi @mayhem_am,
In our process we are using a docker container which at least fro now bypasses heroku slug size limitation.

Could you try that approach or share your repo if the error persists?

I was following this guide. Under src/static/js folder I have a file named main.jsx. Inside this file, I have a code block

(async () => {
const response = await fetch('/config');
// const response = await fetch(process.env.PUBLIC_URL + `/config`);
const body = await response.json();

window.APP_CONFIG = body;

// Use the ReactDOM.render to show your component on the browser
ReactDOM.render(
    <App/>,
    rootElement
)
})();

It seems working fine in local environment, and even Heroku. However, after I deployed to GKE, the above code does not work. It cannot load the config which is inside a content.yaml file. Please give me advices.