<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ragesh Hajela on Medium]]></title>
        <description><![CDATA[Stories by Ragesh Hajela on Medium]]></description>
        <link>https://medium.com/@rageshhajela?source=rss-406315823445------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bRbISaCxvhv4RlQp8dFD7Q.jpeg</url>
            <title>Stories by Ragesh Hajela on Medium</title>
            <link>https://medium.com/@rageshhajela?source=rss-406315823445------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 20:27:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rageshhajela/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Bring your own dataset and retrain a TensorFlow model with OpenVINO™ toolkit]]></title>
            <link>https://medium.com/openvino-toolkit/bring-your-own-dataset-and-retrain-a-tensorflow-model-with-openvino-toolkit-e5eebf95dd4b?source=rss-406315823445------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5eebf95dd4b</guid>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[image-classification]]></category>
            <category><![CDATA[image-processing]]></category>
            <category><![CDATA[openvino]]></category>
            <dc:creator><![CDATA[Ragesh Hajela]]></dc:creator>
            <pubDate>Mon, 13 Jun 2022 08:08:46 GMT</pubDate>
            <atom:updated>2022-06-28T06:25:17.573Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Authors: Stewart Christie and Ragesh Hajela</strong></p><p>Machine learning requires us to have existing data — not the data our application will use when we run it, but data to learn from. You need a lot of real data, in fact, the more the better. The more examples you provide, the better the computer should be able to learn. It’s the most crucial aspect that makes algorithm training possible and explains why machine learning became so popular in recent years.</p><p>The OpenVINO™ Notebooks repo on GitHub is a collection of ready-to-run Jupyter Notebooks, for learning and experimenting with the OpenVINO™ toolkit. The notebooks provide an introduction to OpenVINO™ basics and teach developers how to leverage our APIs for optimized deep learning inference. One of the examples is a notebook titled <a href="https://github.com/openvinotoolkit/openvino_notebooks/blob/main/notebooks/301-tensorflow-training-openvino/301-tensorflow-training-openvino.ipynb">301-tensorflow-training-openvino.ipynb</a>, where you can train a model using TensorFlow*, and then run it in both the native TensorFlow and then using the OpenVINO™ Toolkit. It demonstrates an end-to-end deep learning training tutorial which borrows the open source code from the TensorFlow <a href="https://www.tensorflow.org/tutorials/images/classification">image classification tutorial</a>, demonstrating how to train the model and then convert to OpenVINO™ Intermediate Representation (IR). It leverages the <a href="https://www.tensorflow.org/datasets/catalog/tf_flowers">tf_flowers</a> dataset which includes about 3,700 photos of flowers.</p><p>But, how to modify this notebook, retrain the same model but with a different dataset. Let’s say, instead of flowers, you want to use fruits dataset, retrain the same model and run inference on this new dataset. What all changes would be required?</p><p>Let’s pick an interesting new dataset <a href="https://github.com/Horea94/Fruit-Images-Dataset">Fruits-360</a>. It’s a dataset of images containing fruits and vegetables. Unlike the name suggests, it’s not another dataset of 360 fruits, instead is a collection of 131 fruits and vegetables. This dataset was created by mounting these fruits and vegetables on a stick that was rotated 360 degrees, hence the name. Checkout the <a href="https://github.com/Horea94/Fruit-Images-Dataset/tree/master/papers">research paper</a> to understand how these dataset images were post processed and prepared for training and testing purpose.</p><p>To set the baseline, launch the existing notebook with a sample from flowers dataset and run inference.</p><pre># Pre-process the image and get it ready <strong>for</strong> inference</pre><pre>inp_img_url = &quot;<a href="https://upload.wikimedia.org/wikipedia/commons/4/48/A_Close_Up_Photo_of_a_Dandelion.jpg">https://upload.wikimedia.org/wikipedia/commons/4/48/A_Close_Up_Photo_of_a_Dandelion.jpg</a>&quot;</pre><pre>file_path = Path(&quot;output&quot;)/Path(&quot;A_Close_Up_Photo_of_a_Dandelion.jpg&quot;)</pre><pre>input_image = pre_process_image(file_path)</pre><pre># Run inference on the input image</pre><pre>res = compiled_model([input_image])[output_layer]</pre><pre>score = tf.nn.softmax(res[0])</pre><pre># Show the results</pre><pre>image = Image.open(file_path)</pre><pre>plt.imshow(image)</pre><pre>print(</pre><pre>&quot;This image most likely belongs to {} with a {:.2f} percent confidence.&quot;</pre><pre>.format(class_names[np.argmax(score)], 100 * np.max(score))</pre><pre>)</pre><p>Here is the classification result for this sample image of a flower:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*2rlkUMkOF-jUGSoH-bgMAQ.png" /></figure><p>Now, to use the Fruits-360 dataset, there would be some obvious modifications in the Jupyter notebook along with few technical adaptations. This table shows the first level changes required and you will notice that one of most notable differences is about the image size. Fruits-360 dataset consists of images with size 100x100 pixels.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GGwrqC_o4Hy7xTNs3YCkwQ.png" /></figure><p>Apply all the necessary code changes, run inference on the newly trained model and try classification results on any fruit or vegetable, for e.g. pick Red Potato or Cauliflower images below from the dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*joREv0S2xrQHjGtHN0O7pg.png" /></figure><p>To know about all the code changes and learn the steps which would be required to accomplish this, take up a free 20-minutes tutorial titled “<a href="https://learning.intel.com/Developer/learn/catalog/view/52">BYOD- Retrain a Tensorflow Model Using Your Data Set</a>”. It’s hosted on Intel Learning portal where there are tons of courses around AI that you can take. Just sign-up and there’s a complete curriculum for newcomers to OpenVINO™ which is 10 part learning plan, along with many newly launched training courses. Happy learning!</p><h3>Notices &amp; Disclaimers</h3><p>Performance varies by use, configuration and other factors. Learn more on the <a href="https://edc.intel.com/content/www/us/en/products/performance/benchmarks/overview/">Performance Index site</a>.</p><p>No product or component can be absolutely secure.</p><p>Intel does not control or audit third-party data. You should consult other sources to evaluate accuracy.</p><p>Intel disclaims all express and implied warranties, including without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising from course of performance, course of dealing, or usage in trade.</p><p>Your costs and results may vary.</p><p>Intel technologies may require enabled hardware, software or service activation.</p><p>© Intel Corporation. Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries. Other names and brands may be claimed as the property of others.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5eebf95dd4b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/openvino-toolkit/bring-your-own-dataset-and-retrain-a-tensorflow-model-with-openvino-toolkit-e5eebf95dd4b">Bring your own dataset and retrain a TensorFlow model with OpenVINO™ toolkit</a> was originally published in <a href="https://medium.com/openvino-toolkit">OpenVINO-toolkit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Looking at 11th Generation Intel® Processor Performance on Intel® DevCloud for Edge Workloads]]></title>
            <link>https://medium.com/openvino-toolkit/looking-at-11th-generation-intel-processor-performance-on-intel-devcloud-for-the-edge-213a413fb5e1?source=rss-406315823445------2</link>
            <guid isPermaLink="false">https://medium.com/p/213a413fb5e1</guid>
            <category><![CDATA[processor-performance]]></category>
            <category><![CDATA[devcloud-for-the-edge]]></category>
            <category><![CDATA[openvino]]></category>
            <dc:creator><![CDATA[Ragesh Hajela]]></dc:creator>
            <pubDate>Mon, 16 May 2022 05:27:40 GMT</pubDate>
            <atom:updated>2022-06-15T23:09:09.947Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/999/0*F8aY1cSaapPmfJCO" /></figure><p><strong>Authors: </strong>Corey Heath and Ojas Sawant</p><h3><strong>Introduction</strong></h3><p>The 11th Gen Intel® Core™ Processor family, formerly known by the code name Tiger Lake, introduced new processor features that improve performance on AI workloads by taking advantage of lower data representations to produce faster results on inference tasks. Our goal is to walk through how you can run your own benchmarking experiments on Intel® DevCloud for Edge Workloads using the Deep Learning Workbench provided in the OpenVINO™ toolkit.</p><p>For this tutorial, we’re going to run our experiments on three systems that are hosted on the DevCloud and provide a performance comparison on AI workloads using FP16 and INT8 date representations. If you’re interested in more formal performance benchmarks, they can be found on the <a href="https://docs.openvino.ai/2021.4/openvino_docs_performance_benchmarks_ovms.html">OpenVINO benchmark results page</a>.</p><h3>System Comparison</h3><p>For our experiments, we want to select hardware that has similar attributes from three different generations from the systems that are available on the DevCloud. We’ll be examining the performance of <a href="https://ark.intel.com/content/www/us/en/ark/products/208076/intel-core-i71185g7e-processor-12m-cache-up-to-4-40-ghz.html">Intel® Core™ i7–1185G7E</a>, <a href="https://ark.intel.com/content/www/us/en/ark/products/196448/intel-core-i710710u-processor-12m-cache-up-to-4-70-ghz.html">Intel® Core™ i7–10710U</a>, and <a href="https://ark.intel.com/content/www/us/en/ark/products/193554/intel-core-i78665ue-processor-8m-cache-up-to-4-40-ghz.html">Intel® Core™ i7–8665UE</a> processors. A comparison on the selected processors can be found on the <a href="https://ark.intel.com/content/www/us/en/ark/compare.html?productIds=196448,193554,208076">Intel product specification page</a>. In Table 1, we can see that the 107010U system, formerly named Comet Lake, has a greater max turbo Frequency and more CPU cores and threads. Ideally, we would be using systems with the same configuration, however, we’ll still be able to observe trends in the systems’ performance in the results from running our experiments with different data representations.</p><p><em>Table 1: At-a-glance comparison of Intel® Core™ systems used in the experiments.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*650m9Y6FbXcIaXuR3jbPbg.png" /><figcaption><a href="https://www.advantech.com/products/f6935c48-a0b2-4c68-894a-40eb39c832b3/epc-c301/mod_0cdaa0da-61e8-4078-ac65-0d4cd00789f7">Advantech EPC-C301</a>; <a href="https://ark.intel.com/content/www/us/en/ark/products/188813/intel-nuc-10-performance-mini-pc-nuc10i7fnhaa.html">Intel NUC10i7FNHAA</a>; <a href="https://up-board.org/up-xtreme-i11-edge-compute-enabling-kit/">AAEON UP Xtreme i11</a></figcaption></figure><p>A key differentiator between i7–1185G7E and the older generation processors is the inclusion of new processor features: Intel® AVX-512, Intel Deep Learning Boost, and Vector Neural Network Instructions. These features enable additional optimizations not possible with previous generations when working with INT8 precision.</p><h3><strong>Experiments</strong></h3><p>We’re going to use the Deep Learning Workbench (DL Workbench) hosted on Intel® DevCloud for Edge Workloads to conduct our experiments. DL Workbench is a graphical user interface for utilizing model execution, optimization, and telemetry tools. Hosting DL Workbench on the DevCloud provides the opportunity to download and optimize models, then run experiments on an array of Intel hardware platforms. In DevCloud experiments are executed directly on the selected hardware platform, not on a virtual machine. DL Workbench is accessible after creating an Intel® Developer account and accessing Jupyter Lab through the <a href="https://www.intel.com/content/www/us/en/developer/tools/devcloud/edge/optimize/overview.html">Intel® DevCloud for Edge Workloads homepage</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/0*cfEyZmb_ovL4LTEN" /><figcaption><em>Figure 1: Cropped screenshot of the parameter selection UI in DL Workbench.</em></figcaption></figure><h3>Model</h3><p>For the comparison experiments, we’ll be using the ResNet-50 TensorFlow model. ResNet-50 is a 50-layer convolutional neural network trained on the ImageNet dataset. We can download the model in DL Workbench through the OpenVINO Open Model Zoo interface. In Figure 1 (see above), having the ‘1. Select a Model’ menu selected and clicking the ‘Import’ button in the top right will guide you through downloading a pre-trained model or uploading a customer model of your own. After downloading the ResNet model, DL Workbench will convert it to OpenVINO’s intermediate representation (IR) at our chosen precision, either FP16 or FP32. To start, we’ll use FP16 for the precision.</p><h3>Dataset</h3><p>We’ll use the images provided in the DL Workbench to create a dataset for our experiments. In the menu in Figure 1, clicking ‘3. Select a Validation Dataset’ will display any previous datasets that have been uploaded. To import or create a new dataset, click the button in the top right to access the ‘Import Dataset’ menu. Under the ‘Import Dataset’ menu, there are 14 base images we can select to use as a dataset. Additionally, we can enlarge the dataset using image augmentations (including image flips, noise creation, and color transformations) provided by the interface. For our experiments, we’ll use the base images and augmentations of these images to increase the dataset to 336 samples.<br>Alternatively, you could upload your own dataset by using the ‘Upload Dataset’ tab provided in the ‘Import Dataset’ menu.</p><h3><strong>FP16 Experiments</strong></h3><p>Now that we’ve imported the ResNet-50 and created the dataset, we’re ready to select the platforms and run our experiments. The available platforms are listed in the center of the page, as shown in Figure 1. A combo box below the platform list allows you to switch between GPU or CPU. Our experiments will focus on using CPU.<br>DL Workbench uses a platform ID for identifying available systems. For reference, you can use the same systems in DevCloud by selecting the platform IDs displayed in Table 2.</p><p><em>Table 2: DL Workbench platform IDs for the 3 systems.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*waH7kuQDTlReYIQ6coLEkw.png" /></figure><p>Our experiments were run with the default setting using one batch and one stream for the input. This will use a single thread to run the entire dataset. After running the three experiments, the display will show the throughput the model achieved on our dataset as seen in Figure 2. The throughput is the calculated rate in frames per second (FPS) for performing inference on the dataset. The model’s latency, the average amount of time in milliseconds it took to perform inference on one sample from the dataset, can be viewed in the ‘Selected Experiment’ section of the project page after the experiment completes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/0*OD-3WstPMBdB3URy" /><figcaption><em>Figure 2: Cropped screenshot of experiment results for FP16 precision for i7–1185G7E (A), i7–10710U (B) and i7–8665UE ©.</em></figcaption></figure><p>The results show that the i7- 10710U system had the best performance on the dataset, this is due to the higher max turbo frequency. The i7- 8665UE and i7- 1185G7E Gen systems have similar frequency and core count; however, the i7- 1185G7E system had a greater performance. Despite this similarity, the i7- 1185G7E system benefits from the latest architecture design.</p><h3><strong>INT8 Optimizations</strong></h3><p>We can optimize the model to INT8 precision on the experiment result view. This view is displayed immediately after an experiment completes, or it can be accessed for a previously run experiment by clicking the ‘Open’ button in the model view (Figure 3). The model view shows the details for the experiments that ran with the model on different platforms. The accuracy column isn’t currently enabled on the DevCloud version of DL Workbench. Additionally, we used an unannotated dataset and wouldn’t have had the accuracy reported. The runtime precision column shows the precision that was used during execution. We imported our modeling using FP16 precision, however, for processing on CPU the bit representation is padded with empty values to increase the size to 32-bit floating point.</p><p>After clicking ‘Open’ from the model view, the INT8 optimization options are located under the ‘Perform’ tab as shown in Figure 4. Selecting the ‘INT8’ and clicking ‘Optimize’ will lead to an options menu. This menu provides different calibration methods. We’re using an unannotated dataset. The options will be selected to maximize the model’s performance.</p><p>The performance optimization comes at the cost of model accuracy. Using INT8 optimization means we’re reducing the number of bits being used to represent numeric values in our model. This reduction means we’re handling a smaller amount of data, which allows greater user of cache and memory, as well as reduces data transmission and computation times. However, the reduction in data representation causes a loss of precision. Low representation can lead to a loss of detail the model may use to discriminate between classes, causing a reduced inference accuracy. Although this is generally minimal, specific tasks can’t afford to lower the accuracy significantly.</p><p>Quantization isn’t an all-or-nothing option. Calibration can take accuracy into account and find a balance between improved computational performance and acceptable loss of inference precision. In DL Workbench, with an annotated model, you can select options and thresholds for balancing accuracy degradation with increased performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/0*iiDM7Z96OcLopv_P" /><figcaption><em>Figure 3: Cropped screenshot of the table in the Model View.</em></figcaption></figure><p>The INT8 optimizations are performed on the selected system node using the Post-Training Optimization Tool (POT) included in the OpenVINO™ Toolkit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/0*wZ7s-36i4pnFkU-y" /><figcaption><em>Figure 4: Cropped screenshot from DL Workbench showing the Performance and Optimization Performance menu.</em></figcaption></figure><p>Running the INT8 optimization will execute an experiment with one batch and one stream for the input. These results, presented in Figure 5, show a significant increase in throughput. The i7–1185G7E system now has a much higher throughput compared to the i7–10710U Gen system, with over 37 samples more per second processed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/0*zO_KLzLHZl5hdX6Z" /><figcaption><em>Figure 5: Cropped screenshot of experiment results for INT8 precision for 1185G7E (A), 10710Uh (B) and 8665UE ©.</em></figcaption></figure><h3><strong>Results Recap</strong></h3><p>The bar graph of the throughput, Figure 6, illustrates the generational difference between the three systems in handling the INT8 optimized model. The i7–8665UE system had a minor gain in performance using INT8, nearly matching the FP16 throughput of the i7–10710U system. The i7–10710U system nearly doubled its throughput after the optimization. The improvements in the performance of the i7–1185G7E system illustrates the advancements made by incorporating DL Boost and VNNI in the latest hardware. The i7–1185G7E system nearly triples its performance compared to the FP16 precision model experiment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/0*E10IOHv4aZsoDm0g" /><figcaption><em>Figure 6: Bar graph of throughput values from running FP16 and INT8.</em></figcaption></figure><p>As with throughput, the i7–1185G7E system benefits the most from the INT8 optimization with the largest reduction in latency time of the three systems, shown in Figure 7.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/0*SG5qY41csmjFtTfH" /><figcaption><em>Figure 7: Bar graph of latency values from running FP16 and INT8.</em></figcaption></figure><h3><strong>INT8 On the Edge</strong></h3><p>Looking at these experiments, we can see why using INT8 optimizations with the latest hardware is an attractive choice for AI applications, particularly when looking at solutions for the edge. Efficient INT8 optimization reduces the memory cost and computation complexity for inferences tasks. Based on the throughput on individual images, an application using the optimized model on the i7–1185G7E system could potentially process video at over 120 frames per second. This makes it possible to implement applications that can perform AI decision-making using complex data in practically real-time on an edge system. Having real-time solutions is important for a variety of applications from autonomous vehicles to smart security systems and beyond.</p><h3>Resources</h3><ul><li><a href="https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/overview.html">Download the latest release of the OpenVINO toolkit.</a></li><li><a href="https://www.intel.com/content/www/us/en/developer/tools/devcloud/overview.html">Get access to the latest Intel hardware with Intel DevCloud for Edge Workloads</a><a href="https://www.intel.com/content/www/us/en/developer/tools/devcloud/overview.html">.</a></li><li><a href="https://www.intel.com/content/www/us/en/developer/topic-technology/edge-5g/overview.html">Latest from </a><a href="https://www.intel.com/content/www/us/en/developer/topic-technology/edge-5g/training/go-to-market-with-openvino.html">Intel®</a><a href="https://www.intel.com/content/www/us/en/developer/topic-technology/edge-5g/overview.html"> on Edge, IoT &amp; 5G Development</a></li><li><a href="https://www.intel.com/content/www/us/en/developer/topic-technology/edge-5g/training/go-to-market-with-openvino.html">Go to market with Intel® Distribution of OpenVINO™ Toolkit</a></li></ul><h3><strong>Disclaimers</strong></h3><p>The testing for this article was conducted by Intel® employees using the Intel® DevCloud for Edge Workloads platform on October 4, 2021. The Deep Learning Workbench and OpenVINO toolkit version was 2021.4.1. The operating system for the i7–1185G7E platform was Ubuntu 20.04. The i7–8665UE and i7–10710U systems use Ubuntu 18.04.</p><p>Comprehensive processor information is available at the following sites: <a href="https://ark.intel.com/content/www/us/en/ark/products/208076/intel-core-i71185g7e-processor-12m-cache-up-to-4-40-ghz.html">Intel® Core™ i7–1185G7E</a>, <a href="https://ark.intel.com/content/www/us/en/ark/products/196448/intel-core-i710710u-processor-12m-cache-up-to-4-70-ghz.html">Intel® Core™ i7–10710U</a>, and <a href="https://ark.intel.com/content/www/us/en/ark/products/193554/intel-core-i78665ue-processor-8m-cache-up-to-4-40-ghz.html">Intel® Core™ i7–8665UE</a>.</p><p>Performance varies by use, configuration, and other factors. Learn more at <a href="http://www.intel.com/PerformanceIndex">www.Intel.com/PerformanceIndex</a></p><p>Performance results are based on testing as of dates shown in configurations and may not reflect all publicly available updates. See above for details.</p><p>No product or component can be absolutely secure.</p><p>Your costs and results may vary.</p><p>Intel technologies may require enabled hardware, software or service activation.</p><p>Some results may have been estimated or simulated.</p><p>© Intel Corporation. Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries. Other names and brands may be claimed as the property of others.</p><p><em>This post was originally published on </em><a href="https://community.intel.com/t5/Blogs/Tech-Innovation/Artificial-Intelligence-AI/Looking-at-11th-Generation-Intel-Processor-Performance-on-Intel/post/1341873"><em>Intel.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=213a413fb5e1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/openvino-toolkit/looking-at-11th-generation-intel-processor-performance-on-intel-devcloud-for-the-edge-213a413fb5e1">Looking at 11th Generation Intel® Processor Performance on Intel® DevCloud for Edge Workloads</a> was originally published in <a href="https://medium.com/openvino-toolkit">OpenVINO-toolkit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Witness the power of Intel® iGPU with Azure IoT Edge for Linux on Windows(EFLOW) & OpenVINO™…]]></title>
            <link>https://medium.com/openvino-toolkit/witness-the-power-of-intel-igpu-with-azure-iot-edge-for-linux-on-windows-eflow-openvino-f1520d60b19e?source=rss-406315823445------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1520d60b19e</guid>
            <category><![CDATA[igpu]]></category>
            <category><![CDATA[openvino]]></category>
            <category><![CDATA[intel]]></category>
            <category><![CDATA[microsoft]]></category>
            <dc:creator><![CDATA[Ragesh Hajela]]></dc:creator>
            <pubDate>Mon, 16 May 2022 05:01:18 GMT</pubDate>
            <atom:updated>2022-05-16T22:12:14.645Z</atom:updated>
            <content:encoded><![CDATA[<h3>Witness the power of Intel® iGPU with Azure IoT Edge for Linux on Windows(EFLOW) &amp; OpenVINO™ Toolkit</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*T1LN6MIpj4yEfgpIe2iTCw.jpeg" /></figure><p><em>Authors: Narasimha Lakamsani, Devang Aggarwal, Sesh Seshagiri, Jian Sun</em></p><p>In a <a href="https://www.intel.com/content/www/us/en/artificial-intelligence/harness-the-power-of-intel-igpu-on-your-machine.html">previous blog</a>, we talked about how developers, like yourself, can utilize Windows Subsystem for Linux (WSL 2), a product that allows developers to run a Linux environment directly on Windows, and leverage the power of the Intel® iGPU on your laptop for inferencing of your applications.</p><p>In this blog, we will talk about a similar product, Azure IoT Edge for Linux on Windows (EFLOW). The similarities between both EFLOW and WSL is that they both use the same underlying technology and type of containerized workloads. However, they are created with different audiences and use cases in mind. WSL is meant to build, test, and run Linux code and applications. Whereas EFLOW is used for deployment of Azure IoT Edge modules and docker images running in containers.</p><p>In fact, you can use WSL for development and bundle your developed application in an Azure IoT Edge container to deploy it in EFLOW.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*RBnDtBcTqfWUvZ6g2Gynrw.png" /></figure><h3>How EFLOW Works</h3><p>Azure IoT Edge for Linux on Windows allows you to run containerized Linux workloads by running a curated or systematically organized Linux virtual machine on windows. EFLOW is primarily meant for running production services in IoT deployment, including processes that run round the clock for years.</p><h3>Unleash the power of Intel® iGPU with the OpenVINO™ Toolkit</h3><p>Intel’s Integrated Graphics Processing Unit (iGPU) is included in the same die as your CPU. You can use this added power on your machine to accelerate your AI inferencing workloads. The graphics processing unit comes in two flavors: integrated (built into the CPU) and discrete (stand-alone graphics card), branded as Intel® Iris® Xe MAX.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/274/0*4z3lPK6hJYrA8yEX" /></figure><p>To unleash the full potential of Intel hardware for AI workloads you can use the <a href="https://software.intel.com/content/www/us/en/develop/tools/openvino-toolkit.html?elqTrackId=a1a7ac10db2d41f399cdf80bb93db3ff&amp;elqaid=20555&amp;elqat=2">OpenVINO™ toolkit</a>, available in open-source version here: <a href="https://github.com/openvinotoolkit/openvino">https://github.com/openvinotoolkit/openvino</a></p><p>Now, you can access Intel® iGPU through Azure IoT Edge for Linux on Windows (EFLOW) with the help the OpenVINO™ Toolkit.</p><h3>System Setup for EFLOW</h3><ol><li><strong>Our system(works on other versions)</strong>: Windows 10/11 Insider preview, Windows Internet of Things Enterprise LTSC 2H21 (Build 19044)</li><li><strong>Enable Hyper-V</strong>: Open PowerShell with administrator privileges and run the following command and press “y” to reboot and complete the operation.</li></ol><pre>Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All</pre><p>3. <strong>Install Intel® Graphics Driver:</strong></p><ul><li>Download and install the latest GPU host driver from <a href="https://www.intel.com/content/www/us/en/download/19344/intel-graphics-windows-dch-drivers.html">https://www.intel.com/content/www/us/en/download/19344/intel-graphics-windows-dch-drivers.html</a></li><li>Make sure driver the version is 30.0.100.9955 or later, executable file igfx_win_100.9684.exe</li></ul><p>4. <strong>WSL Installation</strong>:</p><p>Open PowerShell with administrator privileges and run the following command and restart the system to finish the installation</p><pre>wsl --install</pre><h3>EFLOW Installation</h3><p><strong>Download EFLOW</strong></p><p>Open PowerShell with administrator privileges and run the following commands:</p><pre>$msiPath = $([io.Path]::Combine($env:TEMP,&#39;AzureIoTEdge.msi&#39;))<br>$ProgressPreference = &#39;SilentlyContinue&#39;<br>Invoke-WebRequest &quot;https://aka.ms/AzEflowMSI&quot; -OutFile $msiPath</pre><p><strong>Install EFLOW</strong></p><pre>Start-Process -Wait msiexec -ArgumentList &quot;/i&quot;,&quot;$([io.Path]::Combine($env:TEMP, &#39;AzureIoTEdge.msi&#39;))&quot;,&quot;/qn&quot;</pre><h3>EFLOW Deployment</h3><p><strong>Deploy EFLOW</strong></p><p>Open PowerShell with administrator privileges and run the following commands:</p><pre>Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force<br>Import-Module AzureEFLOW<br>cpu_count = 4<br>$memory = 4096<br>$hard_disk = 30</pre><pre>$gpu_name = (Get-WmiObject win32_VideoController | where{$_.name -like &quot;Intel(R)*&quot;}).caption</pre><pre>Deploy-Eflow -acceptEula yes -acceptOptionalTelemetry no -headless -cpuCount $cpu_count -memoryInMB $memory -vmDiskSize $hard_disk -gpuName $gpu_name -gpuPassthroughType ParaVirtualization -gpuCount 1</pre><p><strong>SSH into EFLOW VM</strong></p><pre>Connect-EflowVM</pre><p><strong>Ensure that GPU-PV is enabled</strong></p><ul><li>Within the EFLOW VM, run the following command</li></ul><pre>ls -al /dev/dxg</pre><ul><li>The expected output should be similar to</li></ul><pre>crw-rw-rw- 1 root 10, 60  Sep  8 06:20 /dev/dxg</pre><h3>Deploy a Docker container with OpenVINO™ Runtime and Run Benchmarking Using the Intel® iGPU</h3><p><strong>Create the Docker File</strong></p><pre>mkdir -p openvino_docker_dir &amp;&amp; cd openvino_docker_dir<br>vi Dockerfile</pre><p>Use the sample Dockerfile listed below to update your file</p><pre>FROM ubuntu:20.04 <br><br>RUN rm /bin/sh &amp;&amp; ln -s /bin/bash /bin/sh <br><br><br>ENV DEBIAN_FRONTEND noninteractive <br><br>ENV INTEL_OPENVINO_DIR /opt/intel/openvino_2021 <br><br>ENV MO_DIR ${INTEL_OPENVINO_DIR}/deployment_tools/model_optimizer <br><br>RUN apt update &amp;&amp; apt install -y \ <br><br>  libgtk-3-0 \ <br><br>  python3 \ <br><br>  python3-dev \ <br><br>  python3-setuptools \ <br><br>  python3-pip git \ <br><br>  wget \ <br><br>  libgl1 \ <br><br>  git \ <br><br>  build-essential \ <br><br>  cmake \ <br><br>  vim \ <br><br>  apt-utils \ <br><br>  wget \ <br><br>  clinfo \ <br><br>  gnupg gpg-agent \ <br><br>  software-properties-common \ <br><br>  nfs-common <br><br># Install the Open Model Zoo Accuracy Checker <br><br>WORKDIR /root <br><br>RUN git clone https://github.com/openvinotoolkit/open_model_zoo.git <br><br>WORKDIR /root/open_model_zoo <br><br>RUN git checkout 2021.4.2 <br><br>WORKDIR /root/open_model_zoo/tools/accuracy_checker <br><br><br>#RUN apt install -y libgl1 wget <br><br>RUN python3 -m pip install virtualenv  &amp;&amp; python3 -m virtualenv -p `which python3` checker &amp;&amp; \ <br><br>source checker/bin/activate <br><br>RUN pip3 install imageio~=2.3.0 <br><br>RUN python3 -m pip install torch==1.8.2+cpu torchvision==0.9.2+cpu torchaudio==0.8.2 -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html <br><br>RUN python3 -m pip install --upgrade pip &amp;&amp; \ <br><br>python3 -m pip install opencv-python <br><br>#RUN pip3 install  -r requirements.in &amp;&amp;  python3 setup.py install <br><br># For accuracy checker <br><br>RUN wget https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz &amp;&amp; tar xvf cifar-10-python.tar.gz -C sample &amp;&amp; \ <br><br><br>sed -i &#39;s/CPU/GPU/g&#39; sample/sample_config.yml <br><br>#RUN apt install -y clinfo wget gnupg gpg-agent software-properties-common nfs-common #ocl-icd-opencl-dev <br><br># Openvino installation  as documented at https://docs.openvinotoolkit.org/latest/openvino_docs_install_guides_installing_openvino_apt.html <br><br>RUN pip3 install openvino defusedxml <br><br><br>RUN unset no_proxy &amp;&amp; \ <br><br>wget https://apt.repos.intel.com/openvino/2021/GPG-PUB-KEY-INTEL-OPENVINO-2021 &amp;&amp; \ <br><br>apt-key add GPG-PUB-KEY-INTEL-OPENVINO-2021 &amp;&amp; \ <br><br>echo &quot;deb https://apt.repos.intel.com/openvino/2021 all main&quot; | tee /etc/apt/sources.list.d/intel-openvino-2021.list &amp;&amp; \ <br><br>apt update &amp;&amp; \ <br><br>apt install -y intel-openvino-runtime-ubuntu20-2021.4.752 \ <br><br>               intel-openvino-ie-samples-2021.4.752 \ <br><br>               intel-openvino-model-optimizer-2021.4.752 \ <br><br>               intel-openvino-pot-2021.4.752 \ <br><br>               intel-openvino-opencv-generic-2021.4.752 \ <br><br>               intel-openvino-opencv-lib-ubuntu-focal-2021.4.752 <br><br># Install the Model optimizer dependencies <br><br>WORKDIR ${MO_DIR}/install_prerequisites <br><br>RUN unset no_proxy &amp;&amp; \ <br><br>source ${INTEL_OPENVINO_DIR}/bin/setupvars.sh &amp;&amp; \ <br><br>sed -i &#39;s/sudo -E//g&#39; install_prerequisites.sh &amp;&amp; \ <br><br>./install_prerequisites_tf2.sh &amp;&amp; \ <br><br>./install_prerequisites_caffe.sh &amp;&amp; \ <br><br>./install_prerequisites_onnx.sh &amp;&amp; \ <br><br>./install_prerequisites_mxnet.sh <br><br>WORKDIR /root/open_model_zoo/tools/accuracy_checker <br><br>RUN pip3 install  -r requirements.in &amp;&amp; sync &amp;&amp; python3 setup.py install <br><br>  <br><br>  <br><br># Environment Setup <br><br>ENV PATH=/opt/intel/openvino_2021.4.752/deployment_tools/inference_engine/lib:$PATH; <br><br>RUN echo &quot;source /opt/intel/openvino_2021/bin/setupvars.sh&quot; | tee -a /root/.bashrc <br><br>ENV LD_LIBRARY_PATH=/opt/intel/openvino_2021.4.752/deployment_tools/inference_engine/libi/intel64:/usr/local/lib/python3.8/dist-packages/openvino/libs:/opt/intel/openvino_2021.4.752/deployment_tools/inference_engine/external/tbb/lib/:/opt/intel/openvino_2021.4.752/deployment_tools/inference_engine/lib:/opt/intel/openvino_2021.4.752/deployment_tools/ngraph/lib/:/usr/local/lib/python3.8/dist-packages/openvino/libs <br><br>ENV PYTHONPATH=/opt/intel/openvino_2021.4.752/deployment_tools/inference_engine/lib/intel64/:/opt/intel/openvino_2021.4.752/python/python3.6/openvino/inference_engine:~/open_model_zoo/tools/accuracy_checker:$PYTHONPATH; <br><br>#Install Intel OpenCL 21.40 release and dependencies <br><br># Release Info: https://github.com/intel/computeruntime/releases/tag/21.40.21182 <br><br>WORKDIR /root/neo <br><br>  <br><br>RUN  wget https://github.com/intel/compute-runtime/releases/download/22.05.22297/intel-gmmlib_22.0.0_amd64.deb &amp;&amp; \ <br><br>wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.9933/intel-igc-core_1.0.9933_amd64.deb &amp;&amp; \ <br><br>wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.9933/intel-igc-opencl_1.0.9933_amd64.deb &amp;&amp; \ <br><br>wget https://github.com/intel/compute-runtime/releases/download/22.05.22297/intel-opencl-icd_22.05.22297_amd64.deb &amp;&amp; \ <br><br>wget https://github.com/intel/compute-runtime/releases/download/22.05.22297/intel-level-zero-gpu_1.3.22297_amd64.deb <br><br>RUN dpkg -i /root/neo/*.deb</pre><p><strong>Build the Docker Image</strong></p><ul><li>Within the directory where the docker file is located, run the following command:</li></ul><pre>sudo docker build -t ovbuild</pre><p><strong>Launch the Docker Container with access the GPU-PV functionalities</strong></p><pre>sudo docker images</pre><p>Use the output to find the &lt;IMAGE ID&gt; for the container you built</p><pre>sudo docker run -it --device /dev/dxg:/dev/dxg -v /usr/lib/wslusr/lib/wsl &lt;IMAGE ID&gt; bash</pre><h3>Run OpenVINO™ Benchmarking Using the iGPU</h3><p>Within the deployed container, run the following commands:</p><pre>cd /opt/intel/openvino_2021/inference_engine/samples/cpp &amp;&amp; <br>./build_samples.sh</pre><pre>cd ~/inference_engine_cpp_samples_build/intel64/Release</pre><pre>wget https://download.01.org/opencv/2021/openvinotoolkit/2021.2/ope <br>n_model_zoo/models_bin/3/face-detection-retail-0004/FP32/face-detection-retail-0004.xml</pre><pre>wget https://download.01.org/opencv/2021/openvinotoolkit/2021.2/ope <br>n_model_zoo/models_bin/3/face-detection-retail-0004/FP32/face-detection-retail-0004.bin</pre><pre>./benchmark_app -m face-detection-retail-0004.xml -d GPU</pre><p>The output should look something like the image shown below with clear indication of iGPU usage in the task manager</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/0*5pMh18rOf4MSYUng" /></figure><h3>Azure IoT Hub Deployment</h3><p>Learn how to deploy Azure IoT Edge modules from Azure cloud to your Windows device <a href="https://www.intel.com/content/www/us/en/developer/articles/technical/deploy-reference-implementation-to-azure-iot-eflow.html">here</a>.</p><h3>Conclusion</h3><p>We hope that with this blog, we were able to show you just how easy it is to:</p><ul><li>Setup and deploy your application or docker container in Linux VMs using EFLOW on a windows device.</li><li>Offload your AI workloads by harnessing the power of iGPU.</li><li>Get a significant performance boost by simply using OpenVINO™ Toolkit.</li></ul><h3>Learn More</h3><ul><li><a href="https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/overview.html">Download the latest release of the OpenVINO toolkit.</a></li><li><a href="https://www.intel.com/content/www/us/en/developer/tools/devcloud/overview.html">Get access to the latest Intel hardware with Intel DevCloud.</a></li><li><a href="https://www.intel.com/content/www/us/en/developer/topic-technology/edge-5g/overview.html">Latest from </a><a href="https://www.intel.com/content/www/us/en/developer/topic-technology/edge-5g/training/go-to-market-with-openvino.html">Intel®</a><a href="https://www.intel.com/content/www/us/en/developer/topic-technology/edge-5g/overview.html"> on Edge, IoT &amp; 5G Development</a></li><li><a href="https://www.intel.com/content/www/us/en/developer/topic-technology/edge-5g/training/go-to-market-with-openvino.html">Go to market with Intel® Distribution of OpenVINO™ Toolkit</a></li></ul><h3>Notices &amp; Disclaimers</h3><p>Performance varies by use, configuration and other factors. Learn more at <a href="http://www.intel.com/PerformanceIndex">www.Intel.com/PerformanceIndex</a> .</p><p>Performance results are based on testing as of dates shown in configurations and may not reflect all publicly available updates. See backup for configuration details. No product or component can be absolutely secure.</p><p>Your costs and results may vary.</p><p>Intel technologies may require enabled hardware, software or service activation.</p><p>© Intel Corporation. Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries. Other names and brands may be claimed as the property of others.</p><p><em>This post was originally published on </em><a href="https://community.intel.com/t5/Blogs/Tech-Innovation/Artificial-Intelligence-AI/Witness-the-power-of-Intel-iGPU-with-Azure-IoT-Edge-for-Linux-on/post/1382405"><em>Intel.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1520d60b19e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/openvino-toolkit/witness-the-power-of-intel-igpu-with-azure-iot-edge-for-linux-on-windows-eflow-openvino-f1520d60b19e">Witness the power of Intel® iGPU with Azure IoT Edge for Linux on Windows(EFLOW) &amp; OpenVINO™…</a> was originally published in <a href="https://medium.com/openvino-toolkit">OpenVINO-toolkit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The No-Code Approach to Deploying Deep Learning Models on Intel® Hardware]]></title>
            <link>https://medium.com/openvino-toolkit/the-no-code-approach-to-deploying-deep-learning-models-on-intel-hardware-c72067e5ae9b?source=rss-406315823445------2</link>
            <guid isPermaLink="false">https://medium.com/p/c72067e5ae9b</guid>
            <category><![CDATA[edge-ai]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[inference]]></category>
            <category><![CDATA[no-code]]></category>
            <category><![CDATA[openvino]]></category>
            <dc:creator><![CDATA[Ragesh Hajela]]></dc:creator>
            <pubDate>Tue, 26 Apr 2022 20:09:30 GMT</pubDate>
            <atom:updated>2022-04-27T21:48:36.657Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>A three-part series on OpenVINO™ Deep Learning Workbench</strong></p><h4>About the Series</h4><ul><li>Learn how to convert, fine-tune, and package an inference-ready TensorFlow model, optimized for Intel® hardware, using nothing but a web browser. Every step happens in the cloud using OpenVINO™ Deep Learning Workbench and Intel® DevCloud for the Edge.</li><li><strong>Part One (you’re here!):</strong> We show you the Intel® deep learning inference tools and the basics of how they work.</li><li><a href="https://www.intel.com/content/www/us/en/artificial-intelligence/posts/use-tensorflow-model-on-intel-hardware.html"><strong>Part Two:</strong></a> We go through each step of importing, converting, and benchmarking a TensorFlow model using OpenVINO Deep Learning Workbench.</li><li><a href="https://www.intel.com/content/www/us/en/artificial-intelligence/posts/deploying-dl-models-on-intel-hardware.html"><strong>Part Three:</strong></a> We show you how to change precision levels for increased performance and export a ready-to-run inference package with just a browser using OpenVINO Deep Learning Workbench.</li></ul><h4>Part One: Intel® Tools for Deep Learning Inference Deployment</h4><p><strong><em>Learn the basics of OpenVINO™ Deep Learning Workbench and Intel® DevCloud for the Edge</em></strong></p><p>Pruning deep learning models, combining network layers, developing for multiple hardware targets — getting from a trained deep learning model to a ready-to-deploy inference model seems like a lot of work, which it can be if you hand code it.</p><p>With Intel® tools you can go from trained model to an optimized, packaged inference model entirely online without a single line of code. In this article, we’ll introduce you to the Intel® toolkits for deep learning deployments, including the Intel® Distribution of OpenVINO™ toolkit and Deep Learning Workbench. After that, we’ll get you signed up for a free Intel DevCloud for the Edge account so that you can start optimizing your own inference models.</p><p><strong>What is a deep learning model and how do deployments work on Intel hardware?</strong></p><p>Deep learning has two broad phases: training and inference. During training, computers build artificial neural network models by analyzing thousands of inputs — images, sentences, sounds — and guessing at their meaning. A feedback loop tells the machine if the guesses are right or wrong. This process repeats thousands of times, creating a multilayered network of algorithms. Once the network reaches its target accuracy, it can be frozen and exported as a trained model.</p><p>During deep learning inference, a device compares incoming data with a trained model and infers what the data means. For example, a smart camera compares video frames against a deep learning model for object detection. It then infers that one shape is a cat, another is a dog, a third is a car, and so on. During inference, the device isn’t learning; it’s recognizing and interpreting the data it receives.</p><p>There are many popular frameworks — like TensorFlow PyTorch, MXNet, PaddlePaddle — and a multitude of deep learning topologies and trained models. Each framework and model has its own syntax, layers, and algorithms. To run a deep learning model on an Intel® CPU, integrated GPU, or Intel® Movidius™ VPU we need to:</p><ol><li>Optimize the model so it runs as fast as possible</li><li>Convert it into an intermediate file (IR file) that will run on any mix of Intel hardware</li><li>Tune it so that it has the right balance of performance and accuracy</li><li>Package it as a complete inference model that is ready for deployment</li></ol><p>How do you do all that? Do you need a degree in data science? Nope. All you need is the OpenVINO Deep Learning Workbench.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FlyGSDxvruubbhkpsPI0ug.png" /><figcaption><em>Optimize | Convert to IR file | Tune | Package and deploy</em></figcaption></figure><p><strong>Deploying deep learning models with a browser: The OpenVINO Deep Learning Workbench</strong></p><p>Deep Learning Workbench gives you access to the OpenVINO™ tool suite in a web-based interface, including the <a href="https://docs.openvinotoolkit.org/cn/2021.3/omz_tools_downloader.html">Model Downloader</a>, <a href="https://docs.openvinotoolkit.org/cn/2021.3/openvino_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html">Model Optimizer</a>, <a href="https://docs.openvinotoolkit.org/latest/pot_README.html">Post-Training Optimization Tool</a>, <a href="https://docs.openvinotoolkit.org/latest/omz_tools_accuracy_checker.html">Accuracy Checker</a>, and <a href="https://docs.openvinotoolkit.org/cn/2021.3/openvino_inference_engine_tools_benchmark_tool_README.html">Benchmarking tools</a>.<br> <br>With Deep Learning Workbench, you can point and click your way from a trained model to a tested and tuned application package.</p><p><strong>Who is Deep Learning Workbench for?</strong></p><p>Besides you, you mean, right? We built Deep Learning Workbench and DevCloud for two basic types of developers: beginners, specifically beginners in AI deployment, and working professionals who need to get AI into production as quickly and painlessly as possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*52P48tERE45imLqRUXu3SQ.png" /><figcaption><em>Deep Learning Workbench simplifies model import, tuning, and deployment.</em></figcaption></figure><p><strong>If you’re a beginner</strong></p><p>Sign up for DevCloud and play your way through the tutorials and reference implementations. Then, create your first optimized inference model with Deep Learning Workbench. You can experiment with different optimizations and see how your model runs on all kinds of different Intel hardware and accelerators.</p><p><strong>If you’re a pro</strong></p><p>Use DevCloud and Deep Learning Workbench to convert pretrained models then systematically benchmark, test, and tune. You can build production-ready deep learning inference applications that can run on any modern piece of Intel® silicon. You don’t have to buy bench hardware or be a data scientist to do it.</p><p><strong>Test and tune on the latest Intel hardware — without buying any hardware!</strong></p><p>You could run Deep Learning Workbench on your local machine, but that means you’ll only be able to test and deploy on your device. We have a better — and free — test bed for you: Intel DevCloud for the Edge.</p><p>DevCloud is an online sandbox where you can run Deep Learning Workbench in a JupyterLab environment on a range of Intel hardware all in one place.</p><p><strong>Top five things you can do for free on Intel DevCloud for the Edge</strong></p><ol><li>Learn about deep learning inference on Intel hardware.</li><li>Explore deep learning inference middleware and reference applications.</li><li>Create your own JupyterLab notebooks and build applications online with the Intel® Distribution of OpenVINO™ toolkit,.</li><li>Test your applications on the latest Intel hardware, including machines from <a href="https://software.intel.com/content/www/us/en/develop/tools/devcloud/edge/launch/ecosystem-partners.html">Intel’s ecosystem partners</a>.</li><li>Run OpenVINO Deep Learning Workbench and go from trained model to optimized, ready-to-deploy inference model with no code.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hyBLO_0NDjV9PfE2MbD5kw.png" /><figcaption><em>Get free access to Intel® hardware and Deep Learning Workbench on Intel® DevCloud for the Edge.</em></figcaption></figure><p><strong>Let’s get started — How to launch OpenVINO Deep Learning Workbench</strong></p><p>If you don’t have an account yet, <a href="https://software.intel.com/content/www/us/en/develop/tools/devcloud/edge.html">please sign up for DevCloud for the Edge</a> by accepting Intel’s Terms and Conditions and Privacy Policy. Go ahead. It’s free, and it only takes a few minutes.</p><p>Once you have an account, <a href="https://software.intel.com/content/www/us/en/develop/tools/devcloud/edge/overview.html">login</a>.</p><p>Note: For best results, please use Google Chrome to access Intel DevCloud for the Edge.</p><p>Go to the Optimize tab and select Deep Learning Workbench.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MkDi53vVW8u1YRbaa_WgdA.png" /><figcaption><em>After log-in, launch Deep Learning Workbench from the Optimize tab.</em></figcaption></figure><p>A new notebook opens in JupyterLab with a single cell for you to run. Don’t worry! This is the only code you’ll see. Put your cursor in the cell and click the Run button in the menu bar. A Start button will appear below the cell. Click “Start Application” and you’re on your way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4lySwr2rIQ62DV9va8i1zA.png" /><figcaption><em>Once the launcher is running in JupyterLab, run the first cell, then click Start Application.</em></figcaption></figure><p><strong>Next up — Part Two:</strong> <a href="https://community.intel.com/t5/Blogs/Tech-Innovation/Artificial-Intelligence-AI/The-No-Code-Approach-to-Deploying-Deep-Learning-Models-on-Intel/post/1335757">Import, Convert, and Benchmark a TensorFlow Model on Intel Hardware with OpenVINO Deep Learning Workbench</a></p><p>In our next post, we’ll show you how to create a new project and import and benchmark a TensorFlow model in six simple steps.</p><p><strong>Learn more:</strong></p><ul><li><a href="https://docs.openvinotoolkit.org/latest/openvino_docs_get_started_get_started_dl_workbench.html">Get started with OpenVINO toolkit and Deep Learning Workbench</a></li><li><a href="https://docs.openvino.ai/latest/workbench_docs_Workbench_DG_Introduction.html">Explore Deep Learning Workbench documentation</a></li><li><a href="https://www.youtube.com/watch?v=on8xSSTKCt8&amp;list=RDCMUC3MVZ-eKiWXr-UTSlYQDIww&amp;index=11">Watch the video — Introduction to OpenVINO™ Deep Learning Workbench</a></li><li><a href="https://www.youtube.com/watch?v=gzUFYxomjn8&amp;list=RDCMUC3MVZ-eKiWXr-UTSlYQDIww&amp;start_radio=1&amp;rv=gzUFYxomjn8&amp;t=4">Watch the video — Get started with the Deep Learning Workbench</a></li><li><a href="https://www.youtube.com/watch?v=rygSRiKn0oY">Watch the video — OpenVINO™ Deep Learning WorkBench on Intel® DevCloud for the Edge</a></li><li><a href="https://software.intel.com/content/www/us/en/develop/tools/devcloud/edge.html">Sign up for Intel® DevCloud for the Edge</a></li></ul><p><strong>Notices &amp; Disclaimers</strong></p><p>Performance varies by use, configuration and other factors. Learn more at <a href="http://www.intel.com/PerformanceIndex">www.Intel.com/PerformanceIndex​</a>​.</p><p>Performance results are based on testing as of dates shown in configurations and may not reflect all publicly available ​updates. See backup for configuration details. No product or component can be absolutely secure.</p><p>Your costs and results may vary.</p><p>Intel technologies may require enabled hardware, software or service activation.</p><p>Intel does not control or audit third-party data. You should consult other sources to evaluate accuracy.</p><p>© Intel Corporation. Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries. Other names and brands may be claimed as the property of others.</p><p><em>This post was originally published on </em><a href="https://community.intel.com/t5/Blogs/Tech-Innovation/Artificial-Intelligence-AI/The-No-Code-Approach-to-Deploying-Deep-Learning-Models-on-Intel/post/1335749"><em>Intel.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c72067e5ae9b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/openvino-toolkit/the-no-code-approach-to-deploying-deep-learning-models-on-intel-hardware-c72067e5ae9b">The No-Code Approach to Deploying Deep Learning Models on Intel® Hardware</a> was originally published in <a href="https://medium.com/openvino-toolkit">OpenVINO-toolkit</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing OpenVINO™ integration with TensorFlow]]></title>
            <link>https://medium.com/@rageshhajela/introducing-openvino-integration-with-tensorflow-7da8da2f0f47?source=rss-406315823445------2</link>
            <guid isPermaLink="false">https://medium.com/p/7da8da2f0f47</guid>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[openvino]]></category>
            <category><![CDATA[inference]]></category>
            <category><![CDATA[edge-ai]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Ragesh Hajela]]></dc:creator>
            <pubDate>Wed, 20 Apr 2022 23:10:39 GMT</pubDate>
            <atom:updated>2022-05-23T16:46:12.452Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*vhvZShlabmXREkh9BxCgkw.png" /></figure><p>Authors: Arindam, Yamini, Mustafa, Ritesh, Priya, Chandrakant, Surya, Amar, Sesh</p><p>Viral adoption of technologies is often triggered by leaps in user experience. For example, the iPhone prompted the rapid adoption of smartphones and the “app store.” Or, more recently, the ease of use seen in TensorFlow kickstarted the massive growth of Artificial Intelligence that touches almost every aspect of our daily lives today.</p><p><a href="https://docs.openvinotoolkit.org/">OpenVINO™ toolkit</a> has redefined AI inferencing on Intel powered devices and has attained unprecedented developer adoption. Today hundreds of thousands of developers use OpenVINO™ toolkit to accelerate AI inferencing across almost all imaginable use cases, from emulation of human vision, automatic speech recognition, natural language processing, recommendation systems, and many others. Based on latest generations of artificial neural networks, including Convolutional Neural Networks (CNNs), recurrent and attention-based networks, the toolkit extends computer vision and non-vision workloads across Intel® hardware (Intel® CPU, Intel® Integrated Graphics, Intel® Neural Compute Stick 2, and Intel® Vision Accelerator Design with Intel® Movidius™ VPUs), maximizing performance. It accelerates applications with high-performance, AI, and deep learning inference deployed from edge to cloud.</p><p>We are honored to partner with our customers and contribute to their success. We are constantly listening and innovating to meet their evolving needs while also aiming to provide a world class user experience. Therefore, based on customer feedback, and building on OpenVINO™ toolkit’s success, we are introducing the<a href="https://github.com/openvinotoolkit/openvino_tensorflow"> OpenVINO™ integration with TensorFlow*</a>. This integration enables TensorFlow developers to accelerate inferencing of their TensorFlow models in deployment with just 2 additional lines of code.</p><h4>Benefits for TensorFlow Developers:</h4><p><a href="https://github.com/openvinotoolkit/openvino_tensorflow">OpenVINO™ integration with TensorFlow*</a> delivers <a href="https://software.intel.com/content/www/us/en/develop/tools/openvino-toolkit.html">OpenVINO™ toolkit</a> inline optimizations and runtime needed for an enhanced level of TensorFlow compatibility. It is designed for developers who would like to experience the benefits of using OpenVINO™ toolkit — help boost performance for their inferencing applications — with minimal code modifications. It accelerates inference across <a href="https://github.com/openvinotoolkit/openvino_tensorflow/blob/master/docs/MODELS.md">many AI models</a> on a variety of Intel® silicon, such as:</p><ul><li>Intel® CPU</li><li>Intel® Integrated Graphics</li><li>Intel® Movidius™ Vision Processing Units — referred as VPU</li><li>Intel® Vision Accelerator Design with 8 Intel Movidius™ MyriadX VPUs — referred as VAD-M or HDDL</li></ul><p>Developers leveraging this integration can expect the following benefits:</p><ul><li><strong>Performance acceleration</strong> compared to native TensorFlow (depending on underlying hardware configuration).</li><li><strong>Accuracy</strong> — preserve accuracy nearly identical to original model.</li><li><strong>Simplicity</strong> — Continue to use TensorFlow APIs for inferencing. No need to refactor code. Just import, enable, and set device.</li><li><strong>Robustness</strong> — architected to support a wide range of TensorFlow models and operators across a variety of OS/Python environments.</li><li><strong>Seamless</strong>, inline model conversions — no explicit model conversion required.</li><li><strong>Lightweight footprint</strong> — minimal incremental memory and disk footprint required.</li><li><strong>Support for broad range of Intel powered devices</strong> — CPUs, iGPUs, VPUs (Myriad-X)</li></ul><p>[<strong>Note:</strong> For maximum performance, efficiency, tooling customization, and hardware control, we recommend going beyond this component to adopt native OpenVINO™ APIs and its runtime.]</p><h4>How does it work?</h4><p>Developers can greatly accelerate the inferencing of their TensorFlow models by adding the following two lines of code to their Python code or Jupyter Notebooks.</p><p>import openvino_tensorflow<br>openvino_tensorflow.set_backend(‘&lt;backend_name&gt;’)</p><p>Supported backends include ‘CPU’, ‘GPU’, ‘MYRIAD’, and ‘VAD-M’. See Figure 1.</p><h4>Sample code:</h4><p>Here is an example of OpenVINO™ integration with TensorFlow* at work:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*Q0nFEzlBdbhbFun6-iPkJA.png" /><figcaption>Figure 1</figcaption></figure><h4>How does it really work under the hood?</h4><p><a href="https://github.com/openvinotoolkit/openvino_tensorflow">OpenVINO™ integration with TensorFlow*</a> provides accelerated TensorFlow performance by efficiently partitioning TensorFlow graphs into multiple subgraphs, which are then dispatched to either the TensorFlow runtime or the OpenVINO™ runtime for optimal accelerated inferencing. The results are finally assembled to provide the final inference results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*SBHSLC-bWNEbskDkdE-n3A.png" /><figcaption><em>Figure 2: End-to-end overview of the workflow</em></figcaption></figure><p><a href="https://github.com/openvinotoolkit/openvino_tensorflow/blob/master/docs/ARCHITECTURE.md">Here is a detailed architecture diagram.</a></p><h4>Deployment at the Edge and the Cloud</h4><p>OpenVINO™ integration with TensorFlow* works in a variety of environments — from the cloud to the edge — as long as the underlying hardware is an Intel platform. E.g., the add-on works on the following cloud platforms:</p><ul><li><a href="https://www.intel.com/content/www/us/en/developer/tools/devcloud/edge/build/ovtfoverview.html">Intel® DevCloud for the Edge</a></li><li><a href="https://github.com/openvinotoolkit/openvino_tensorflow/blob/master/docs/cloud_instructions/AWS_instructions.md">AWS Deep Learning AMI Ubuntu 18 &amp; Ubuntu 20 on EC2 C5 instances optimized for inferencing</a></li><li><a href="https://github.com/openvinotoolkit/openvino_tensorflow/blob/master/docs/cloud_instructions/Azure_instructions.md">Azure ML</a></li><li><a href="https://github.com/openvinotoolkit/openvino_tensorflow/tree/master/examples/notebooks">Google colab</a></li></ul><p>Any AI based Edge device is supported.</p><p>Samples are available in the examples/ directory in the <a href="https://github.com/openvinotoolkit/openvino_tensorflow/tree/master/examples">gitrepo</a>.</p><h4>How is this different from using native OpenVINO™ toolkit:</h4><p>OpenVINO™ integration with TensorFlow* enables TensorFlow developers to accelerate their TensorFlow model inferencing in a very quick and easy manner — with just 2 lines of code. The OpenVINO™ model optimizer accelerates inference performance, along with a wealth of integrated developer tools and advanced features, but as mentioned earlier, for maximum performance, efficiency, tooling customization, and hardware control, we recommend native OpenVINO™ APIs and its runtime.</p><h4>Customer adoption</h4><p>Customers are using OpenVINO™ integration for TensorFlow for a variety of use cases. Here are a few examples:</p><ol><li><a href="https://bbs.cvmart.net/articles/5412"><strong>Extreme Vision</strong></a><strong>:</strong> Dedicated AI-only clouds such as Extreme Vision’s <a href="https://www.cvmart.net/">CV MART</a> helps enable hundreds of thousands of developers with a rich catalog of services, models, and frameworks to further optimize their AI workloads on a variety of Intel platforms such as CPUs and iGPUs. An easy-to-use developer toolkit to accelerate models, properly integrated with AI frameworks, such as OpenVINO™ integration with TensorFlow*, provides the best of both worlds — an increase in inference speed as well as the ability to reuse already created AI inference code with minimal changes. The Extreme Vision team is testing OpenVINO™ integration with TensorFlow* with the goal of enabling TensorFlow developers on the Extreme Vision platform.</li><li><a href="https://terra.bio/spotlight-on-gatk-one-of-terras-most-popular-built-in-tools-for-genomic-analysis/"><strong>Genome Analysis Toolkit (GATK)</strong></a> developed by the Broad Institute is one of the world’s most widely used open-source toolkit for variant calling. Terra is a more secure, scalable, open-source platform for biomedical researchers to access data, run analysis tools and collaborate. The cloud-based platform is co-developed by the Broad Institute of MIT and Harvard, Microsoft, and Verily. Terra platform includes GATK tools and pipelines for the research community to run their analytics. <a href="https://gatk.broadinstitute.org/hc/en-us/articles/360037226672-CNNScoreVariants">CNNScoreVariants</a> is one of the deep learning tools included in GATK which apply a Convolutional Neural Net to filter annotated variants. In a <a href="https://www.intel.com/content/www/us/en/artificial-intelligence/posts/accelerating-genome-workloads-ovtf.html">blog</a>, Broad Institute showcase’s how to further accelerate inference performance of CNNScoreVariants using OpenVINO™ integration with TensorFlow*.</li></ol><h4>Conclusion</h4><p>Now that you have a better understanding of the benefits, how it works, deployments environments, and how OpenVINO integration with TensorFlow differs from using native OpenVINO APIs, we can’t wait for you to try OpenVINO integration with TensorFlow for yourself and begin experiencing a boost in inference performance of your AI models on all Intel platforms. And as always, we would love to hear your feedback on this integration, please contact us at <a href="/service/mailto:OpenVINO-tensorflow@intel.com">OpenVINO-tensorflow@intel.com</a> or raise issues in the gitrepo. Thank you!</p><h4>Resources</h4><p>Here are resources to help you learn more:</p><ul><li><a href="https://github.com/openvinotoolkit/openvino_tensorflow">Github repository</a></li><li><a href="https://www.intel.com/content/dam/www/central-libraries/us/en/documents/openvino-tensorflow-solution-brief.pdf">Solution Brief</a></li><li><a href="https://www.intel.com/content/www/us/en/artificial-intelligence/documents/openvino-tensorflow-comic.html">Comic Strip on Dynamic Fallback</a></li><li><a href="https://www.intel.com/content/www/us/en/artificial-intelligence/documents/faq-openvino-integration-with-tensorflow.html">A detailed FAQ is available here.</a></li><li><a href="https://www.intel.com/content/www/us/en/developer/tools/devcloud/edge/build/ovtfoverview.html">Sample notebooks on Intel DevCloud for the Edge are available here</a>.</li><li><a href="https://github.com/openvinotoolkit/openvino_tensorflow/tree/master/examples/notebooks">Sample Google Colab notebooks are available here.</a></li></ul><h4>Notices &amp; Disclaimers</h4><p>Performance varies by use, configuration, and other factors. Learn more at <a href="https://edc.intel.com/content/www/us/en/products/performance/benchmarks/overview/">www.Intel.com/PerformanceIndex</a>.</p><p>Performance results are based on testing as of dates shown in configurations and may not reflect all publicly available updates. See backup for configuration details. No product or component can be absolutely secure.</p><p>Your costs and results may vary.</p><p>Intel technologies may require enabled hardware, software or service activation.</p><p>Intel disclaims all express and implied warranties, including without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising from course of performance, course of dealing, or usage in trade.</p><p>© Intel Corporation. Intel, the Intel logo, OpenVINO and the OpenVINO logo are trademarks of Intel Corporation or its subsidiaries. Other names and brands may be claimed as the property of others.</p><p>This post was originally published on <a href="https://community.intel.com/t5/Blogs/Tech-Innovation/Artificial-Intelligence-AI/Introducing-OpenVINO-integration-with-TensorFlow/post/1347434">Intel.com</a>.</p><p><a href="https://medium.com/u/f477fa75b0b0">OpenVINO™ toolkit</a> <a href="https://medium.com/u/b1d410cb9700">TensorFlow</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7da8da2f0f47" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simplified Deployments with OpenVINO™ Model Server and TensorFlow Serving]]></title>
            <link>https://medium.com/@rageshhajela/simplified-deployments-with-openvino-model-server-and-tensorflow-serving-849d2dd7fdbc?source=rss-406315823445------2</link>
            <guid isPermaLink="false">https://medium.com/p/849d2dd7fdbc</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[edge]]></category>
            <category><![CDATA[openvino]]></category>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Ragesh Hajela]]></dc:creator>
            <pubDate>Wed, 30 Mar 2022 18:40:42 GMT</pubDate>
            <atom:updated>2022-04-21T16:22:52.517Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*9FLUDeny9cX3VTvfj2pGDw.png" /></figure><p>Author: Milosz Zeglarski</p><h4>Introduction</h4><p>In this blog, you will learn how to perform inference on JPEG images using the gRPC API in OpenVINO™ Model Server. Model servers play an important role in smoothly bringing models from development to production. They serve models via network endpoints and expose APIs for interacting with them. Once a model is served, a set of functions are required to call the API from our application.</p><p>OpenVINO™ Model Server and TensorFlow Serving share the same frontend API, meaning we can use the same code to interact with both. For Python developers, the typical starting point is using the <a href="https://pypi.org/project/tensorflow-serving-api/"><strong>tensorflow-serving-api</strong></a> pip package. Unfortunately, since this package includes TensorFlow as a dependency, its footprint is quite large.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*pKguoOt0kkv5gqCHu8lWPQ.gif" /></figure><h4>The road towards a lightweight client</h4><p>Since <strong>tensorflow-serving-api</strong> and its dependencies are roughly <strong>1.3GB</strong> in size, we decided to create a lightweight client with only the necessary functions to perform API calls. In the latest version of OpenVINO™ Model Server, we introduced a preview version of the Python client library — <strong>ovmsclient</strong>. This new package, with all its dependencies, is less than <strong>100MB</strong> — making it about <strong>13x smaller</strong> than <strong>tensorflow-serving-api</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*DRiYFmn-WKUrfbHuuBig8g.jpeg" /><figcaption><em>Python environment comparison. Note the difference in number of packages installed along with the client.</em></figcaption></figure><p>In addition to having a larger binary size, importing <strong>tensorflow-serving-api</strong> in an application also consumes more memory. See the results below of running the top command for Python scripts that perform the same operations — one with <strong>tensorflow-serving-api</strong> and the other with</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*28Ijxr2AflovVVEbY7g-ZA.png" /><figcaption><strong><em>Memory usage comparison.</em></strong><br><strong><em>Note the difference in RES [KB] column that indicates the amount of physical memory used by the task.</em></strong></figcaption></figure><p>Importing packages with a large footprint will also increase initialization time, another benefit of using the lightweight client. The new Python client package is also simpler to use than <strong>tensorflow-serving-api</strong>, as it provides utilities for end-to-end interaction with model servers. When using <strong>ovmsclient</strong>, an application developer doesn’t need to know the details of the server API. The package provides a set of convenient functions for every stage of interaction — from setting up the connection and making API calls, to unpacking the results in a standard format. Previously, developers needed to know which service accepts what type of request or how to manually prepare requests and handle responses.</p><h4>Let’s use ovmsclient</h4><p>To run a prediction using a ResNet-50 image classification model, deploy OpenVINO™ Model Server with the model. You can do that with the command below:</p><pre>docker run -d --rm -p 9000:9000 openvino/model_server:latest \ <br>--model_name resnet --model_path gs://ovms-public-eu/resnet50-binary \ <br>--layout NHWC:NCHW --port 9000</pre><p>This command starts the server with a ResNet-50 model downloaded from a public bucket on <a href="https://cloud.google.com/storage"><strong>Google Cloud Storage.</strong></a> With Model Server is listening for gRPC calls on port 9000, you can start interacting with the server. Next, let’s install <strong>ovmsclient</strong> package using pip:</p><pre>pip3 install ovmsclient</pre><p>Before running the client, download an <a href="https://raw.githubusercontent.com/openvinotoolkit/model_server/main/demos/common/static/images/zebra.jpeg"><strong>image </strong></a>to classify and corresponding ImageNet <a href="https://raw.githubusercontent.com/openvinotoolkit/model_server/main/demos/common/python/classes.py"><strong>labels file</strong></a> to interpret prediction results:</p><pre>wget<br><a href="https://raw.githubusercontent.com/openvinotoolkit/model_server/main/demos/common/static/images/zebra.jpeg">https://raw.githubusercontent.com/openvinotoolkit/model_server/main/demos/common/static/images/zebra.jpeg</a></pre><pre>wget <br><a href="https://raw.githubusercontent.com/openvinotoolkit/model_server/main/demos/common/python/classes.py">https://raw.githubusercontent.com/openvinotoolkit/model_server/main/demos/common/python/classes.py</a></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/336/0*NIH5R5ezlWn6zhDX" /><figcaption><strong><em>Picture of a </em></strong><a href="https://github.com/openvinotoolkit/model_server/raw/main/example_client/images/zebra.jpeg"><strong><em>zebra</em></strong></a><strong><em> used for prediction</em></strong></figcaption></figure><p><strong>Step 1: Create a gRPC connection to the server:</strong></p><p>Now you can open <a href="https://docs.python.org/3/tutorial/interpreter.html"><strong>Python interpreter</strong></a> and create a gRPC connection to the Model Server.</p><pre>$ python3 <br>Python 3.6.9 (default, Jul 17 2020, 12:50:27) <br>[GCC 8.4.0] on linux <br>Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information. <br>&gt;&gt; from ovmsclient import make_grpc_client <br>&gt;&gt; client = make_grpc_client(&quot;localhost:9000&quot;)</pre><p><strong>Step 2: Request the model metadata:</strong></p><p>The client object has three methods: get_model_status, get_model_metadata, and predict. To create a valid inference request, you need to know the model input. For that, let’s request model metadata:</p><pre>&gt;&gt; client.get_model_metadata(model_name= &quot;resnet&quot;) <br>{&#39;model_version&#39;: 1, &#39;inputs&#39;: {&#39;0&#39;: {&#39;shape&#39;: [1, 224, 224, 3], &#39;dtype&#39;: &#39;DT_FLOAT&#39;}}, &#39;outputs&#39;: {&#39;1463&#39;: {&#39;shape&#39;: [1, 1000], &#39;dtype&#39;: &#39;DT_FLOAT&#39;}}}</pre><p><strong>Step 3: Send a JPEG image to the server:</strong></p><p>From model metadata, we learn that the model has one input and one output. The input name is “0” and it expects data in shape (1,224,224,3) with floating point datatype. Now you have all the information needed to run inference. Let’s use the image of a zebra that was downloaded in the previous step. In this example, we will use the Model Server binary inputs feature, which requires just loading a JPEG and requesting prediction on the encoded binary — no preprocessing is needed when using the binary inputs.</p><pre>&gt;&gt; with open(&quot;zebra.jpeg&quot;, &quot;rb&quot;) as f: <br>... img = f.read() <br>... <br>&gt;&gt; output = client.predict(inputs={ &quot;0&quot;: img}, model_name= &quot;resnet&quot;) <br>&gt;&gt; type(output) <br>&lt;class &#39;numpy.ndarray&#39;&gt; <br>&gt;&gt; output.shape <br>(1, 1000)</pre><p><strong>Step 4: Map the output to an imagenet class:</strong></p><p>The prediction returned successfully with an output numpy ndarray in shape (1, 1000) — the same as was described in the model metadata in the “outputs” section. The next step is to interpret the model output and extract the classification result.</p><p>The shape of the output is (1, 1000), where the first dimension represents batch size (number of processed images) and the second is probability of the image belonging to each of the ImageNet classes. To get the classification result you need to get the index of the maximum value in the second dimension of the output. Then use imagenet_classes dictionary from classes.py downloaded in previous step to perform mapping of the index number to class name and see the result.</p><pre>&gt;&gt;&gt; import numpy as np <br>&gt;&gt;&gt; from classes import imagenet_classes <br>&gt;&gt;&gt; result_index = np.argmax(output[0]) <br>&gt;&gt;&gt; imagenet_classes[result_index] <br>&#39;zebra&#39;</pre><h4>Conclusion</h4><p>The new <strong>ovmsclient</strong> package is smaller, consumes less memory, and is easier to use than<strong> tensorflow-serving-api</strong>. In this blog, we learned how to get model metadata and run predictions on binary encoded JPEG image via the gRPC interface in OpenVINO™ Model Server.</p><p>See more detailed examples for running predictions with NumPy arrays, checking model status, and using the REST API on GitHub: <a href="https://github.com/openvinotoolkit/model_server/tree/main/client/python/ovmsclient/samples">https://github.com/openvinotoolkit/model_server/tree/main/client/python/ovmsclient/samples</a></p><p>To learn more about <strong>ovmsclient</strong> capabilities, see the API documentation:<br><a href="https://github.com/openvinotoolkit/model_server/blob/main/client/python/ovmsclient/lib/docs/README.md">https://github.com/openvinotoolkit/model_server/blob/main/client/python/ovmsclient/lib/docs/README.md</a></p><p>This is the first release of the client library. It will evolve over time, but is already capable of running predictions with OpenVINO™ Model Server and TensorFlow Serving with just a minimal Python package. Have questions or suggestions? Please open an issue on GitHub.</p><p><strong>Notices and Disclaimers</strong></p><p>Performance varies by use, configuration and other factors. Learn more at <a href="https://edc.intel.com/content/www/us/en/products/performance/benchmarks/overview/">www.intel.com/PerformanceIndex</a>.</p><p>Intel technologies may require enabled hardware, software or service activation.<br>Intel does not control or audit third-party data. You should consult other sources to evaluate accuracy.<br>Intel disclaims all express and implied warranties, including without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising from course of performance, course of dealing, or usage in trade.</p><p>© Intel Corporation. Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries. Other names and brands may be claimed as the property of others.</p><p><em>This post was originally published on </em><a href="https://community.intel.com/t5/Blogs/Tech-Innovation/Artificial-Intelligence-AI/Simplified-Deployments-with-OpenVINO-Model-Server-and-TensorFlow/post/1353218"><em>Intel.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=849d2dd7fdbc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>