1 00:00:07,750 --> 00:00:13,900 In this video, we will introduce you to the Model Asset eXchange on IBM Developer, a free 2 00:00:13,900 --> 00:00:17,170 open source resource for deep learning models. 3 00:00:17,170 --> 00:00:22,050 Throughout the video we will refer to the Model Asset eXchange as "MAX." 4 00:00:22,050 --> 00:00:26,920 In the previous video, we briefly outlined the high-level tasks you need to complete 5 00:00:26,920 --> 00:00:28,760 to train a model from scratch. 6 00:00:28,760 --> 00:00:34,800 Due to the amount of data, labor, time, and resources required to complete the tasks, 7 00:00:34,800 --> 00:00:37,780 time to value can be quite long. 8 00:00:37,780 --> 00:00:43,190 To reduce time to value, consider taking advantage of pre-trained models for certain types of 9 00:00:43,190 --> 00:00:44,969 problems. 10 00:00:44,969 --> 00:00:49,830 These pre-trained models can be ready to use right away, or they might take less time to 11 00:00:49,830 --> 00:00:51,040 train. 12 00:00:51,040 --> 00:00:57,059 The Model Asset eXchange is a free open source repository for ready-to-use and customizable 13 00:00:57,059 --> 00:01:00,219 deep learning microservices. 14 00:01:00,219 --> 00:01:05,539 These microservices are configured to use pre-trained or custom-trainable state-of-the-art 15 00:01:05,539 --> 00:01:10,070 deep learning models to solve common business problems. 16 00:01:10,070 --> 00:01:15,170 These models have been reviewed, tested, and can be quickly deployed in local and cloud 17 00:01:15,170 --> 00:01:16,770 environments. 18 00:01:16,770 --> 00:01:22,210 All models in MAX are available under permissive open source licenses, making it easier to 19 00:01:22,210 --> 00:01:29,369 use them for personal and commercial purposes and reducing the risk of legal liabilities. 20 00:01:29,369 --> 00:01:35,460 On MAX, you can find models for a variety of domains, including image, audio, video, 21 00:01:35,460 --> 00:01:39,050 and natural language analysis. 22 00:01:39,050 --> 00:01:41,509 This list includes a small selection. 23 00:01:41,509 --> 00:01:45,869 In the lab for this module, you’ll have a chance to explore those models. 24 00:01:45,869 --> 00:01:50,560 Let’s take a look at the components of a typical model-serving microservice. 25 00:01:50,560 --> 00:01:54,030 Each microservice includes the following components: 26 00:01:54,030 --> 00:01:56,880 A pre-trained deep learning model. 27 00:01:56,880 --> 00:02:02,689 Code that pre-processes the input before it is analyzed by the model and code that post-processes 28 00:02:02,689 --> 00:02:03,869 the model output. 29 00:02:03,869 --> 00:02:10,810 A standardized public API that makes the services’ functionality available to applications. 30 00:02:10,810 --> 00:02:17,700 The MAX model-serving microservices are built and distributed as open-source Docker images. 31 00:02:17,700 --> 00:02:22,260 Docker is a container platform that makes it easy to build applications and to deploy 32 00:02:22,260 --> 00:02:25,980 them in a development, test, or production environment. 33 00:02:25,980 --> 00:02:31,760 The Docker image source is published on GitHub and can be downloaded, customized as needed, 34 00:02:31,760 --> 00:02:35,780 and used in personal or commercial environments. 35 00:02:35,780 --> 00:02:41,680 You can deploy and run these images in a test or production environment using Kubernetes, 36 00:02:41,680 --> 00:02:48,040 an open-source system for automating deployment, scaling, and management of containerized applications 37 00:02:48,040 --> 00:02:51,820 in private, hybrid, or public clouds. 38 00:02:51,820 --> 00:02:57,900 A popular enterprise-grade Kubernetes platform is Red Hat OpenShift, which is available on 39 00:02:57,900 --> 00:03:04,780 IBM Cloud, Google Cloud Platform, Amazon Web Services, and Microsoft Azure. 40 00:03:04,780 --> 00:03:10,730 The model-serving microservices expose a REST API that developers can use to incorporate 41 00:03:10,730 --> 00:03:14,459 deep learning into their applications and services. 42 00:03:14,459 --> 00:03:20,060 Because REST APIs can be consumed using any programming language, you can easily integrate 43 00:03:20,060 --> 00:03:23,870 these services into your existing ecosystem. 44 00:03:23,870 --> 00:03:31,569 The API exposes a prediction endpoint and one or more metadata endpoints. 45 00:03:31,569 --> 00:03:37,260 This example shows the endpoints for the Object Detection microservice. 46 00:03:37,260 --> 00:03:44,400 The /model/predict endpoint takes an image as input and returns as a response a list 47 00:03:44,400 --> 00:03:50,680 of objects that were detected in the image, along with bounding box coordinates that identify 48 00:03:50,680 --> 00:03:54,849 where the detected object is located. 49 00:03:54,849 --> 00:03:59,700 Some prediction endpoints can also accept additional input parameters that impact the 50 00:03:59,700 --> 00:04:04,330 produced results, such as filters. 51 00:04:04,330 --> 00:04:13,000 This microservice exposes two metadata endpoints, /model/labels and /model/metadata. 52 00:04:13,000 --> 00:04:18,280 These endpoints provide information such as the objects that can be detected and the deep 53 00:04:18,280 --> 00:04:23,150 learning model used to derive the answer given the input. 54 00:04:23,150 --> 00:04:28,520 In the lab portion of this module, you will have a chance to explore and test these endpoints 55 00:04:28,520 --> 00:04:30,820 using a web browser. 56 00:04:30,820 --> 00:04:37,729 Each endpoint accepts application-friendly inputs, such as an image in JPG, PNG, or GIF 57 00:04:37,729 --> 00:04:41,680 format, instead of a model-specific data structure. 58 00:04:41,680 --> 00:04:47,750 Each endpoint also generates application-friendly outputs, such as standardized JSON, which 59 00:04:47,750 --> 00:04:51,020 is a lightweight data-interchange format. 60 00:04:51,020 --> 00:04:56,800 Let’s take a closer look at what happens when an application invokes the prediction 61 00:04:56,800 --> 00:04:57,800 endpoint. 62 00:04:57,800 --> 00:05:03,160 In this example, a user has selected an image in a web application, the prediction endpoint 63 00:05:03,160 --> 00:05:06,810 is invoked, and the image is uploaded. 64 00:05:06,810 --> 00:05:12,080 The microservice prepares the input image for processing, runs the deep learning model 65 00:05:12,080 --> 00:05:17,979 that identifies objects in the image, generates a response using the prediction results, and 66 00:05:17,979 --> 00:05:20,710 returns the result to the application. 67 00:05:20,710 --> 00:05:26,840 The application renders the results by drawing bounding boxes and labels. 68 00:05:26,840 --> 00:05:32,270 In this video, we’ve introduced the Model Asset eXchange, a free and open source repository 69 00:05:32,270 --> 00:05:37,380 for microservices that make deep learning functionality available to applications and 70 00:05:37,380 --> 00:05:41,680 services in local and cloud environments. 71 00:05:41,680 --> 00:05:46,750 In the lab, you will have a chance to try a model-serving microservice, explore its 72 00:05:46,750 --> 00:05:52,670 API, and learn more about how you can leverage it from a web application and an Internet 73 00:05:52,670 --> 00:05:53,879 of Things application.