An quick introduction to an experiment on classifying chest x-ray images of COVID-19 using FastAI

Image for post
Image for post
Photo by Owen Beard on Unsplash

SARS-CoV-2 or Severe Acute Respiratory Syndrome Coronavirus 2 has taken the world by storm. Nations are locked down to prevent the spread, economies are taking a nose dive, unemployment rates are going through the roof and amidst all of this healthcare system is being stress tested all around the world. We’ve all seen numerous exponential curves and how we all need to play our part to flatten the curve to prevent overwhelming the healthcare system. …


Understanding how an Autoencoder works and building a simple Autoencoder in Python

Image for post
Image for post
Photo by Alexandru Goman on Unsplash

Deepfakes are lately garnering widespread attention in media primarily because of being used to spread fake news, financial frauds, hoaxes and more. Deepfakes is a portmanteau of Deep Learning and Fake where usually a person in an image or a video is replaced by a different person. While creating synthetic videos and editing pictures to generate fake content is not a new concept but this technology uses techniques in deep learning and artificial intelligence to morph images and videos so that the the resulting content has a very high potential to deceive. Look at a small example below —

Image for post
Image for post
Source: Wikipedia

The original video on the left of the actress Amy Adams is modified to have the face of actor Nicolas Cage on the right. An early landmark paper was published in 1997 by Christoph Bregler, Michele Covell and Malcolm Slaney on Video Rewrite: Driving Visual Speech with Audio where they modified existing video footage of a person speaking to depict that person mouthing the words contained in a different audio track. It was the first system to fully automate this kind of facial reanimation, and it did so using machine learning techniques to make connections between the sounds produced by a video’s subject and the shape of the subject’s face. And a lot of academic research has been done on this subject after that to improve the techniques and to include the whole face and then the whole body in morphing. Although the technology uses a lot of techniques from artificial intelligence and deep learning we will discuss one of the core components behind this technology — Autoencoders.


Things to keep in mind before starting a machine learning project

Image for post
Image for post
Photo by Alvaro Reyes on Unsplash

Starting a machine learning project can be fun and overwhelming at the same time. There is a lot to take care of — gathering data, domain knowledge, data cleaning, train/test splits, hyperparameter tuning, model size and speed constraints and so on. Managing all of them effectively to build a good model requires a lot of experience and learning. But with some guidelines in mind we can structure our project better to avoid a lot of rework and over optimization. Lets take an example for illustration. Suppose you have a project where you need to build a system which helps to identify cancer cells in an image of microscopic view of tissues. You set up a system which gives you an accuracy of 90% but this is not good enough for your system. You might have a lot of ideas on how to improve your system, for example getting more training data, maybe getting more diversified training data or maybe you can train the algorithm longer using a specific optimization algorithm or change the network architecture or use different activation functions. You have a lot of things to try out but the problem is if you choose poorly you may end up spending a lot of time only to realize that the method you chose barely improved the performance of the system. …


A no machine learning approach to automatically extract highlights from a sports video

Image for post
Image for post
Photo by Vienna Reyes on Unsplash

It’s finished at Sunderland, Manchester United have done all they can. Manchester City are still alive here. Balotelli. Agueroooooooooo!!!. I swear you’ll never see anything like this ever again. So watch it, drink it in. They’ve just heard the news at The Stadium of Light. Two goals in added time for Manchester City to snatch the title away from Manchester United, stupendous!
— Martin Tyler

Arguably one of the most dramatic moment in Premier League history when virtually the last strike from Sergio Aguero won Manchester City the 2011–12 Premier League title by 3–2. …


Building an intuitive understanding of the Bayes Theorem and Naive Bayes Classifier

Image for post
Image for post
Photo by Riho Kroll on Unsplash

You wake up one morning feeling a bit unwell and you decide to pay a visit to the physician. The physician after basic examinations runs some tests for a rare disease which happens to only 1 in a thousand people. You are extremely worried and you go and order the tests. Unfortunately the results come out positive and you rush to the doctor to find out whether the tests are accurate or not. The doctor tells that the tests identify the disease with an accuracy of 99%. What is the possibility that you have that disease? At the outset it may seem pretty likely that you have got the disease one would say that there is a 99% probability that you have got the rare disease because that is how accurately the tests predict but Thomas Bayes would disagree! Thomas Bayes was an English statistician, philosopher and Presbyterian minister who is known for formulating the theorem that bears his name: Bayes’ theorem. …


Datasets are not perfect. Use these techniques to deal with missing data points in your dataset

Image for post
Image for post
Photo by Vilmos Heim on Unsplash

After starting a machine learning or a data science project you begin your EDA or exploratory data analysis hoping to find interesting patterns and insights about the data before you go on to extract features and build your model. But it is very common to find a lot of values missing in your data. These missing values arise due to many factors not in your direct control. Sometimes due to the ways the data was captured. In some cases the values are not available at all for observation. Nevertheless you will need to handle those missing values before you move further. Lets look at the ways to do that. To be honest there isn’t a single standard technique or a general solution to handle missing values but there are a few ways which you can use depending upon your use case to help you deal with missing values in your data. …


Introduction to how Alexa, Siri and Google wake up when you call their name

Image for post
Image for post
Photo by Sebastian Scholz (Nuki) on Unsplash

Is google always listening to what I say? How does it wake up when I say OK Google? Are personal assistants like Google, Alexa and Siri always spying on me by listening to all my conversations? Questions like these have crossed everyone’s mind. Rather than answering these questions with a straight yes or no lets understand the technology behind these devices and understand how do they wake up when we call their name.

You now know a lot about sequence modelling and how it is done using Recurrent Neural Networks (RNN) and Long Short Term Memory (LSTM) and you might have also built an RNN. The systems which wake up on listening to a specific word are called trigger word detection systems and such problems within sequence modelling are known as trigger word detection problems. The literature on trigger word detection is still evolving so there isn’t a consensus yet on the best trigger word detection algorithm. We will try to understand one implementation of such a system using Keras. This implementation requires some familiarity with concepts of RNN, GRU and Neural Networks. …


Powerful deep learning algorithm widely used in sequence modelling

Image for post
Image for post
Photo by ian dooley on Unsplash

Take about 30 seconds to stare at the above picture. Now close your eyes and try to recall the items you saw in the picture. How many were you able to recall? If you were able to recall all the items then you have a pretty good working memory. Our brains store information like this in the working memory and forgets it after sometime. It is very unlikely that you will remember all these items till tomorrow. Working memory is also sometimes called short-term memory. You use this working memory in lot of daily tasks like organizing your desk, your work, driving, constructing sentences etc. Consider this sentence — The bus, which went to Paris, was full. To construct this sentence correctly you need to remember that the subject which is the bus is a singular therefore towards the end of the sentence you have to use was. The same sentence with a plural subject becomes — The buses, which went to Paris, were full. …


Computational thinking is set to change the way we work and the skills we will need in the future

Image for post
Image for post
Photo by Dragos Gontariu on Unsplash

World is changing and it is changing at a blinding pace. Problem solving, analyzing the validity of solutions and spotting patterns in data — these are all essential skills for the workplace of the future and are now taught in schools grouped under the title of computational thinking. This term has been much discussed amongst educationalists as schools get to grips with a new computing curriculum designed to equip pupils with such skills, and to reduce the skills gap between education and the workplace. So what actually is computational thinking?

It is the thought processes involved in problem solving, so that the solutions are represented in a form that can be effectively carried out by an information-processing agent, such as a computer. Core concepts involved in computational thinking include but are not limited…


How to build a basic RNN using the NumPy library in Python

Image for post
Image for post
Photo by Justin Campbell on Unsplash

Sequences are beautiful and complex and they are ubiquitous. The videos we consume, the text we read, the language we speak, the events in our life, everything has an order which enables us to comprehend them. Just looking at the opening picture you understood that the correct sequence of the skateboarder’s poses goes from left to right. It would be really odd if a video of these poses played in the reverse order. We are programmed to understand sequences easily. Without much effort you are able to scroll your eyes through the characters in this article and intuitively you are able to understand words and sentences. But if the characters were not in the correct sequence it would have been elbisneherpmocni (that’s just incomprehensible written in the incorrect order). We had discussed the algorithms which help computers understand sequences in the previous article about introduction to Recurrent Neural Networks. …

About

Prateek Karkare

Observe.Learn.Repeat | Artificial Intelligence, Electronics, Music, Travel

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store