Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mobile Deep Learning with TensorFlow Lite, ML Kit and Flutter

You're reading from  Mobile Deep Learning with TensorFlow Lite, ML Kit and Flutter

Product type Book
Published in Apr 2020
Publisher Packt
ISBN-13 9781789611212
Pages 380 pages
Edition 1st Edition
Languages
Authors (2):
Anubhav Singh Anubhav Singh
Profile icon Anubhav Singh
Rimjhim Bhadani Rimjhim Bhadani
Profile icon Rimjhim Bhadani
View More author details
Toc

Table of Contents (13) Chapters close

Preface 1. Introduction to Deep Learning for Mobile 2. Mobile Vision - Face Detection Using On-Device Models 3. Chatbot Using Actions on Google 4. Recognizing Plant Species 5. Generating Live Captions from a Camera Feed 6. Building an Artificial Intelligence Authentication System 7. Speech/Multimedia Processing - Generating Music Using AI 8. Reinforced Neural Network-Based Chess Engine 9. Building an Image Super-Resolution Application 10. Road Ahead 11. Other Books You May Enjoy Appendix

Integrating a hosted custom model on Flutter

In this section, we will make a POST request to the hosted model and pass it in the image selected by the user. The server will respond with a NetworkImage in PNG format. Then, we'll update the image widget we added earlier to show the enhanced image that's returned by the model.

Let's start integrating the hosted model into the application:

  1. First of all, we will need two more external libraries to make a successful POST request. Therefore, we'll add the following libraries as dependencies to the pubspec.yaml file:
dependencies:
flutter:
http
: 0.12.0+4
mime: 0.9.6+3

The http dependency contains a set of classes and functions that make consuming HTTP resources very convenient. The mime dependency is used for processing streams of MIME multipart media types.

Now, we need to run flutter...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime