页面简介
6 deep learning applications using API & open source codes. A beginner in machine learning / deep learning can build these in minutes using Python
正文摘录
India's Most Futuristic AI Conference Is Back – Bigger, Sharper, Bolder d : h : m : s Get Details Interview PrepCareerGenAIPrompt EnggChatGPTLLMLangchainRAGAI AgentsMachine LearningDeep LearningGenAI ToolsLLMOpsPythonNLPSQLAIML Projects Reading list Introduction to Deep LearningWhat is Deep Learning?DL vs ML vs AIWhy Deep Learning is So Popular? Feed Forward NetworksApplications of Deep LearningMulti Layer PerceptronVisualizing the Neural NetworkUnderstanding Decision BoundaryForward and Backward Propagation Intuition Gradient DescentGradient Descent AlgorithmVariants of Gradient Descent Algorithm Loss FunctionIntroduction to Loss FunctionBinary and Categorical Cross Entropy Activation FunctionsWhy Do We Need Activation Functions?Linear Activation FunctionSigmoid and Tanh FunctionSoftmaxHow to Select Right Activation Function? Introduction to Neural networksPerceptronWeights in PerceptronIntroduction to Artificial Neural Network Forward and Backward PropagationUnderstanding Forward Propagation MathematicallyUnderstand Backward Propagation MathematicallyImplementing Neural Networks in Python OptimizersProblems with Gradient DescentGradient Descent with MomentumAdagrad and Adadelta Learning Rate SchedulersIntroduction to Learning Rate Schedulers NN on Structured DataOverview of Deep Learning FrameworksImplementing Neural Networks using KerasFunctional API in KerasImplementing Neural Networks using KerasHyperparameter Tuning of MLP in Keras Improving the Deep Learning ModelUnderstanding Early stoppingUnderstanding DropoutVanishing and Exploding GradientsWeights Initialization TechniquesImplementing Weight Initializing TechniquesBatch NormalizationImage Augmentation TechniquesImage Generator and Fit GeneratorModel CheckpointingImplementing Model CheckpointingDealing with Class ImbalanceEnsemble Deep Learning Deep Learning Model OptimizationIntroduction to GPU and TPUTensorRT Unsupervised Deep LearningIntroduction to Unsupervised LearningHow to Solve Unsupervised Learning Problems?Introduction to AutoencodersImplementing Autoencoders AutoDLA Beginners Guide to Codeless Deep Learning Model DeploymentTensorFlow ServingBuild Deep Learning Models for Android Introduction to PyTorchIntroduction to PyTorch and TensorsMathematical and Matrix Operations in PyTorchImportant PyTorch ModulesImplement CNN in PyTorchTransfer Learning in PyTorchWorking with Text Data in PyTorchBuilding a RNN model in PyTorchAutoencoders in PyTorch 6 Deep Learning Applications a beginner can build in minutes (using Python) Faizan Shaikh Last Updated : 19 Apr, 2023 11 min read Introduction Deep Learning has been the most researched and talked about topic in data science recently. And it deserves the attention it gets, as some of the recent breakthroughs in data science are emanating from deep learning. It’s predicted that many deep learning applications will affect your life in the near future. Actually, I think they are already making an impact. However, if you have been looking at deep learning from the outside, it might look difficult and intimidating. Terms like TensorFlow, Keras, GPU based computing might scare you. But, let me tell you a secret quietly – it is not difficult! While cutting edge deep learning will take time and effort to follow, applying them in simple day to day problems is very easy. It is also fun. I kind of re-discovered the fun and curiosity of a child while applying deep learning. Through this article, I will showcase 6 such applications – which might look difficult at the outset, but can be achieved using Deep Learning implementation in less than an hour. This article is written to showcase these ground-breaking works and give you a taste of how they work. Let’s start! P.S. We assume that you would know basics of Python. If not, just follow this tutorial and then you can start from here again. Table of Contents Applications using existing APIs Advantages & Disadvantages of Deep Learning API Colorize photos using Deep Learning with Algorithmia API Building a ChatBot with Watson API News Aggregator based on Sentiment with Aylien API Open Sourced Applications Advantages & Disadvantages of Open Sourced Code Sentence Correction with Deep Learning Convert Male portraits to female and vice-versa with Deep Learning Build a deep reinforcement learning bot to play Flappy Bird Other Notable Resources 1. Applications using existing APIs APIs are nothing but a software running on the other side of the internet in a remote PC which can be accessed locally. For example, you plug in bluetooth speakers to your laptop even if your machine might have inbuilt speakers. So, we are able to access the speaker remotely while sitting on our laptop. APIs work on similar concept – some one has already done the hard work for you. You can use it to solve the problem at hand quickly. For more details on API, read here. I’ll list out some advantages and disadvantages of building apps using API. 1.1.1 Advantages of Deep Learning API’s A usual deep learning application requires heavy computation power in terms of GPU’s and data storage / processing. So you can set a workstation of your own (or use any of the cloud services) and use any system locally to access the workstation and run your applications. Local system is not burdened by the computations New functionalities can be integrated easily 1.1.2 Disadvantages of Deep Learning API’s Building an API may not be effective in terms of cost. An API requires both time and resources to develop and maintain, which is somewhat tedious. You are limited by the internet connection. If you connection fails anytime, the whole system breaks down. Your application is exposed security wise, as anyone can access it easily. Here you have to put extra security layers like username and password to access the service and limiting how many times you can access in a duration If you want to know more about what API’s are, check out this blog Let’s start with our applications! 1.2 Colorize photos using Deep Learning (Algorithmia API) Automated Image Colorization has been a topic of interest among the computer vision community. It seems surreal to get a colorful photo of a black and white image. Imagine a 4-year old picking up a crayon and gets engrossed in his coloring book! Could we teach an artificial agent do the same and just “imagine” stuff? Of course, this is a hard problem! This is because we as humans get “trained” each and every day by seeing how things are colored in real life. We might not notice but our brain is capturing each moment of our lives and extracting meaningful information from it, such as sky is blue and grass is green. This is hard to model in an artificial agent. A recent study shows that if we train a neural network enough on a large number of the especially prepared dataset, we can essentially get a model which could “hallucinate” colors in a grayscale image. Here’s a demonstration of an image colorizer: To practically implement this, we use an API developed by Algorithmia. Requirements and Specifications: Python (2 or 3) Internet connection (for calling API endpoint) 12 algorithmia credits (Although credits are paid, algorithmia provides 5000 credits free on signup) Step 1: Register on Algorithmia and get your own API key. You can find your API key in your profile Step 2: Install algorithmia by typing pip install algorithmia Step 3: Select a photo you want to colorize and upload it to the data folder provided by algorithmia. Step 4: Create a file locally and name it trial1.py . Open it and write the code as below. Notice that you have to insert the location of your image in data folder and API key import Algorithmia input = { "image": "data:// … " # Set location of your own image } client = Algorithmia.client(‘…’) #insert your own API key algo = client.algo('deeplearning/ColorfulImageColorization/1.1.5') print algo.pipe(input) Step 5: Open command prompt and run your code by typing “python trial.py”. The resulting output will be automatically saved in your data folder. Here’s what I got: That is it – you have just created a simple application which acts as a child and can fill in colors in images! Exciting stuff. 1.3 Building a ChatBot (Watson API) Watson is a great example to show what an artificial agent can achieve. You may have heard the story of Watson beating humans at a Question and Answering game. Although Watson uses an ensemble of many techniques for working, deep learning still is a core part of its learning process, especially in natural language processing. Here we would use one of the many applications of Watson, to build a conversation service, aka chatbot. A chatbot is an agent that respond as humans do on common questions. It can be an excellent point of contact to customers and respond to them in a timely manner. Here we would use one of the many applications of Watson, to build a conversation service, a.k.a chatbot. A chatbot is an agent that respond as humans do on common questions. It can be an excellent point of contact to customers and respond to them in a timely manner. Here’s a demonstration of the platform: Requirements and Specifications: Python (2 or 3) Internet connection (for calling API endpoint) An active Bluemix account (trial period lasts for 30 days) Let’s see a step-by-step example of how to build a simple chatbot with Watson. Step 1: Register on Bluemix and activate your conservation services to get your credentials Step 2: Open terminal and run command as below: pip install requests responses pip install --upgrade watson-developer-cloud Step 3: Make a file trial.py and copy the following code in it. Remember to put your own credentials in it. import json from watson_developer_cloud import ConversationV1 conversation = ConversationV1( username='YOUR SERVICE USERNAME', password='YOUR SERVICE PASSWORD', version='2016-09-20') # replace with your own workspace_id workspace_id = 'YOUR WORKSPACE ID' response = conversation.message(workspace_id=workspace_id, messag