<?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 Steve Jefferson on Medium]]></title>
        <description><![CDATA[Stories by Steve Jefferson on Medium]]></description>
        <link>https://medium.com/@stevejeffersonr?source=rss-244835d8782------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*yihUXHE2Y-3S2fXHUQAhHg.jpeg</url>
            <title>Stories by Steve Jefferson on Medium</title>
            <link>https://medium.com/@stevejeffersonr?source=rss-244835d8782------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 16 May 2026 13:06:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@stevejeffersonr/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[How to implement Azure Vision API for Text Extraction]]></title>
            <link>https://stevejeffersonr.medium.com/how-to-implement-azure-vision-api-for-text-extraction-c72488556a60?source=rss-244835d8782------2</link>
            <guid isPermaLink="false">https://medium.com/p/c72488556a60</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[ocr]]></category>
            <category><![CDATA[azure-vision]]></category>
            <dc:creator><![CDATA[Steve Jefferson]]></dc:creator>
            <pubDate>Wed, 24 Mar 2021 05:11:22 GMT</pubDate>
            <atom:updated>2021-03-27T05:32:18.441Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://docs.microsoft.com/en-us/azure/cognitive-services/computer-vision/overview">Azure Computer Vision</a> includes Optical Character Recognition (OCR) capabilities. You can use the Read API to extract printed and handwritten text from images and documents. It uses deep learning based models and works with text on a variety of surfaces and backgrounds. These include business documents, invoices, receipts, posters, business cards, letters, and whiteboards. The OCR APIs support extracting printed text in several languages.</p><h3><strong>Azure configuration</strong></h3><ul><li><a href="https://azure.microsoft.com/auth/signin/?loginProvider=Microsoft&amp;redirectUri=%2Fen-in%2Ffree%2F)">Register</a> for an account in Microsoft Azure Cloud Platform, The Azure free account includes access to several Azure products that are free for 12 months.</li><li><a href="https://portal.azure.com/#blade/HubsExtension/BrowseResource/resourceType/Microsoft.CognitiveServices%2Faccounts">Create</a> a Cognitive Services resource.</li><li>Make note of the Api Key and the endpoints which are located under “Keys and Endpoint”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*ODDxlBKqiMdTky7MFKjxmQ.jpeg" /><figcaption>Original Image</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*3h5nbjLgqzSW6Dwgz8zESg.jpeg" /><figcaption>Text Detected from Image</figcaption></figure><h3><strong>Code Breakdown</strong></h3><ul><li><strong>Setting Global Variables</strong></li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bc4777e0cfe205f65317435c63d58312/href">https://medium.com/media/bc4777e0cfe205f65317435c63d58312/href</a></iframe><ul><li><strong>Importing required libraries</strong></li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e983ff179513ae0c63b63bbde0a3a7b8/href">https://medium.com/media/e983ff179513ae0c63b63bbde0a3a7b8/href</a></iframe><ul><li><strong>Image Handler</strong></li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9a4f80fd056fe0480fa04b16484837dc/href">https://medium.com/media/9a4f80fd056fe0480fa04b16484837dc/href</a></iframe><ul><li><strong>Geting Asyncronous Endpoint</strong></li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a516d9e204cbd1763bc5e64ba69e700f/href">https://medium.com/media/a516d9e204cbd1763bc5e64ba69e700f/href</a></iframe><ul><li><strong>Extracting Text From Response</strong></li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4cd3eece973e1de7092d278bebc916c1/href">https://medium.com/media/4cd3eece973e1de7092d278bebc916c1/href</a></iframe><ul><li><strong>Visualisation Code</strong></li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1680b8449aadb93bcf1e46227b39bbec/href">https://medium.com/media/1680b8449aadb93bcf1e46227b39bbec/href</a></iframe><ul><li><strong>Write to file</strong></li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5ddbe53b6c0d0d3fc68b1165d4e87f36/href">https://medium.com/media/5ddbe53b6c0d0d3fc68b1165d4e87f36/href</a></iframe><ul><li><strong>Integrating all the components</strong></li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4ef21a4e47d5af1f1cbe8b550b809651/href">https://medium.com/media/4ef21a4e47d5af1f1cbe8b550b809651/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c72488556a60" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fixing  model compatibility errors across Tensorflow versions]]></title>
            <link>https://stevejeffersonr.medium.com/fixing-model-compatibility-errors-across-tensorflow-versions-6a2114d85ba?source=rss-244835d8782------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a2114d85ba</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[error]]></category>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[fix]]></category>
            <dc:creator><![CDATA[Steve Jefferson]]></dc:creator>
            <pubDate>Fri, 30 Oct 2020 18:36:32 GMT</pubDate>
            <atom:updated>2020-11-02T05:48:51.739Z</atom:updated>
            <content:encoded><![CDATA[<h3>Fixing model compatibility errors across Tensorflow versions</h3><h4>When moving a model from one system to another the version of Tensorflow may not always be the same which causes a lot of compatibility issues, This article aims to help fix these issues</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*sppMsoKCfc7F5Kr1qNez2w.jpeg" /></figure><p><strong>Errors fixed in this article include:</strong></p><ul><li><em>ValueError: bad marshal data (unknown type code) while loading model</em></li><li><em>ValueError: Unknown layer: Functional</em></li></ul><p><strong>Requirements</strong></p><ol><li>Saved model weights in h5 format</li><li>Tensorflow installed</li><li>Cuda and cuDNN installed if you are using a GPU</li></ol><h3>Creating the model structure</h3><p>If you have the code you used to create your model getting the model structure can be done directly. I have show an example of initializing the model structure using the Keras vgg19 with a custom fully connected output layer.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f4d082634cbffddc7a4e78ff4f10cf1f/href">https://medium.com/media/f4d082634cbffddc7a4e78ff4f10cf1f/href</a></iframe><p>If you don&#39;t have your code which you used to create your model it is going to be a little harder as the only solution for these errors is to create the model structure and load the weights into it. I will not go into detail about recreating the model structure as it will vary based on your model. The function below should help you in finding the layers along with their weights used in the .h5 file which will help you in recreating the model.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/65cddd72f61510b88630c111e6572b6c/href">https://medium.com/media/65cddd72f61510b88630c111e6572b6c/href</a></iframe><h3>Loading model weights</h3><p>We have now created an untrained model and will set its weights with the model you are trying to import using the following line of python code.</p><pre>model.load_weights(‘Model_you_are_porting.h5’)</pre><h4><strong>Note:</strong></h4><p>If you are trying to import a model that was created on TensorFlow_v1 then run the following command to ensure compatibility.</p><pre>tf.compat.v1.disable_v2_behavior()</pre><p><em>that&#39;s it hopefully your model should now work without any problems now :)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a2114d85ba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting up your Nvidia GPU for Deep Learning(2020)]]></title>
            <link>https://stevejeffersonr.medium.com/setting-up-your-nvidia-gpu-for-deep-learning-2020-22c153d4200b?source=rss-244835d8782------2</link>
            <guid isPermaLink="false">https://medium.com/p/22c153d4200b</guid>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[nvidia]]></category>
            <category><![CDATA[setup]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[gpu]]></category>
            <dc:creator><![CDATA[Steve Jefferson]]></dc:creator>
            <pubDate>Tue, 27 Oct 2020 05:48:59 GMT</pubDate>
            <atom:updated>2020-11-02T05:49:41.051Z</atom:updated>
            <content:encoded><![CDATA[<h3>Setting up your Nvidia GPU for Deep Learning</h3><p>This article aims to help anyone who wants to set up their windows machine for deep learning. Although setting up your GPU for deep learning is slightly complex the performance gain is well worth it <a href="https://datamadness.github.io/TensorFlow2-CPU-vs-GPU"><em>*</em></a><em> </em>. The steps I have taken taken to get my RTX 2060 ready for deep learning is explained in detail. Software installation covered in this article include Cuda ,cuDNN ,Anaconda ,Visual Studio C++ and Tensorflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z-uXGSiGZlI5d-sOF5pKdg.png" /></figure><h3>Files to download</h3><p>The first step when you search for the files to download is to look at what version of Cuda Tensorflow, supports which can be checked <a href="https://www.tensorflow.org/install/gpu#software_requirements">here</a>, at the time of writing this article it supports Cuda 10.1.To download cuDNN you will have to register as an Nvidia developer. I have provided the download links to all the software to be installed below.</p><ol><li><a href="https://www.anaconda.com/products/individual">Anaconda</a></li><li><a href="https://visualstudio.microsoft.com/downloads/">Visual Studio Community Edition 2019</a></li><li><a href="https://developer.nvidia.com/cuda-toolkit-archive">Cuda</a>(Find the version <a href="https://www.tensorflow.org/install/gpu#software_requirements">supported by Tensorflow</a>)</li><li><a href="https://developer.nvidia.com/rdp/cudnn-download">cuDNN</a>(Download according to your Cuda version)</li></ol><p>For this installation Anaconda 2020.07, Visual studio 16.7.6, Cuda 10.1(update 2), cuDNN 8.0.4, TensorFlow 2.3.1 were used</p><h3>Anaconda</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/447/1*S2kkcLC8IExHKkhvmpw_Lg.png" /></figure><p><em>Anaconda is a free and open-source distribution of the Python and R programming languages for scientific computing, that aims to simplify package management and deployment.</em></p><ol><li>Double click the installer to launch.</li></ol><p>2. Click Next.</p><p>3. Read the licensing terms and click “I Agree”.</p><p>4. Select an install for “Just Me” and click Next.</p><p>5. Select a destination folder to install Anaconda and click the Next button</p><p>6. Do not add Anaconda to your PATH environment variable when asked in the checkbox</p><p>7. After a successful installation you will see the “Thanks for installing Anaconda” dialog box</p><p>8. Verify your Install</p><h3>Visual Studio Community Edition 2019</h3><p><em>The core of NVIDIA TensorRT is a C++ library that facilitates high-performance inference on NVIDIA graphics processing units. This is why we must install the necessary C++ libraries using Visual Studio.</em></p><ol><li>Double click the installer to launch.</li><li>Click continue and it will download a few files</li><li>Scroll and select desktop environment with C++</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mSpNWhK6FEHjcuS-ZiEsUg.png" /></figure><p>4. Check the components shown in the image above</p><p>5.Click on Install to complete the installation</p><h3>Cuda</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/1*wES9yDxFaPyCRspi8mZ3RQ.jpeg" /></figure><p><em>CUDA is a parallel computing platform and application programming interface model created by Nvidia.</em></p><ol><li>Double click the installer and click on extract to extract the necessary files to a temporary location</li><li>The System check will complete automatically</li><li>Accept the License Agreement</li><li>Install using the default Express option which is recommended</li><li>The installer will finish after a while</li></ol><h3>cuDNN</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*iqHrh0UgNhXg0mpxt577qw.png" /></figure><p><em>cuDNN is a GPU-accelerated library for deep neural networks. cuDNN provides highly tuned implementations for standard routines such as forward and backward convolution, pooling, normalization, and activation layers</em>.</p><ol><li>Extract the zip files from archive downloaded</li><li>Copy the folders “bin”, ”include”, “lib”</li><li>Paste the copied folders into:</li></ol><pre>C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1</pre><p>4.Run the following commands one by one (in an elevated command prompt) to add the necessary files to Path</p><pre>1) setx path “%PATH%;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin”<br>2) setx path “%PATH%;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\extras\CUPTI\lib64”<br>3) setx path “%PATH%;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include”<br>4) setx path “%PATH%;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\libnvvp”</pre><h3>TensorFlow</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2U5-KsSkwYwY4ZCEbXqTkQ.png" /></figure><p><em>Tensorflow is a comprehensive set of libraries that helps in training and testing deep learning models.</em></p><p>Do not directly use Anaconda without specifying the version to install TensorFlow as the Anaconda installer will only install TensorFlow 1.14 and you will get a version not supported error, Instead downgrade python to python 3.7 and run the following commands to install Tensorflow 2.1.0</p><pre>conda install python=3.7</pre><pre>conda update --all</pre><pre>conda install -c anaconda tensorflow-gpu=2.1</pre><h3>Verify your Installation</h3><p>To test if all you have done till now works create a python file with Spyder and run this code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/baa4026e8c54df144b2bbfbf2802cd2d/href">https://medium.com/media/baa4026e8c54df144b2bbfbf2802cd2d/href</a></iframe><p>That’s it your deep learning machine is ready to do what you command :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22c153d4200b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>