<?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 Gopalakrishna Adusumilli on Medium]]></title>
        <description><![CDATA[Stories by Gopalakrishna Adusumilli on Medium]]></description>
        <link>https://medium.com/@gkadusumilli?source=rss-a19487c85edb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*kOK-xP6uLwNGJmYOXKxEYw.jpeg</url>
            <title>Stories by Gopalakrishna Adusumilli on Medium</title>
            <link>https://medium.com/@gkadusumilli?source=rss-a19487c85edb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 22:58:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gkadusumilli/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[Time, Space, Memory and Brain-Body Rhythms ( My interpreatation of paper)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@gkadusumilli/time-space-memory-and-brain-body-rhythms-my-interpreatation-of-paper-28cfc937dbc0?source=rss-a19487c85edb------2"><img src="https://cdn-images-1.medium.com/max/1200/1*HFNufHu1jpxnq7Z901qdZw.jpeg" width="1200"></a></p><p class="medium-feed-snippet">Brain don&#x2019;t have a built-in clock, but instead creates sense of time by tracking changes in our body&#x2019;s natural rhythm and the order&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@gkadusumilli/time-space-memory-and-brain-body-rhythms-my-interpreatation-of-paper-28cfc937dbc0?source=rss-a19487c85edb------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@gkadusumilli/time-space-memory-and-brain-body-rhythms-my-interpreatation-of-paper-28cfc937dbc0?source=rss-a19487c85edb------2</link>
            <guid isPermaLink="false">https://medium.com/p/28cfc937dbc0</guid>
            <dc:creator><![CDATA[Gopalakrishna Adusumilli]]></dc:creator>
            <pubDate>Wed, 26 Nov 2025 15:59:22 GMT</pubDate>
            <atom:updated>2025-11-26T15:59:22.216Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Important Python Snippets for Image Processing]]></title>
            <link>https://python.plainenglish.io/important-python-snippets-for-image-processing-b284afb9cb4e?source=rss-a19487c85edb------2</link>
            <guid isPermaLink="false">https://medium.com/p/b284afb9cb4e</guid>
            <category><![CDATA[image-processing]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[opencv-python]]></category>
            <dc:creator><![CDATA[Gopalakrishna Adusumilli]]></dc:creator>
            <pubDate>Tue, 02 Nov 2021 02:55:57 GMT</pubDate>
            <atom:updated>2021-11-08T06:13:07.288Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rLMeGmsZ85iPKQJmyEZZ9Q.jpeg" /><figcaption>Image by author</figcaption></figure><p>Images &amp; Videos data that we handle in day-to-day activities. Need not to be an engineer working in computer vision and Image processing-related activities. Most of the time, we use some basic image processing concepts for social media posts.</p><p>For basic tasks we upload the data to third-party software to perform operations like Converting JPG to PNG format, exporting images to a video, etc., and end up having results with software watermark and other limitations.<br>Do you know, some of these tasks will complete using one or two lines in python. Sounds exciting! Let’s go through a few in this article.</p><p>I have written a blog post to myself, with important python snippets that I come across day to day activities while working with images &amp; Video data to reduce spending time on the internet to find functions that are needed often</p><p>Hope you find the article useful.</p><ul><li><strong>No overload of Python packages for different tasks</strong>: The majority of the python snippets written for this article, uses OpenCV, Moviepy (for specific tasks), and Numerical computation library</li><li><strong>Compatible to process many images in a go</strong>: The Python snippets written in this article works at a folder level that has many images. Instead of processing one image at a time. This <strong><em>saves time </em></strong>to avoid searching on the internet to extend the basic functions to operate on multiple images</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6d7650e5bc6840d3ad6970d9370ed08c/href">https://medium.com/media/6d7650e5bc6840d3ad6970d9370ed08c/href</a></iframe><ul><li><strong>Image format conversion: </strong>This snippet can be used to convert the image file extensions from one format to other formats.</li></ul><p>Ex: Convert images in a folder to .jpg and save the images in a new folder:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b57ba98b557503939063f54f05bdee4e/href">https://medium.com/media/b57ba98b557503939063f54f05bdee4e/href</a></iframe><ul><li><strong>Image resizing: </strong>Resize the images in a folder to the required image dimensions.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4b49270e33f9586b483af82691a65d8e/href">https://medium.com/media/4b49270e33f9586b483af82691a65d8e/href</a></iframe><ul><li><strong>Image stacking: </strong>Joining images vertically or horizontally.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a78bf80d8ca6b6dfd532a44cdf39b6a4/href">https://medium.com/media/a78bf80d8ca6b6dfd532a44cdf39b6a4/href</a></iframe><ul><li><strong>RGB to Grayscale: </strong>Converts images from the source folder to Grayscale.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9da104dfcb2bd1257a634b3128a4ccbf/href">https://medium.com/media/9da104dfcb2bd1257a634b3128a4ccbf/href</a></iframe><ul><li><strong>Images to Video: </strong>Export the images in a folder to video.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/19f76e335f42ef1d3156cf73c803e404/href">https://medium.com/media/19f76e335f42ef1d3156cf73c803e404/href</a></iframe><ul><li><strong>Image to PDF: </strong>Exports all images in a folder to PDF.</li></ul><p><em>Note: Need to install the img2pdf package.</em></p><p>To install the package Open cmd and type pip install img2pdf</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b99605f318a3ac3647512b4746df3e4c/href">https://medium.com/media/b99605f318a3ac3647512b4746df3e4c/href</a></iframe><ul><li><strong>Frame extraction from the video:</strong></li></ul><p>Extracting frames from the video.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4b6a47475e3c5758f7a8d54cb41ed773/href">https://medium.com/media/4b6a47475e3c5758f7a8d54cb41ed773/href</a></iframe><ul><li><strong>Clip (Split) video:</strong></li></ul><p>The below Python snippet allows to crop the video, provided start and end timestamps of the video to be cropped and save in the required format.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cb45325621bc9f99024db01574acfda8/href">https://medium.com/media/cb45325621bc9f99024db01574acfda8/href</a></iframe><ul><li><strong>Merge videos: </strong>Join two or mode videos one after the other and save the merged video.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/af1eb8d92561c3f9b61b4b98d302c33f/href">https://medium.com/media/af1eb8d92561c3f9b61b4b98d302c33f/href</a></iframe><ul><li><strong>Extract audio from video</strong></li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6e3bf96ef736413ed094f53e4d873db6/href">https://medium.com/media/6e3bf96ef736413ed094f53e4d873db6/href</a></iframe><ul><li><strong>Video stacking Side by side: </strong>The Python snippet stack the two videos side by side in a window either horizontally (next to each other) or vertically (one below the other). Such that both videos can be played.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2cb4173e9542da0c463ce7a55f25e759/href">https://medium.com/media/2cb4173e9542da0c463ce7a55f25e759/href</a></iframe><p>References:</p><ul><li><a href="https://opencv.org/">OpenCV - Open Computer Vision Library</a></li><li><a href="https://zulko.github.io/moviepy/">User Guide - MoviePy 1.0.2 documentation</a></li></ul><p><em>More content at </em><a href="http://plainenglish.io/"><em>plainenglish.io</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b284afb9cb4e" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/important-python-snippets-for-image-processing-b284afb9cb4e">Important Python Snippets for Image Processing</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LiDAR and its capability in self-driving vehicles]]></title>
            <link>https://medium.com/data-science/lidar-and-its-capability-in-self-driving-vehicles-1514eb8365ca?source=rss-a19487c85edb------2</link>
            <guid isPermaLink="false">https://medium.com/p/1514eb8365ca</guid>
            <category><![CDATA[self-driving-cars]]></category>
            <category><![CDATA[lidar]]></category>
            <dc:creator><![CDATA[Gopalakrishna Adusumilli]]></dc:creator>
            <pubDate>Wed, 28 Apr 2021 13:32:40 GMT</pubDate>
            <atom:updated>2021-04-29T04:15:46.644Z</atom:updated>
            <content:encoded><![CDATA[<h4>In this article, we will understand the LiDAR and its principle, Components of LiDAR, Terminology used in LiDAR, Comparison of LiDAR with the other sensors</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2CMTOag_NpIrrLeiTfCVZA.jpeg" /><figcaption>Credit: Scott blake, <a href="https://unsplash.com/s/photos/lidar">unsplash.com</a></figcaption></figure><p>In this article, we will understand the LiDAR and its principle, Components of LiDAR, Terminology used in LiDAR, Comparison of LiDAR with the other sensors</p><h3>LiDAR — <strong>L</strong>ight Detection and Ranging</h3><p>The acronym of LiDAR is <strong>Li</strong>ght <strong>D</strong>etection and <strong>R</strong>anging</p><h4>Types of LiDAR</h4><ol><li><strong>Topographic LiDAR — </strong>Maps the land using near IR (Infra-Red) light.</li><li><strong>Bathymetric LiDAR — </strong>uses water-penetrating green light to measure seafloor and riverbed elevations.</li><li><strong>Terrestrial Lidar — </strong>mapping buildings, natural features, trees at ground level.</li></ol><h4>Working principle of Lidar</h4><p>We will understand how lidar measures distance and generates 3D point cloud information of the surrounding environment.</p><ul><li>Laser pulses travel in all direction till the pulse strikes an object/obstacle</li><li>On striking to object, the pulses are reflected in the LiDAR system</li><li>LiDAR registers this echo pulse</li><li>The system calculates the distance of the object as explained below</li></ul><ol><li><strong>Time-of-flight: Distance measurement</strong></li></ol><p>The main components in ranging LiDAR (1D LiDAR) are a <strong>laser</strong>, <strong>photodetector</strong>, and <strong>a calibrated stopwatch</strong>.</p><p>Laser light: Transmits the laser pulses to the surrounding environment, these pulses scatter and some of the laser pulses bounce back to the lidar</p><p>Photodetector: Captures the reflected laser pulses</p><p>Stopwatch: Calculates the time taken from transmitting the pulse to returning the pulse, this transit is called <strong>round-trip-time.</strong></p><p>Round-trip-time (r) is calculated as:</p><pre><strong>r = 1/2* c * t</strong></pre><pre>r - round trip time, c- velocity of the light, t - transmitting time</pre><p><em>1/2 in the equation indicates the distance between the lidar sensor and the object is half of the round distance this is termed as </em><strong><em>time-of-flight ranging</em></strong></p><p><strong>2. Point cloud data: 3D information</strong></p><p>Each reflected laser light pulses are mapped as a point (specifically a data point). Each data point contains 3 values representing X, Y, Z coordinates, and other attributes such as the intensity of the reflected pulse, rotation, etc. A collection of such data points is called <strong>Point cloud data</strong>.</p><p>The X, Y, Z coordinate of each return is calculated using the location and orientation of the scanner (from the GPS and IMU), the angle of the scan mirror, and the range distance</p><p>The raw point cloud data can be used to create a 3D mesh and models using point cloud processing software/library.</p><h3>How LiDAR data is used in autonomous vehicles</h3><p>As said, LiDAR data receive millions of point cloud data. This data is aggregated to identify the objects.</p><h4>Clustering</h4><p>All the point clouds are overlaid, giving the object a recognizable shape.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*j8Nv3d--VHKi0Be8HujrQA.png" /><figcaption>Fig 1: Raw point cloud data, Courtesy: <a href="http://www.cvlibs.net/datasets/kitti/raw_data.php">KITTI dataset</a></figcaption></figure><p>The close cluster of point clouds provides a recognizable shape</p><h4>Classification/detection</h4><p>The clusters are then classified into different classes — i.e Pedestrian, car, and other classes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dLOztRDbQ57BS5EUNdBdVQ.jpeg" /><figcaption>3D object detection on point cloud data, courtesy: <a href="http://www.cvlibs.net/datasets/kitti/raw_data.php">KITTI dataset</a></figcaption></figure><h3>Components of a LiDAR system</h3><p>LiDAR sensor has 5 components</p><h4>Laser scanner</h4><ul><li><strong>Frequency:</strong></li></ul><p>Ranges between 50,000 to 200,000 pulses per second (Hz)</p><ul><li><strong>Wavelength:</strong></li></ul><blockquote>Infrared (1500–2000 nm) for meteorology</blockquote><blockquote>near-infrared (1040–1060 nm) for terrestrial mapping</blockquote><blockquote>blue-green (500–600 nm) for bathymetry</blockquote><blockquote>ultraviolet (250 nm) for metereology</blockquote><h4>Scanner</h4><ul><li>Mirror project laser pulses to the surface</li><li>It measures the angle at which each pulse was fired</li><li>Receives the reflected pulse from the surface</li></ul><h4>Global positioning system (GPS)</h4><ul><li>Records the x, y, z location of the scanner</li></ul><h4>Inertial measurement unit (IMU)</h4><ul><li>Measures the angular orientation of the scanner relative to the ground (pitch, roll, yaw)</li></ul><h4>Clock</h4><ul><li>Records the time the laser pulse leaves and returns to the scanner</li></ul><h3>LiDAR terminology</h3><p>We should understand the parameters and their definition to understand more about the sensor.</p><p>Let’s try to know some common terms</p><h4>Repetition rate (f_rep)</h4><p>Rate at which laser emitting the pulses and it will be measured in kilohertz (kHz). This information will be provided by the LiDAR manufacturers.</p><p>If the manufacturer specifies sensor operates at 150 kHz, this means LiDAR pulse at 150,000 times per second and at the same time has a receiving capacity of 150,000 reflected pulses.</p><h4>Scan frequency</h4><p>Scan frequency shows how many rotations per second, i.e how fast the LiDAR scanner moves.</p><p>While the Laser emits pulses, the scanner in the device reflects these pulses to the surrounding environment.</p><h4>Scan angle</h4><p>This is measured in degrees and is the distance that the scanner moves from one end to another. Scan angle also indicates how accurate the lidar can be on its spinning range. The smaller the angle, the higher the quality of the generated map will be.</p><h4>Cross-track resolution</h4><p>Spacing of the pulses from the LiDAR systems in the scanning direction.</p><h4>Intensity</h4><ul><li>Strength of return varies with the composition of the surface object reflecting the return</li><li>Reflective percentages are referred to as LiDAR intensity</li></ul><h3>Comparison of Camera, RADAR, and LiDAR</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/91752787014781c303c8f83b6bae4f9c/href">https://medium.com/media/91752787014781c303c8f83b6bae4f9c/href</a></iframe><h3>LiDAR reflectivity examples</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/46c9aa61db5cda49b6695506ded2aa76/href">https://medium.com/media/46c9aa61db5cda49b6695506ded2aa76/href</a></iframe><h3>LiDAR public datasets for automotive use cases</h3><ol><li><a href="https://waymo.com/open/">Waymo open dataset</a></li><li><a href="https://www.nuscenes.org/">nuScenes by Aptiv</a></li><li><a href="http://apolloscape.auto/">Baidu Apollo scape</a></li><li><a href="http://www.cvlibs.net/datasets/kitti/raw_data.php">KITTI Vision Benchmark suite</a></li></ol><p>Thanks for going through the article, Do let me know your thoughts in the comments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1514eb8365ca" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/lidar-and-its-capability-in-self-driving-vehicles-1514eb8365ca">LiDAR and its capability in self-driving vehicles</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[End to End Text Recognition Model Deployment on CPU, GPU, and VPU With OpenVINO]]></title>
            <link>https://medium.com/swlh/end-to-end-text-recognition-model-deployment-on-cpu-gpu-and-vpu-with-openvino-cb727114c5a9?source=rss-a19487c85edb------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb727114c5a9</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[openvino]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Gopalakrishna Adusumilli]]></dc:creator>
            <pubDate>Mon, 12 Oct 2020 02:43:40 GMT</pubDate>
            <atom:updated>2020-10-14T16:31:42.681Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*BR7YJBLEXeXvt49BSjmj8A.png" /><figcaption>Text detection and text recognition result. <a href="https://talks.navixy.com/reviews/deep-learning-in-telematics/">Image credits</a></figcaption></figure><p>Hello everyone,</p><p>In this post, I will walk you through all the steps of installing OpenVINO along with its dependencies, and then running a text recognition model on the edge using Intel CPU, integrated GPU(iGPU), and VPU.</p><blockquote><strong>What is special about this article?</strong></blockquote><blockquote>* Consolidated guide to aid in inferencing pre-trained models of Intel OpenVINO model zoo.</blockquote><blockquote>* Addressing possible errors associated with OpenVINO toolkit installation and inferencing.</blockquote><blockquote>* Deploying the pre-trained model across Intel devices like CPU, GPU, and VPU.</blockquote><p>Let’s get started:</p><p>Before going to the details of how to deploy a text detection and recognition pipeline on the edge. let me share some brief info on OpenVINO and its workflow.</p><h3>A quick intro to OpenVINO Toolkit</h3><p>OpenVINO toolkit stands for Open Visual Inference and Neural Network Optimization. The toolkit addresses two key aspects, which are <strong>Model Optimization</strong> and <strong>Inferencing</strong>.</p><p>Most of the deep learning models are always trained on powerful deep learning accelerators. But when it comes to real-time deployments, one may have to deploy them on low compute devices and at the edge or on on-prem servers, rather than deploying them on the cloud.</p><p>This can be addressed with the help of the OpenVINO toolkit to be able to deploy at the edge. Let’s understand the workflow details of deployment in the three steps mentioned below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d5QvKtoCgdZbjKhSvX9KKw.png" /><figcaption>OpenVINO Workflow</figcaption></figure><ol><li><strong>Train a Model</strong></li></ol><ul><li>Train your model using any of the popular Machine learning frameworks, that are available out there. (In this article, we shall skip the training part by taking a pre-trained model from the model zoo)</li><li>OpenVINO supports models trained on frameworks such as TensorFlow, Caffe, MXNet, Kaldi, and ONNX.</li><li>You can download a pre-trained model from the <a href="https://github.com/openvinotoolkit/open_model_zoo/tree/master/demos">Open Model Zoo</a>. I am selecting the text recognition and detection models, for this article.</li></ul><p><strong>2. Model Optimizer</strong></p><ul><li>Model Optimizer converts the trained model to an Intermediate representation (IR) by removing the redundant layers and function that is not required post model freezing</li><li>The imported models are converted into Intermediate Representation (IR) files (.XML and .bin) files.</li></ul><pre>1. *.xml - Describes the network topology<br>2. *.bin - Contains the weights (&amp; biases) binary data</pre><ul><li>As I am downloading a pre-trained model from the model zoo, I already have XML and BIN files. In my subsequent article will discuss how to generate IR files for custom models. (Stay tuned :))</li></ul><p><strong>3. Inference engine</strong></p><p>The inferencing engine runs on the IR files (.xml and .bin) obtained from step-2 or Intel pre-trained models available in IR format.</p><p>The inference engine is focused on Hardware optimizations to improve the model further</p><p>Inference Engine supports all Intel-based hardware</p><ul><li>CPU (Central Processing Unit)</li><li>GPU (Graphical Processing Unit)</li><li>VPU (Visual Processing Unit) like Intel Neural Compute Stick 2 (NCS 2)</li><li>FPGA (Field Programmable Gate Array).</li></ul><p>Hope you’ve got a brief intro about the OpenVINO for more details you can find the OpenVINO documentation <a href="https://docs.openvinotoolkit.org/latest/index.html">here</a></p><p>Let’s start with the implementation…</p><h3>Step 1: OpenVINO installation on Windows OS</h3><p><strong>Download (~193 MB)</strong></p><ol><li>To download the OpenVINO toolkit, the user has to register with the <a href="https://software.intel.com/content/www/us/en/develop/tools/openvino-toolkit/download.html">link here</a></li></ol><ul><li>Choose the OS (Windows)&gt; Select distribution (web download) &gt; Installer type (offline) &gt; click (Register and download).</li><li>Choose Windows OS (radio button) &gt; Fill the details</li><li>You’ll receive an e-mail with the URL to download.</li></ul><h4><strong>Installation</strong></h4><p><strong>OpenVINO installation</strong></p><p>Following the above steps, the .exe file of the OpenVINO toolkit will be downloaded to your local windows machine in the <em>downloads</em> folder (default)</p><p>Installation of the toolkit is easy it is similar to any other software installation. During the installation procedure, you may notice that other dependencies are required since OpenVINO needs dependencies such as Microsoft VS2017, CMake, Python 3.6 or greater we will install soon</p><p><strong>Microsoft VS2017 installation</strong></p><p>OpenVINO needs Microsoft VS2017 to build C++ based pre-trained models</p><p>MSVC 2017 installer can be downloaded from <a href="https://visualstudio.microsoft.com/vs/older-downloads/">here</a>. Choose the Community version since it is free for students, researchers, and developers.</p><p>The vs_community.exe installer will be saved in the Downloads folder (default) and then install the software.</p><p>Navigate to Visual Studio Installer &gt; Choose “Visual Studio Community” &gt; Modify &gt; In the tab “Workloads” &gt; choose “Desktop development with C++” &gt; Install while downloading (bottom left side).</p><p>PS. Couldn’t check the file size since I’ve kept it for download just before my bedtime😳</p><p><strong>CMake (~25.2 MB)</strong></p><ul><li>CMake can be downloaded from <a href="https://cmake.org/download/"><em>here</em></a></li><li>Choose Windows win64-x64 Installer (.msi)</li></ul><blockquote>Note: During installation select “Add CMake to the System Path”</blockquote><p><strong>Python (~ 25 MB)</strong></p><ul><li>Python IDLE can be downloaded from the Python site <a href="https://www.python.org/downloads/windows/">here</a></li><li>Choose the python version ((preferably 3.6 or greater) and OS and download the executable installer</li><li>Follow the installation instructions</li></ul><p>Note: Choose “Add Python 3.x to the PATH”</p><p>Hurray..! We have successfully completed the OpenVINO installation.</p><h3>Step 2: OpenVINO configuration for Model deployment and Inferencing</h3><p>Open command prompt (cmd)</p><ol><li>Setup the environment variables to run the demo</li></ol><pre>cd C:\Program Files (x86)\Intel\openvino_2021.1.110\bin\</pre><pre>setupvars.bat</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*9lSu9Q2zvyI25IPtT1v3ew.png" /><figcaption>Setting up environment variables</figcaption></figure><blockquote>You will have to intialize the environment for every fresh session</blockquote><p>2. We need to build the demo applications for Windows OS</p><p>The open model zoo contains some pre-trained models like pose estimation, object detection, speech recognition, face recognition, etc.</p><p>you can check the available pre-trained models in the OpenVINO model zoo</p><pre><a href="https://github.com/openvinotoolkit/open_model_zoo/tree/master/demos">https://github.com/openvinotoolkit/open_model_zoo/tree/master/demos</a></pre><p>This step builds all the demo .cpp files. The build files are stored in the below-mentioned directory</p><p>Pre-trained model C++ files are available in the below directory</p><pre>cd C:\Program Files (x86)\Intel\openvino_2021.1.110\deployment_tools\open_model_zoo\demos</pre><p>Type the below command to build .cpp files of a pre-trained model using Microsoft Visual Studio 2017</p><pre>build_demos_msvc.bat VS2017</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K1o9AqKGdZS_o943TiObxw.png" /><figcaption>Build MSVS 2017</figcaption></figure><p>You can check all the build files in the below directory</p><pre>Documents\Intel\OpenVINO\omz_demos_build\intel64\Release</pre><p>You can tinker with all the demo applications available in a model zoo.</p><p>3. Last step, we need to add the OpenCV debug and compile files to the build directory, OpenCV comes with OpenVINO installation.</p><p>The OpenCV is needed for the image processing task so we need to add the OpenCV bin folder to the model build directory</p><p>OpenCV bin files can be located in</p><pre>C:\Program Files (x86)\Intel\openvino_2021.1.110\opencv\bin</pre><p>Copy the .dll files from the above folder to the below-mentioned directory path</p><pre>C:\Users\gk129\Documents\Intel\OpenVINO\omz_demos_build\intel64\Release</pre><h3>Step3: Text detection and recognition model</h3><h4>Fetching the model</h4><p>As mentioned earlier We will not get into the nitty-gritty of model development of the Text recognition pipeline. Instead, we will use the Intermediate representation (IR) files from the model zoo to run the text recognition model</p><p>Downloading the intermediate representation model files (.xml &amp; .bin) for both the text detection and text recognition models</p><ol><li>IR files for text detection can be obtained from here:</li></ol><p>For latest version of OpenVINO 2021 IR files (.bin &amp; .XML )can be obtained here (download both the files)</p><p>IR files for text detection</p><pre><a href="https://download.01.org/opencv/2021/openvinotoolkit/2021.1/open_model_zoo/models_bin/1/text-detection-0003/FP16/">https://download.01.org/opencv/2021/openvinotoolkit/2021.1/open_model_zoo/models_bin/1/text-detection-0003/FP16/</a></pre><p>IR files for text recognition</p><pre><a href="https://download.01.org/opencv/2021/openvinotoolkit/2021.1/open_model_zoo/models_bin/1/text-recognition-0012/FP16/">https://download.01.org/opencv/2021/openvinotoolkit/2021.1/open_model_zoo/models_bin/1/text-recognition-0012/FP16/</a></pre><blockquote>Note: Here we are using FP16, A half-precision floating point numbers (FP16) have a smaller range. FP16 can result in better performance where half-precision is enough. (more details check <a href="https://software.intel.com/content/www/us/en/develop/articles/should-i-choose-fp16-or-fp32-for-my-deep-learning-model.html">here</a>)</blockquote><p>2. Save all the .bin &amp; .XML files of both the text detection and recognition model in the folder(your choice). We need these to parse the address of these files to the text detection build model.</p><h4>Running the model</h4><p>Open a command prompt</p><pre>cd C:\xxx\Documents\Intel\OpenVINO\omz_demos_build\intel64\Release</pre><p>Then we will use the Text_detection_demo build file and check all the arguments required as an input</p><pre>text_detection_demo.exe -h</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S4ka95dXVPjOpITcxQbACA.png" /></figure><ul><li>h indicates the arguments for the model</li></ul><p><strong>Deployment on the Edge: CPU</strong></p><p>To run the text recognition model on the intel powered CPU</p><p>type the following command in the above command prompt</p><blockquote>Note: parse the address of .xml file of text detection and text recognition</blockquote><ul><li>i &gt; “Path to the image file”,</li><li>-m_tr &gt; .XML file of text recognition model,</li><li>-m_td &gt; .XML file of text detection model,</li><li>Target devices (-d_tr, -d_td) choose CPU</li></ul><pre>text_detection_demo.exe -i C:\xxx\xxx\test.jpg -m_tr &quot;C:\xxx\xxx\xxx\text-recognition-0012.xml&quot; -m_td &quot;C:\xxx\xxx\xxx\\text-detection-0003.xml&quot; -d_tr CPU -d_td CPU</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QoOb3yBp4sl2Z1ks9fVbwA.png" /><figcaption>Running the model on the edge: CPU</figcaption></figure><p><strong>Deployment on the VPU: Intel Neural Compute Stick 2(NCS2)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/336/1*OOU2tbdWsWuKomtZrDlW4A.jpeg" /><figcaption>Intel Neural Compute stick (Image credits: <a href="http://software.intel.com/">Intel </a>)</figcaption></figure><p>The Intel Neural Stick 2 is a powerful Plug and Play tiny USB based Virtual Processing Unit for AI model Inferencing and rapid prototyping. The NCS2 can be integrated with SBC like Raspberry Pi and with other embedded boards.</p><p>If you would like to know more details about NCS2 you can check <a href="https://movidius.github.io/blog/">here</a>.</p><p>To deploy on the Intel NCS 2, all the procedure remains till the step <strong>running the model</strong></p><p>Choose Target devices (-d_tr, -d_td)as MYRIAD</p><pre>text_detection_demo.exe -i C:\xxx\xxx\test.jpg -m_tr &quot;C:\xxx\xxx\xxx\text-recognition-0012.xml&quot; -m_td &quot;C:\xxx\xxx\xxx\text-detection-0003.xml&quot; -d_tr MYRIAD -d_td MYRIAD</pre><p><strong>Deployment on the GPU (Intel integrated GPU)</strong></p><p>Intel CPU comes with the Integrated standard GPU onboard, we can utilize iGPU for the deployment with the following command</p><pre>text_detection_demo.exe -i C:\xxx\xxx\test.jpg -m_tr &quot;C:\xxx\xxx\xxx\text-recognition-0012.xml&quot; -m_td &quot;C:\xxx\xxx\xxx\\text-detection-0003.xml&quot; -d_tr GPU -d_td GPU</pre><h4>Output</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*XsQXgQNtuaiR2JsdxfMiEg.png" /><figcaption>Text Recognition pipeline results</figcaption></figure><h4>Hurray!!! We have completed…</h4><p>Let’s get connected on <a href="https://www.linkedin.com/in/gkadusumilli">LinkedIn</a></p><p><strong>References:</strong></p><ol><li><a href="https://docs.openvinotoolkit.org/latest/index.html">OpenVINO documentation</a></li><li><a href="https://docs.microsoft.com/en-us/cpp/build/reference/compiler-options">MSVC compiler</a> documentation</li><li>Git repo of <a href="https://docs.openvinotoolkit.org/2019_R1/_docs_Pre_Trained_Models.html">OpenViNO Model zoo</a></li><li><a href="https://www.intel.com/content/dam/support/us/en/documents/boardsandkits/neural-compute-sticks/NCS2_Product-Brief-English.pdf">Intel NCS2 guide</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb727114c5a9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/end-to-end-text-recognition-model-deployment-on-cpu-gpu-and-vpu-with-openvino-cb727114c5a9">End to End Text Recognition Model Deployment on CPU, GPU, and VPU With OpenVINO</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LiDAR point cloud based 3D object detection implementation with colab{Part 2 of 2}]]></title>
            <link>https://medium.com/data-science/lidar-point-cloud-based-3d-object-detection-implementation-with-colab-part-2-of-2-f3ad55c3f38c?source=rss-a19487c85edb------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3ad55c3f38c</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Gopalakrishna Adusumilli]]></dc:creator>
            <pubDate>Sun, 13 Sep 2020 16:47:07 GMT</pubDate>
            <atom:updated>2020-09-18T07:21:26.353Z</atom:updated>
            <content:encoded><![CDATA[<p>VoxelNet a point cloud based 3D object detection algorithm is implemented using google colab.</p><p>In my previous article, I have explained crucial concepts required to implement the VoxelNet an end-to-end learning model for the 3d object detection you can find here</p><p>In continuation with the <a href="https://medium.com/@gkadusumilli/lidar-point-cloud-based-3d-object-detection-implementation-with-colab-part-1-of-2-e3999ea8fdd4">previous article</a>, we will work out to implement the VoxelNet algorithm for the 3d object detection using KITTI point cloud data</p><p><strong>Step 1: Processing the KITTI dataset to train the model[Detailed steps]</strong></p><p>The following steps are crucial to prepare the data to train the model. KITTI dataset needs to be downloaded, cropped, processed, and save in the drive.</p><p>login to <a href="https://colab.research.google.com/">google colab</a>, Open a notebook, GPU is not required at the moment.</p><blockquote>Note: in case if GPU is selected, note that each user is provided with ~30GB of virtual space and the entire dataset has a size of ~40+ GB and then to unzip dataset memory will run out. In the next steps we will download the KITTI datset, process, crop and create .zip and move to the drive to use the data for future</blockquote><ul><li>Required dataset</li></ul><ol><li>Velodyne point clouds (29 GB): input data to VoxelNet</li></ol><p>2. Training labels of the object data set (5 MB): input label to VoxelNet</p><p>3. Camera calibration matrices of the object data set (16 MB): for visualization of predictions</p><p>4. Left color images of the object data set (12 GB): for visualization of predictions</p><pre>#clone the voxelnet git repo<br>!git clone <a href="https://github.com/gkadusumilli/Voxelnet.git">https://github.com/gkadusumilli/Voxelnet.git</a><br>#change the cwd<br>%cd /content/drive/My Drive/Voxelnet/crop_data</pre><ul><li>To download the datasets (.zip) directly to the colab virtual machine [~ 15–20 mins]</li></ul><pre>#Data label file<br>!wget (enter the link)</pre><pre>#Calib file<br>!wget (enter the link )</pre><pre>#Velodyne file<br>!wget (enter the link)</pre><pre># Image file<br>!wget (enter the link)</pre><ul><li>Unzip the datasets(.zip) to the folder (~20- 30 mins)</li></ul><pre>#Unzip the velodyne training folder<br>!unzip /content/Voxelnet/crop_data/data_object_velodyne.zip &#39;training/*&#39; -d /content/Voxelnet/crop_data</pre><pre>#Unzip the image training folder<br>!unzip /content/Voxelnet/crop_data/data_object_image_2.zip &#39;training/*&#39; -d /content/Voxelnet/crop_data</pre><pre>#unzip the object label<br>!unzip /content/Voxelnet/crop_data/data_object_label_2.zip</pre><pre>#unzip the data object calib<br>!unzip /content/Voxelnet/crop_data/data_object_calib.zip &#39;training/*&#39; -d /content/Voxelnet/crop_data</pre><ul><li>cropping point cloud data for training and validation. Point clouds outside the image coordinates are removed. cropped point cloud will overwrite the existing raw point cloud [40–45 mins]</li></ul><pre>#to run the &#39;crop.py&#39; lower version of scipy is needed<br>!pip install scipy==1.1.0</pre><pre>#run crop.py<br>!python crop.py</pre><ul><li>Create the validation data to evaluate the model[~10–15 mins]</li></ul><pre>#create a folder &#39;validation&#39; and copy the content in training #folder</pre><pre>!mkdir /content/Voxelnet/crop_data/validation</pre><pre>%cp -av /content/Voxelnet/crop_data/training /content/Voxelnet/crop_data/validation/</pre><ul><li>we will split the training as per the protocols <a href="https://xiaozhichen.github.io/files/mv3d/imagesets.tar.gz">here</a> [2–3 mins]</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f5e7eccffdb14ef0d52d9c3d227017c3/href">https://medium.com/media/f5e7eccffdb14ef0d52d9c3d227017c3/href</a></iframe><p>Final step…</p><ul><li>create .zip the folder of the processed, cropped data [30–40mins]</li></ul><pre>!zip -r /content/VoxelNet/data/data_lidar.zip /content/VoxelNet/crop_data</pre><ul><li>Move the .zip folder to the drive [~5 mins]</li></ul><pre>#rename the folder as you need in the drive, I&#39;ve stored in dtive with the folder named &#39;AI&#39;</pre><pre>!mv &quot;/content/VoxelNet/data/data_lidar.zip&quot; &quot;/content/gdrive/My Drive/AI&quot;</pre><blockquote>Here is the <a href="https://github.com/gkadusumilli/Voxelnet/blob/master/VoxelNet_data_creation.ipynb">link</a> to the colab jupyter notebook with all the above-mentioned steps.</blockquote><h4>Step 2: Training the model</h4><ul><li>log in to <a href="https://colab.research.google.com/">google colab</a> , create a new notebook</li><li>To access the GPU: Click on <strong>runtime &gt; Change runtime type &gt; GPU</strong></li></ul><blockquote>Note: The colab GPU runtime is approximate ~12 hours post that, the runtime will be disconnected, the data stored will be lost. Since in our case each epoch would take ~2 hours and need to train for more than 20 epochs to observe the preliminary results. So will use google drive as a path to store the code, checkpoints, prediction results, and so on</blockquote><ul><li>Change the current working directory(CWD) to drive</li></ul><pre>#voxelnet is the folder name, you can rename as you need<br>%cd /content/drive/My Drive/Voxelnet</pre><ul><li>VoxelNet implementation needs several dependencies. So we will clone the entire repository.</li></ul><pre>!git clone <a href="https://github.com/gkadusumilli/Voxelnet.git">https://github.com/gkadusumilli/Voxelnet.git</a></pre><ul><li>Building the files</li></ul><pre>%cd /content/drive/My Drive/Voxelnet</pre><pre>!python setup.py build_ext --inplace</pre><ul><li>Unzip the processed dataset in the crop_data folder [35–40 mins]</li></ul><pre>%cd /content/drive/My Drive/Voxelnet/crop_data</pre><pre>#Locate the zip folder in the drive and unzip using !unzip command<br>!unzip &quot;/content/drive/My Drive/AI/data_lidar.zip&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/312/1*XhgowBuyJ9H3SXXa2OLxwQ.png" /><figcaption>data folder structure</figcaption></figure><ul><li>Training the model</li></ul><pre>%cd /content/drive/My Drive/Voxelnet/</pre><p>Important argument parse</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/28df2b3d51987afae53a5b5e66a86359/href">https://medium.com/media/28df2b3d51987afae53a5b5e66a86359/href</a></iframe><pre>!python train.py \</pre><pre>--strategy=&quot;all&quot; \</pre><pre>--n_epochs=16 \</pre><pre>--batch_size=2 \</pre><pre>--learning_rate=0.001 \</pre><pre>--small_addon_for_BCE=1e-6 \</pre><pre>--max_gradient_norm=5 \</pre><pre>--alpha_bce=1.5 \</pre><pre>--beta_bce=1 \</pre><pre>--huber_delta=3 \</pre><pre>#if dump_vis == yes, boolean to save visualization results<br>--dump_vis=&quot;no&quot; \</pre><pre>--data_root_dir=&quot;/content/drive/My Drive/Voxelnet/crop_data&quot; \</pre><pre>--model_dir=&quot;model&quot; \</pre><pre>--model_name=&quot;model6&quot; \</pre><pre>--dump_test_interval=3 \</pre><pre>--summary_interval=2 \</pre><pre>--summary_val_interval=40 \</pre><pre>--summary_flush_interval=20 \</pre><pre>--ckpt_max_keep=10 \</pre><h4>Visualizing the log dir with the tensorboard</h4><pre>%load_ext tensorboard</pre><pre>#summary_logdir is the logdir name<br>%tensorboard --logdir summary_logdir</pre><p>The below snap is the logdir results @ epoch6</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2RvxEuVkXIUFxokcIhQXPg.png" /><figcaption>Tensorboard-logdir</figcaption></figure><h4>Evaluating the model</h4><pre>!python predict.py \<br>--strategy=&quot;all&quot; \<br>--batch_size=2 \<br>--dump_vis=&quot;yes&quot; \<br>--data_root_dir=&quot;../DATA_DIR/T_DATA/&quot; \<br>--dataset_to_test=&quot;validation&quot; \<br>--model_dir=&quot;model&quot; \<br>--model_name=&quot;model6&quot; \<br>--ckpt_name=&quot;&quot; \</pre><ul><li>The code to download, crop, process the KITTI dataset can be found <a href="https://github.com/gkadusumilli/Voxelnet/blob/master/VoxelNet_data_creation.ipynb">here</a></li><li>The code to implement from step 2 can be found <a href="https://github.com/gkadusumilli/Voxelnet/blob/master/VoxelNet_implementation.ipynb">here</a></li></ul><p>Here are some of the results obtained after training the model for 30 epochs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dLOztRDbQ57BS5EUNdBdVQ.jpeg" /><figcaption>All vehicles are detected</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*05-AUPeCNUuE0ptPQ9PfAQ.jpeg" /><figcaption>Two vehicles are detected</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y9wu8PgdKD6yAZP8AyGB2A.jpeg" /><figcaption>One vehicle is missed</figcaption></figure><p>Special thanks to <a href="https://github.com/tsinghua-rll">Tsinghua Robot Learning Lab</a>, <a href="https://github.com/qianguih">Qiangui Huang</a>, <a href="https://github.com/steph1793">David Stephane</a> for their valuable contribution in the implementation of VoxelNet</p><p><strong>Special thanks:</strong></p><p><strong>Dr.Uma K Mudenagudi, KLE Technological University for the project mentorship.</strong></p><p>References:</p><p>KITTI raw dataset: @ARTICLE{<a href="http://www.cvlibs.net/publications/Geiger2013IJRR.pdf">Geiger2013IJRR</a>,author = {<a href="http://www.cvlibs.net/">Andreas Geiger</a> and <a href="http://www.mrt.kit.edu/mitarbeiter_lenz.php">Philip Lenz</a> and <a href="http://www.mrt.kit.edu/mitarbeiter_stiller.php">Christoph Stiller</a> and <a href="http://ttic.uchicago.edu/~rurtasun">Raquel Urtasun</a>},title = {Vision meets Robotics: The KITTI Dataset},journal = {International Journal of Robotics Research (IJRR)},year = {2013}}</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3ad55c3f38c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/lidar-point-cloud-based-3d-object-detection-implementation-with-colab-part-2-of-2-f3ad55c3f38c">LiDAR point cloud based 3D object detection implementation with colab{Part 2 of 2}</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LiDAR point-cloud based 3D object detection implementation with colab {Part-1 of 2}]]></title>
            <link>https://medium.com/data-science/lidar-point-cloud-based-3d-object-detection-implementation-with-colab-part-1-of-2-e3999ea8fdd4?source=rss-a19487c85edb------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3999ea8fdd4</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[object-detection]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Gopalakrishna Adusumilli]]></dc:creator>
            <pubDate>Sat, 12 Sep 2020 16:32:22 GMT</pubDate>
            <atom:updated>2020-09-18T07:20:44.379Z</atom:updated>
            <content:encoded><![CDATA[<p>we will understand the concepts required to implement the VoxelNet algorithm for 3D vehicle detection using KITTI LiDAR point cloud data</p><p>Environmental perception plays an integral part while building autonomous vehicles, self-navigation robots, and other real-world applications. The sensors like camera, RADAR, and LiDAR are used to perceive the 360-view of the environment. The data obtained from the sensors is interpreted to detect static and dynamic objects like vehicles, trees, and pedestrians, etc.</p><h4><strong>The need for the 3D object detection</strong></h4><p>State-of-the-art techniques in computer vision detect the object with high accuracy on 2D data like images, video (sequence of image frames) in real-time. But using the camera sensor for activities like localization, measuring the distance between the objects, and calculating depth information may not be effective and are computationally expensive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*Bl0jbKc5FUZTaPxJPfop_Q.gif" /><figcaption>Pic credits: <a href="https://github.com/enginBozkurt/LidarObstacleDetection">engin Bozkurt </a>with KITTI point cloud viewer</figcaption></figure><p>LiDAR is one of the prominent sensors to provide the 3D information of the object in terms of the point cloud to localize the objects and characterize the shapes.</p><p>Recently, many state-of-the-art 3D object detectors like VeloFCN, 3DOP, 3D YOLO, PointNet, PointNet++, and many more were proposed for 3D object detection. But in this article, we shall discuss the <strong>VoxelNet </strong>a 3D object detection algorithm that has outperformed all of the above mentioned state-of-the-art models*.</p><h4>VoxelNet: End-to-end learning for point cloud-based 3D object detection.</h4><p>Authors: Yin Zhou, Oncel Tuzel - Apple Inc</p><p><a href="https://arxiv.org/abs/1711.06396">P</a>DF of the paper can be downloaded from here, Date of publishing: <em>17 Nov 2017</em></p><h4>Challenges addressed in VoxelNet</h4><ul><li>Replacing manual feature extraction: In the manual feature extraction, the point clouds are projected in top-view, and then apply the image-based feature extraction methods are used for the detection. But these techniques cause an information bottleneck and cannot extract the 3D information required to detect the tasks.</li></ul><p>In this paper, Feature learning network (FLN), a machine-learned feature extractor introduced to effectively extract the 3D shape information.</p><ul><li>Reducing computation and focus on memory constraints: Voxel grouping and random sampling technique is used to process the voxels containing more than a T number of points in the voxel.</li><li>End-to-end 3D detection architecture: that simultaneously learns the feature representation from the raw point cloud data and predicts accurate 3D bounding boxes in an end-to-end fashion.</li></ul><blockquote>VoxelNet in a nutshell “ Divide the point clouds into equally spaced 3D voxels, encode each voxel via stacked VFE layers into a vector, and then aggregate (combine) the local voxel features using 3D convolutional layers, transform the point cloud into high dimensional volumetric representation. Finally, the modified RPN network which intakes the volumetric representation and provides the detection result”.</blockquote><h4>VoxelNet architecture</h4><p>The VoxelNet architecture mainly contains three blocks</p><ol><li>Feature learning network</li><li>Convolutional middle layers</li><li>Region proposal network</li></ol><figure><img alt="VoxelNet architecture" src="https://cdn-images-1.medium.com/max/960/1*awNRB_nMO2n-uID1m7xwSQ.png" /><figcaption>VoxelNet architecture. a) Input point cloud data subdivided into equally spaced voxels b) Feature learning network, transforms a group of points in a voxel to a new feature representation as a 3D tensor c) 3D convolution d) RPN network to draw 3D bounding boxes. <a href="https://arxiv.org/abs/1711.06396">P</a>ic credits: <a href="https://arxiv.org/abs/1711.06396">https://arxiv.org/abs/1711.06396</a></figcaption></figure><h3>Feature learning network:</h3><p>A feature learning network is used to extract descriptive features from the voxel grid by processing the individual point clouds in the voxel to obtain point-wise features and then aggregating these point-wise features with locally aggregated features. The feature learning network is applied to all the voxels containing more than a T number of points.</p><p><strong>Voxel partition</strong>: Subdivide the 3D space into equally spaced voxels</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1009/1*K8Lmxvg6iX2vrUrpVrA5zg.png" /><figcaption>Voxel partition: Partitioning the 3D space with the voxels. Image by author</figcaption></figure><p>Here is the code snippet for voxel partition:</p><blockquote>Note: The measurements defined for the voxel grid will vary depending on the class of the object</blockquote><ul><li>__cfg__.MAX_POINT_NUMBER indicates the point cloud threshold value, the threshold value used to process the selective voxel grids containing more than 35 point clouds</li><li>X, Y, Z min, max values define the 3D space in meters</li><li>Voxel_X_size indicate the voxel grid dimensions (fixed)</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/96b104da8102437a8ab328853db13091/href">https://medium.com/media/96b104da8102437a8ab328853db13091/href</a></iframe><p><strong>Random sampling</strong></p><p>Point clouds are bucketed into the voxel grids. Since processing all the points are computationally expensive and increases memory usage which in turn increases the load on the computational devices. To address this challenge voxels grids containing ‘T’ more point clouds are sampled.</p><p>With this Strategy, we could achieve</p><ol><li>Computational savings</li><li>Reduces the imbalance of points between the voxels which reduces the sampling bias, and adds more variation to training.</li></ol><p><strong>Stacked voxel feature encoding</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*QKSwAJbZj8bnLku9d81wPQ.png" /><figcaption>Feature learning network applied to an individual voxel. <a href="https://arxiv.org/abs/1711.06396">pic credits</a></figcaption></figure><p><strong>Point-wise input to Fully connected NN: </strong>we consider the voxel grids containing more than a T number of points. Each point cloud in a voxel is represented with 4 coordinates [x, y, z, r]; where x,y,z indicate the coordinates, and r indicates the reflectance. We compute the local mean as the centroid of all the points within the voxel grid(<strong>V). </strong>Then we augment each point in a voxel with the offset of the local mean to obtain the point-wise input feature set.</p><p><strong>Fully connected neural net (FCN Net): </strong>The point-wise input feature set is fed to a fully connected neural network to aggregate all the point-wise features to encode the shape of the surface contained with the voxel.</p><p>FCN network consists of a Linear layer, batch normalization, and ReLu.</p><p><strong>Element-wise max-pooling: </strong>Element-wise max pooling is used to obtain the locally aggregated features from the point-wise input features</p><p>Finally, point-wise concatenate is used to aggregate the point-wise feature with locally aggregated features.</p><p>VFE layer code snippet defining the point-wise input, aggregated features using batch normalization and max-pooling:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/afe2d4f0d60ee837afe97ffd9a0f7a0c/href">https://medium.com/media/afe2d4f0d60ee837afe97ffd9a0f7a0c/href</a></iframe><h3>Convolutional middle layers</h3><p>This layer converts voxel features to dense 4D feature maps and reduces the feature map size to one-fourth of the original using Convolution, batch normalization, ReLU.</p><p>ConvMD(cin, cout, k, s, p) to represent an M dimensional convolution operator where cin and cout are the number of input and output channels, k, s, and p represents kernel size, stride size, and padding size respectively.</p><p>Code snippet showing the 3D convolutional layers:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/496654ad960f4c8a83d36cc247dcf5ef/href">https://medium.com/media/496654ad960f4c8a83d36cc247dcf5ef/href</a></iframe><h3>Region proposal network</h3><p>The modified region proposal network has three blocks of fully convolutional layers. The first layer of each block downsamples the feature map by half via convolution with a stride size of 2, followed by a sequence of convolutions of stride 1 (×q means q applications of the filter). After each convolution layer, BN and ReLU operations are applied. We then upsample the output of every block to a fixed size and concatenate to construct the high-resolution feature map.</p><p>Finally, this feature map is mapped to the desired learning targets:</p><p>(1) probability score map and</p><p>(2) a regression map.</p><p>Code snippet defining convolutional and deconvolution layers:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*sD9ooZDbDi-nbHduQx-GmA.png" /><figcaption>Modified RPN architecture <a href="https://arxiv.org/abs/1711.06396">pic credits</a></figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/40f2de4698bdf95a02c9557f07927fb9/href">https://medium.com/media/40f2de4698bdf95a02c9557f07927fb9/href</a></iframe><p>Thanks for reading!!!</p><p>In the next article, we will implement the voxelNet code for the 3D object detection</p><p>Here are some of the results obtained by implementing the model in colab</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y9wu8PgdKD6yAZP8AyGB2A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Z1Uxi_S8_1w0ejM6eYW5g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7dpP15YwsWv30h46z2mWYg.jpeg" /><figcaption>Prediction results on the KITTI validation dataset</figcaption></figure><p><strong>Special thanks:</strong></p><p><strong>Dr.Uma K Mudenagudi, KLE Technological University for the project mentorship.</strong></p><p>References</p><ol><li><a href="https://arxiv.org/pdf/1711.06396.pdf">VoxelNet: End-to-End Learning for Point Cloud Based 3D Object Detection</a></li><li><a href="https://arxiv.org/abs/1612.00593">PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation</a></li><li><a href="https://arxiv.org/pdf/1907.09408">A survey of the deep learning-based object detection</a></li><li>KITTI raw dataset: @ARTICLE{<a href="http://www.cvlibs.net/publications/Geiger2013IJRR.pdf">Geiger2013IJRR</a>,author = {<a href="http://www.cvlibs.net/">Andreas Geiger</a> and <a href="http://www.mrt.kit.edu/mitarbeiter_lenz.php">Philip Lenz</a> and <a href="http://www.mrt.kit.edu/mitarbeiter_stiller.php">Christoph Stiller</a> and <a href="http://ttic.uchicago.edu/~rurtasun">Raquel Urtasun</a>},title = {Vision meets Robotics: The KITTI Dataset}, journal = {International Journal of Robotics Research (IJRR)},year = {2013}</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3999ea8fdd4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/lidar-point-cloud-based-3d-object-detection-implementation-with-colab-part-1-of-2-e3999ea8fdd4">LiDAR point-cloud based 3D object detection implementation with colab {Part-1 of 2}</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3D object classification in 6 steps using kaolin and Colab]]></title>
            <link>https://medium.com/data-science/3d-object-classification-in-6-steps-using-kaolin-and-colab-9ecb079143a8?source=rss-a19487c85edb------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ecb079143a8</guid>
            <category><![CDATA[3d-object-detection]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[colab]]></category>
            <category><![CDATA[kaolin]]></category>
            <category><![CDATA[lidar]]></category>
            <dc:creator><![CDATA[Gopalakrishna Adusumilli]]></dc:creator>
            <pubDate>Sun, 14 Jun 2020 18:26:22 GMT</pubDate>
            <atom:updated>2021-10-31T17:12:32.383Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>3D object detection classifier in 6 steps using kaolin and Colab</strong></h3><h4>A step-by-step hands-on 3D object detection classifier without the pre-requisite for a Linux machine or the GPU in hand</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*msjRpyLoTacIbqQaRuKztQ.jpeg" /><figcaption>3D object detection classifier</figcaption></figure><p>In this article, you will learn to develop 3D object detection classifier without the pre-requisite for a Linux machine or the GPU in hand.</p><p>3D object detection is an important aspect to solve real-world applications such as self-driving cars, robots, and AR/VR applications. 3D data provides reliable depth information that can be used to accurately localize objects/vehicles.</p><h3>3D Representation</h3><p>Here are some of the types of 3D representation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mt3TzLOoA0UlXaihl35G8g.png" /><figcaption>3D representation</figcaption></figure><p>A<strong> point cloud</strong> is a collection of points in 3D space, each point specified by an (XYZ) coordinates, optionally along with other attributes (like RGB color). The point cloud is called raw data obtained from the sensors such as LiDAR. These are converted to other representations such as polygon mesh, voxel grid before further processing.</p><p>Point cloud (PC) representation is more preferred since the conversion PC to other formats and vice versa is easy. Point representation preserves the original original geometric information in 3D space without any discretization.</p><p><strong>Polygon Mesh </strong>consists<strong> </strong>set of polygonal faces with shared vertices that approximate a geometric surface.</p><p><strong>Volumetric </strong>represents a single sample, or data point, on a regularly spaced 3D grid, Voxel grids are 3D grids in which each cell or “voxel” has a fixed size and discrete coordinates.</p><p><strong>Projected View RGB(D)</strong> projects a 3D object into multiple views and extracts the corresponding view-wise features and then fuses these features for accurate object detection.</p><h3>Google Colab - Introduction</h3><p>Google colaboratory a.k.a colab is a jupyter notebook with the GPU access for free. When you train your models on colaboratory, you are allowed to use a GPU-based virtual machine, where you are given a maximum of 12 hours at a time. After which access is lost to that particular virtual machine instance and connected to different virtual machine instances after 12 hours. So please save the data or checkpoints periodically. The colab is completely free.</p><figure><img alt="To choose the GPU for training, select Runtime &gt; Change runtime type choose hardware accelerator (change None to GPU)" src="https://cdn-images-1.medium.com/max/372/1*p5SJbRxFTqsmU0zyQSzhaw.png" /><figcaption>Selecting GPU</figcaption></figure><p>To choose the GPU for training, select <strong>Runtime </strong>&gt; <strong>Change runtime type </strong>choose hardware accelerator (change None to GPU).</p><p>colab is pre-installed with major libraries (NumPy, matplotlib) and frameworks (TensorFlow, PyTorch) and for custom installation try (<strong>!pip install</strong>).</p><p>Explore Google colab<a href="https://colab.research.google.com/"> here</a></p><h3>Kaolin- 3D deep learning research framework</h3><p>Kaolin is an open-source PyTorch library developed by a team of NVIDIA, aimed at accelerating 3D deep learning research. Kaolin framework converts the 3D models into deep learning datasets with few lines of code. kaolin provides easy access to loading and pre-processing popular 3D datasets.</p><p>Kaolin framework boils down complex 3D algorithms such as the conversion of point cloud data to voxel grid, triangle mesh representation in simple steps.</p><p>The kaolin framework benefits researchers in fields such as robotics, self-driving cars, augmented and virtual reality.</p><p>Now for 3D object detection classifier we will use <strong>Kaolin framework</strong>. The git repo can be found <a href="https://github.com/NVIDIAGameWorks/kaolin">here</a></p><p>In summary, here are the Kaolin features we have been looking for.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*oaMYN1WobQn8kffcpJkgcg.png" /><figcaption>Kaolin features</figcaption></figure><h3>Dataset</h3><p>The dataset is available at <a href="https://modelnet.cs.princeton.edu/#">princeton MODELNET</a>. The <a href="http://3dvision.princeton.edu/projects/2014/3DShapeNets/ModelNet10.zip"><strong>ModelNet10.zip</strong></a><strong> </strong>ZIP file contains CAD models from the 10 categories used to train the deep network in our <strong>3D object detection classifier</strong>. The training and testing split is included in the file. The CAD models are completely cleaned in-house, and the orientations of the models (not scale) are manually aligned by ourselves.</p><p>MODELNET 10 has 10 categories mentioned below:</p><blockquote>Bathtub, bed, chair, desk, dresser, monitor, night_stand, sofa, table, toilet</blockquote><p>Let’s get started…</p><h3>The 3D object detection classifier</h3><h4>Step 1: Open google colab <a href="https://colab.research.google.com/">here</a> and change runtime to GPU (~ 4–5 mins)</h4><p>Installing the packages</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f6b9776be289cde9dac01ec622817699/href">https://medium.com/media/f6b9776be289cde9dac01ec622817699/href</a></iframe><h4>Step 2: Downloading MODELNET10 dataset</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e642cd977d8ec95a17bebb9ec7a65951/href">https://medium.com/media/e642cd977d8ec95a17bebb9ec7a65951/href</a></iframe><p>Visualizing the 3D model with X,Y, Z movement</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6ab30ad952b22ce35f1c6dcbfbe1deb7/href">https://medium.com/media/6ab30ad952b22ce35f1c6dcbfbe1deb7/href</a></iframe><h4>Step 3: Data loading</h4><p>Kaolin provides convenient functions to load popular 3D datasets (ModelNet10). To start, we will define a few important parameters:</p><p>model_path the variable will hold the path to the ModelNet10 dataset. categories variable to specify which classes we want to learn to classify. num_points is the number of points we will sample from the mesh when transforming it to a point cloud.</p><p>Finally, we will disable multiprocessing and memory pinning if we are using CUDA for our transform operations.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7757914c4394ee1be0ec0314dbaf841a/href">https://medium.com/media/7757914c4394ee1be0ec0314dbaf841a/href</a></iframe><p>This command defines a transform that first converts a mesh representation to a point cloud and then <em>normalizes</em> it to be centered at the origin, and has a standard deviation of 1. Much like images, 3D data such as point clouds need to be normalized for better classification performance.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3631821515681bc366c4e13e19c0cb59/href">https://medium.com/media/3631821515681bc366c4e13e19c0cb59/href</a></iframe><p>split=&#39;train&#39; argument indicates that we&#39;re loading the &#39;train&#39; split. rep=&#39;pointcloud&#39; loads up meshes and converts them into point clouds. transform=norm applies a normalizing transform to each point cloud.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ee5992c19b1021ca4223f96f96f0dfd7/href">https://medium.com/media/ee5992c19b1021ca4223f96f96f0dfd7/href</a></iframe><h4>Step 4: Setting up our model, optimizer, and loss criterion</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4df7182aae0714e723c774f1378e5ee3/href">https://medium.com/media/4df7182aae0714e723c774f1378e5ee3/href</a></iframe><h4>Step 5: Training the point cloud classifier (~ 15–20 minutes)</h4><p>The following line of code will train and validate a <em>PointNet</em> classifier</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e61d47f2653229ef6b06d1f0098c3ead/href">https://medium.com/media/e61d47f2653229ef6b06d1f0098c3ead/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*zZFVIPtnWfj8sqqRXKNvgQ.png" /><figcaption>epoch-training</figcaption></figure><p>Hurray !!!, that’s it, you’ve trained your first 3D object detection classifier using Kaolin!!</p><h4>Step 6: Evaluating the trained 3D object detection model on test data</h4><p>We will create a new data loader that will load the same data as our previous val_loader but with shuffling, and taking a sample batch.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1a0936816eae9529ea33c8fd6d454e7c/href">https://medium.com/media/1a0936816eae9529ea33c8fd6d454e7c/href</a></iframe><p>Next, we set up a plot to visualize the point cloud, ground-truth label, and our prediction using a small <strong>visualization </strong>function.</p><p>color-coded the results — <strong>green</strong> for correct and <strong>red</strong> for incorrect.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b5d3d773033e5b3cc5353d6e99c91cb6/href">https://medium.com/media/b5d3d773033e5b3cc5353d6e99c91cb6/href</a></iframe><h4>Visualization results</h4><p>GT- Ground Truth, Pred- Prediction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*nYdm3-L6aYIGV9z-VqjYPA.png" /></figure><p>Pat your back for the completion of the 3D object detection classifier.</p><p>Thanks for reading…</p><p>Jupyter notebook can be found <a href="https://github.com/gkadusumilli/3D_pointcloud_classifier/blob/master/3D_object_classifier_updated.ipynb">here</a></p><p>Article update: 31/10/2021</p><p>References URL’s</p><ol><li><a href="https://arxiv.org/search/cs?searchtype=author&amp;query=Jatavallabhula%2C+K+M">Krishna Murthy Jatavallabhula</a>, et.al. “Kaolin: A PyTorch Library for Accelerating 3D Deep Learning Research” <a href="https://arxiv.org/abs/1911.05063v2">arXiv:1911.05063v2</a> <a href="https://arxiv.org/abs/1911.05063">paper</a></li><li><a href="https://github.com/NVIDIAGameWorks/kaolin">https://github.com/NVIDIAGameWorks/kaolin</a></li><li><a href="https://modelnet.cs.princeton.edu/#">Princeton MODELNET</a></li></ol><p>4. <a href="https://www.tutorialspoint.com/google_colab/google_colab_quick_guide.htm">Google colab</a> guide</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ecb079143a8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/3d-object-classification-in-6-steps-using-kaolin-and-colab-9ecb079143a8">3D object classification in 6 steps using kaolin and Colab</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introductory Tutorial on Video Processing]]></title>
            <link>https://medium.com/@gkadusumilli/introductory-tutorial-on-video-processing-f8963f2a29c3?source=rss-a19487c85edb------2</link>
            <guid isPermaLink="false">https://medium.com/p/f8963f2a29c3</guid>
            <category><![CDATA[moviepy]]></category>
            <category><![CDATA[videos]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[pytube]]></category>
            <category><![CDATA[python3]]></category>
            <dc:creator><![CDATA[Gopalakrishna Adusumilli]]></dc:creator>
            <pubDate>Thu, 02 Jan 2020 14:59:50 GMT</pubDate>
            <atom:updated>2020-01-11T15:38:09.530Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello Readers,</p><p>In this Digital Era, we always seize our memories in digital format it may be in the format of either Images or Video.</p><p>Imagine a situation, you want to share memories with your dear ones so you have thought of making a small AV(Audio and video) clip with the images you have stored in your phone</p><p>so what you will do…..?</p><p>Most of us will open Google Guru and search for online software (which is free !!!!) to get the task accomplished. Hold on, Did you ever thought, During this process, you may end up giving authorization to 3rd party to access your Data.</p><p>well If you are thinking to evade this problem, let us put hands together to awaken DIY Enthusiast and Pythonista within us and write a simple script to complete your task.</p><p>So let’s get started…</p><h3>1. Prerequisites</h3><p>To begin with, the tutorial, make sure below mentioned packages are installed in your Python IDLE/ Anaconda.</p><ul><li>Numpy (pip install numpy)</li><li>Moviepy(pip install moviepy)</li><li>Pytube (pip install pytube)</li><li>OpenCV</li></ul><h3>2. Extract image Sequence from a Video</h3><p>Video is all about a sequence of Images that are moved at a particular speed(FPS-Frames Per Second) results in a moving video.</p><p><strong>Steps:</strong></p><ol><li>Open the video file or camera using <strong>cv2.VideoCapture()</strong></li><li>Creates a folder to save Images</li><li>Read frame by frame</li><li>Save each frame using <strong>cv2.imwrite()</strong></li><li>Release the VideoCapture and destroy all windows</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/08ce6068a0190fed899c7434130bfbb6/href">https://medium.com/media/08ce6068a0190fed899c7434130bfbb6/href</a></iframe><h3>3. Clip Video</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4ba1fc97fd1d8d3632e57647fd5d00b1/href">https://medium.com/media/4ba1fc97fd1d8d3632e57647fd5d00b1/href</a></iframe><h3>4. Merge Videos</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/32b3ec97704752749949b356a37daa8b/href">https://medium.com/media/32b3ec97704752749949b356a37daa8b/href</a></iframe><h3>5. Extract Audio from Video</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f599f68466535b4a46ebae24c2c5dc99/href">https://medium.com/media/f599f68466535b4a46ebae24c2c5dc99/href</a></iframe><h3>6. Loop Audio</h3><p>Loops over an audio clip.</p><p>Returns an audio clip that plays the given clip either n loops times or during duration seconds.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/98f4deb829329bbcff92adc8ccd61474/href">https://medium.com/media/98f4deb829329bbcff92adc8ccd61474/href</a></iframe><h3>7. Download Youtube Videos</h3><p>With the below script you can download the youtube videos using python script without relying upon on 3rd party Youtube Video Download software</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5b56a80be6c5c5143414ace6f3c92ac1/href">https://medium.com/media/5b56a80be6c5c5143414ace6f3c92ac1/href</a></iframe><h3>Built-in Multimedia Support</h3><p>Python has a few built-in multimedia modules for application development. I have listed some of these modules.</p><ul><li><strong>winsound: </strong>The winsound module is available in python. It provides an interface that can be used to implement audio-playing elements in the application.</li><li><strong>audioop: </strong>This module is used for manipulating the raw audio data. One can perform several operations on sound fragments. This module provides support for a-LAW, u-LAW and Intel/DVI ADPCM encodings.</li><li><strong>PyMedia: </strong>PyMedia is a popular opensource media library that supports audio/video manipulation of a wide range of multimedia formats like avi, mpg, mp3, Ogg …etc</li><li><strong>Pyglet: </strong>If you are interested in animation and gaming applications, Then pyglet module could be a choice as this module provides an API for developing multimedia applications using python. It is an OpenGL-based library that works on multiple platforms. It is one of the popular multimedia frameworks for the development of games and other graphically intense applications.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8963f2a29c3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Image Recognition using Pre Trained Xception Model in 5 steps]]></title>
            <link>https://medium.com/analytics-vidhya/image-recognition-using-pre-trained-xception-model-in-5-steps-96ac858f4206?source=rss-a19487c85edb------2</link>
            <guid isPermaLink="false">https://medium.com/p/96ac858f4206</guid>
            <category><![CDATA[keras]]></category>
            <category><![CDATA[image-recognition]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[neural-networks]]></category>
            <dc:creator><![CDATA[Gopalakrishna Adusumilli]]></dc:creator>
            <pubDate>Fri, 16 Aug 2019 09:40:13 GMT</pubDate>
            <atom:updated>2020-05-03T16:34:47.204Z</atom:updated>
            <content:encoded><![CDATA[<h3>Image Recognition using Pre-trained Xception Model in 5 steps</h3><p>Hello Readers,</p><p>In this article, we will take you to predict images using Convolutional Neural Network(specifically using <strong>Xception Model</strong>) pre-trained on the ImageNet database with python and Keras deep learning library.</p><p><strong>What is ImageNet?</strong></p><p>ImageNet is a project intended to label and categorize Images manually. in the field of Deep Learning and Convolutional Neural Networks, we will refer ImageNet as “ImageNet Large Scale Visual Recognition Challenge” in short ILSVRC.</p><p>The main objective of this ImageNet project is to train a model, which can classify an Input Image into 1000 separate object categories.</p><p>Categories include species of dogs, cats, fish, Vehicle types include vehicle parts like wheels, steering, etc to know more Categories<a href="https://gist.github.com/yrevar/942d3a0ac09ec9e5eb3a"> refer</a></p><p>The models are trained on approximately 1.2 million Images and additional 50000 images for validation and 100,000 images for testing.</p><p>for Image Recognition, we can use pre-trained models available in the Keras core library. the models like <strong>VCG16, VCG19, Resnet50, Inception V3, Xception </strong>models</p><p>In this article, we have chosen the Pre-trained Xception Model for Image Classification</p><h3>Xception Model</h3><p>Xception Model is proposed by Francois Chollet. Xception is an extension of the inception Architecture which replaces the standard Inception modules with depthwise Separable Convolutions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*459jKxLPM9R-Y_z0y8SXug.png" /><figcaption>The architecture of Xception (Entry Flow&gt;Middle Flow&gt;Exit FLow)</figcaption></figure><h4>Comparison of ImageNet: Xception Model with other Models</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tCTo6M1E5rZ4_ARnPcv-gQ.png" /><figcaption>ImageNet: Xception has the Highest Accuracy</figcaption></figure><p>Now let us write a python script for Image Recognition using Xception Model</p><p><strong>Step1: Installing required dependencies</strong></p><p>for Image Recognition, we rely on libraries Numpy, Matplotlib(for visualization), tf-explain(to import pre-trained models), Tensorflow with Keras as backend</p><p>open command prompt (cmd) &gt; run below command</p><pre>pip install tf-explain</pre><p><strong>Step2: Importing packages</strong></p><pre>#import libraries</pre><pre>import numpy as np<br>import tensorflow as tf<br>import matplotlib.pyplot as plt<br>from tf_explain.core.activations import ExtractActivations<br>from tensorflow.keras.applications.xception import decode_predictions<br>%matplotlib inline</pre><p><strong>Step3: Loading Pretrained Model</strong></p><pre>#load pre trained Xception model</pre><pre>model=tf.keras.applications.xception.Xception(weights=&#39;imagenet&#39;,include_top=True)</pre><pre>#Summary of Xception Model<br>print(model.summary)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*581Oyh-O0W0xdpfULyo3Dw.jpeg" /><figcaption>Model Summary</figcaption></figure><p><strong>Step4: Loading and pre-processing Sample Input Image</strong></p><pre>#loading and preprocessing cat image</pre><pre>IMAGE_PATH=&#39;./lion.jpg&#39;<br>img=tf.keras.preprocessing.image.load_img(IMAGE_PATH,target_size=(299,299))<br>img=tf.keras.preprocessing.image.img_to_array(img)</pre><pre>#view the image<br>plt.imshow(img/255.)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*NqBoxOPFttwjhzYB8X5A-w.jpeg" /><figcaption>Input Image</figcaption></figure><h4>Step5: Prediction of objects in the Image</h4><p>Now let us make the top 5 predictions on the input image using the Xception Model which we loaded successfully in our IDE.</p><pre>import requests</pre><pre>#fetching labels from Imagenet  <br>response=requests.get(&#39;<a href="https://storage.googleapis.com/download.tensorflow.org/data/imagenet_class_index.json&#39;">https://storage.googleapis.com/download.tensorflow.org/data/imagenet_class_index.json&#39;</a>)<br>imgnet_map=response.json()</pre><pre>imgnet_map={v[1]:k for k, v in imgnet_map.items()}</pre><pre>#make model predictions</pre><pre>img=tf.keras.applications.xception.preprocess_input(img)<br>predictions=model.predict(np.array([img]))<br>decode_predictions(predictions,top=5)</pre><p><strong>Result</strong></p><p>from the below snippet we found that Xception model has predicted that Image consists of <strong>Lion</strong> with the probability of 0.87(87%)and other animals with a probability of 0.001(less than 1%).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*AGyt-f4zliUw5D3uEs5NNA.jpeg" /></figure><p>References</p><ol><li>Xception: Deep Learning with Depthwise Separable Convolutions(<a href="https://arxiv.org/abs/1610.02357">https://arxiv.org/abs/1610.02357</a>)</li><li>ImageNet (<a href="http://www.image-net.org/">http://www.image-net.org/</a>)</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96ac858f4206" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/image-recognition-using-pre-trained-xception-model-in-5-steps-96ac858f4206">Image Recognition using Pre Trained Xception Model in 5 steps</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SPIFFS-Flash File System in NodeMCU]]></title>
            <link>https://medium.com/@gkadusumilli/spiffs-flash-file-system-in-nodemcu-356153383f3e?source=rss-a19487c85edb------2</link>
            <guid isPermaLink="false">https://medium.com/p/356153383f3e</guid>
            <category><![CDATA[file-upload-in-spiffs]]></category>
            <category><![CDATA[appending-file-in-spiffs]]></category>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[spiff-nodemcu]]></category>
            <category><![CDATA[spiff]]></category>
            <dc:creator><![CDATA[Gopalakrishna Adusumilli]]></dc:creator>
            <pubDate>Wed, 24 Jul 2019 04:25:29 GMT</pubDate>
            <atom:updated>2019-07-24T04:43:16.899Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*v23n5bQSKU-UBplbDF-ZjA.jpeg" /></figure><p>Hello Everyone,</p><p>In this article, you will learn NodeMCU Flash File System Called as (SPIFFS). There are two methods to save static data on NodeMCU.</p><ol><li><strong>Internal EEPROM </strong>which is of 512 Bytes, But you can write data 1 million times(but has no file system).</li><li><strong>Flash memory</strong> connected to ESP through SPI. When you see ESP-01 a small 8-pin Chip is present near to the ESP8266, called as <strong>FLASH memory. </strong>In this flash memory, ESP stores the program, files, WiFi, and configurations. Limitation of this memory is it has only 10000 write cycles. Even though the file system is stored in the same flash chip as the program, programming new sketch will not modify file system contents. This allows using the file system to store sketch data, configuration files, or content for the Web server.</li></ol><h4>File system object (SPIFFS)</h4><p><strong>begin</strong></p><p>This method mounts the SPIFFS file system. the function is called before the library package is used. Returns true if the file system was mounted successfully, false otherwise.</p><pre><strong>SPIFFS.begin</strong></pre><p><strong>format:</strong></p><p>Formats the file system.Returns true if the formatting is successful.</p><pre><strong>SPIFFS.format()</strong></pre><p><strong>Open</strong></p><p>Opens a file. The path should be specified starting with a slash.(eg: /class.txt).</p><p><strong>Mode </strong>is a string indicates the file privilege it can be (<strong>“r”-</strong>reads the file, <strong>“w”-</strong>Writes to the file, <strong>“a”</strong>-adds data to file, many other modes like <strong>“r+”, “w+”, “a+”).</strong></p><p>Returns File object. To indicate whether the file was opened successfully, we use the Boolean operator.</p><pre><strong>SPIFFS.open(path,mode)</strong></pre><p><strong>remove</strong></p><p>Deletes the file specified using path. Returns true if the file is deleted Successfully.</p><pre><strong>SPIFFS.remove(path)</strong></pre><p><strong>size</strong></p><p>Returns file size, in bytes.</p><pre><strong>file.size()</strong></pre><p><strong>openDir</strong></p><p>Opens a directory given its absolute path. Returns a Dir object.</p><pre><strong>SPIFFS.openDir(path)</strong></pre><p><strong>close</strong></p><p>Closes the file. No other operation will be performed on File object after the close function called.</p><pre><strong>file.close()</strong></pre><p>By now you might have understood file system object modes</p><p>Now using the above file system object modes we will write an example code</p><p>which helps to understand</p><ol><li>Initializing SPIFFS.</li><li>Creating a new file.</li><li>formatting file.</li><li>Open file for writing.</li><li>Close a file.</li></ol><pre><strong>//including File system libary packages<br></strong>#include&lt;ESP8266WiFi.h&gt;<br>#include&lt;FS.h&gt;<br>const char* filename=&quot;/samplefile.txt&quot;;<br>void setup()<br>{<br>delay(1000);<br>Serial.begin(115200);<br>Serial.println();<br><strong>//Initialize File system</strong><br>if(SPIFFS.begin())<br>{<br>Serial.println(&quot;SPIFFS got Initialized successfully&quot;);<br>}<br>else<br>{<br>Serial.println(&quot;SPIFFS Initialization is failed&quot;);<br>}<br><strong>//Format File system</strong><br>if(SPIFFS.format())<br>{<br>Serial.println(&quot;File system Formatted&quot;);<br>}<br>else<br>{<br>Serial.println(&quot;File system formatting error&quot;);<br>}<br><strong>//create a new file and write data to the file</strong><br>File f=SPIFFS.open(filename,&quot;w&quot;);<br>if(!f)<br>{</pre><pre>Serial.println(&quot;file open failed&quot;);<br>}<br>else<br>{<br><strong>//Write data to file</strong><br>Serial.println(&quot;writing Data to File&quot;);<br>f.print(&quot;hello world,welcome to IOT Platform&quot;);<br>f.close();<br>}<br>}</pre><pre>void loop() {<br>int i;<br><strong>//Read File Data</strong><br>File f=SPIFFS.open(filename,&quot;r&quot;);<br>if(!f)<br>{<br>Serial.println(&quot;file open failed&quot;);<br>}<br>else<br>{<br>Serial.println(&quot;Reading Data from file&quot;);<br><strong>//data from file<br>//read upto last character</strong><br>for(i=0;i&lt;f.size();i++)<br>{<br>Serial.print((char)f.read());<br>}<br><strong>//close file</strong><br>f.close();<br>Serial.println(&quot;file Closed&quot;);<br>}<br>delay(5000);<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bbMlvvdy4WS1Y5xPKrSzJw.png" /></figure><p>In the previous example, we have created a file and uploaded data through programming.</p><p>Suppose if we have a text file, which contains data(for ex: discrete values from the sensor) which has to be saved in NodeMCU then we need to follow the below-described approach</p><p>Let’s get started…</p><h3>Directly Uploading files to Node MCU</h3><p>Before setting Uploading text file to NodeMCU and read it in Serial Monitor, we have to install few header files</p><p><strong>Uploading files to file system</strong></p><p>ESP8266FS is a tool which integrates into the Arduino IDE. it adds a menu item to the Tools menu for uploading the contents of the sketch data directory into the ESP8266 flash file system</p><ol><li>ESP8266FS tool can be downloaded from</li></ol><p><a href="https://github.com/esp8266/arduino-esp8266fs-plugin/releases/download/0.1.3/ESP8266FS-0.1.3.zip">https://github.com/esp8266/arduino-esp8266fs-plugin/releases/download/0.1.3/ESP8266FS-0.1.3.zip</a></p><p>2. Unpack and copy the ESP8266FS folder into the tools directory(the path will look similar to path C:\Program Files (x86)\Arduino\tools\ESP8266FS\).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T6H_HwORv8wPYEBr30knDg.png" /><figcaption>Location to unpack and save ESP8266FS package — Arduino directory&gt;tools</figcaption></figure><p>3. Restart Arduino IDE.</p><p>4. Open a sketch (or create a new one and save it).</p><p>5. Go to sketch directory (choose Sketch&gt;show Sketch Folder).</p><p>6. Create a directory named <strong>data </strong>and put your files(ex: notes.txt) you want in the file system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*qK6iYXLkEEyIzpALisnl4A.png" /><figcaption>Sketch data folder path(location)</figcaption></figure><p>7. Select appropriate Board, port and make sure Serial Monitor is closed.</p><p>8. Select Tools&gt;ESP8266 Sketch Data Upload. This should start uploading the files into the ESP8266 flash file system. if you have followed above steps then, IDE status bar will display SPIFFS Image Uploaded message.</p><p>Click on ESP8266 Sketch Data Upload(No code is required to upload data) Note: uploading file may take more time</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*qMxyJVe7mUg7eKJ4gxezUA.png" /><figcaption>Sketch data upload option</figcaption></figure><h4>Reading uploaded file:</h4><p>To view data uploaded in NodeMCU through the serial monitor (COM Port), we need to write a simple script which is given below</p><pre>#include&lt;ESP8266WiFi.h&gt;<br>#include&lt;FS.h&gt;<br>//enter your file name<br>const char* file=&quot;/notes.txt&quot;;<br>void setup()<br>{<br>delay(1000);<br>Serial.begin(115200);<br>Serial.println();<br>//Initialize File system<br>SPIFFS.begin();<br>Serial.println(&quot;File System Initialized&quot;);<br>//open file for reading<br>File dataFile=SPIFFS.open(file,&quot;r&quot;); <br>Serial.println(&quot;Reading Data from File:&quot;);<br>//Data from file<br>//Read upto complete size<br>for(int i=0;i&lt;dataFile.size();i++)<br>{<br>Serial.print((char)dataFile.read());<br>}<br>dataFile.close();<br>}<br>void loop()<br>{<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*x-_ZR4R6CzBx8Rqkz_WWiA.png" /><figcaption>Reading Contents of the Directly uploaded file</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=356153383f3e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>