As a beginner, it is often observed that we tend to focus more on writing code that gets the job done and less on how it is being done. Very little thought is given to the design of the overall application and best practices that should be followed. While that is okay for a beginner, as we move forward in our programming journey, we need to consider other aspects of the application as well, before we can move the code to production. Proper logging is one of those aspects that differentiates intermediate or advanced developers from a newbie. In this article, we will learn the basics of ‘Logging’ module of Python. …
I have been thinking of trying out Streamlit for a while. So last weekend, I spent some time tinkering with it. If you have never heard of this tool before, it provides a very friendly way to create custom interactive Data web-apps for your Data Science and Machine Learning projects using Python. You can interact with the user to get inputs and display dynamic charts, tables, maps etc. Their official gallery might be a good place to start. It will give you a glimpse of what you can achieve with Streamlit. You would also find a long list of tweets from the Streamlit community going creative with the tool in their own unique ways. Do check them out for some inspiration. …
A Quick Response Code or a QR Code is a two dimensional bar code consisting of grid of tiny black squares on a white background. Due to its ability to store more information and fast readability, it gained popularity over the traditional bar codes composed of black bars and white spaces.
Python offers a QRCode package which makes it really easy to implement this functionality. We will begin by downloading the following python packages.
pip install pillow
pip install qrcode
For the purpose of this demo, I am using the page link to one of my articles (Face Detection in 10 Lines). …
In one of my previous articles on Open-CV, (Face Detection in 10 lines), we explored the basics of face detection in an image or video. Building on that, here we will see how to detect any moving objects in the frame. While you are away on holiday, you could use this motion detection logic to write a program that will then raise an alarm or send a message to your phone. In this article, we will focus on identifying and tracking any moving object in the video feed from our webcam using open-cv and playing an audio message using pyttsx3 library which is an offline text to speech module. …
If you are curious about machine learning and always wanted to learn about Artificial Neural Network but never really got started, this article is for you. The purpose of this article is to nudge absolute beginners into their neural network journey by exploring some of the fundamental concepts in plain English. We will look at the fundamental building block of a neural network and its basic components. We will also explore Perceptron basics and its components.
A biological neuron is the basic unit of the human brain, which is specially designed to transmit information to other nerve cells, muscle, etc. This is done by a network consisting of billions of connected neurons. As shown in the simplified figure below, a neuron takes some inputs (through dendrites), processes them, and provides outputs (through axons). If the combination of input electrical signals is above a certain threshold, it results in firing or activation of the neuron. The same principle of firing/activation is used in artificial neurons as well. The Artificial Neural Networks (ANN) is inspired by this arrangement of biological neurons in our brains and its basic unit is called a neuron or a Perceptron. …
A wise friend once told me that one of the Dad’s job is to make happy memories for their kids.
It all started last month, on a Sunday evening, when I was playing with my one year old daughter, Aaria, in our balcony. The love for watching the sun set is something we both share. While we were sitting, she enthusiastically picked up one of the letters from her alphabet themed play-mat and hid her face behind it, giving me her signature toothy smile. She was imitating the way we play peekaboo with her. Like all new parents, I rushed to pick up my phone to capture her playful expressions. As I was clicking her pictures, a thought occurred, “Why not make a collage with them?”. With the Mother’s Day weeks away, I thought of taking pictures of her holding a different letter each day and stitch them together into a single photograph that says- ‘Happy Mother’s Day’. Sweet! Also, due to ongoing lock down situation, the options to order something online were limited. …
In this story, we will build an application using Python that will accept voice commands from the user and perform certain GUI based actions using the mouse and keyboard. You can think of it as you own voice-enabled digital assistant. It can play media, open applications, send emails, move around the mouse pointer and a lot more, all triggered by your voice commands. We will accomplish by using the following two python libraries — PyAutoGUI & Speech_Recognition. All you need is a laptop with Python installed and a microphone.
Before getting into details of how the above-mentioned tools are used in this demo, let us see how they fit into the design of our application. …
The CNN or convolutional neural networks are the most commonly used algorithms for image classification problems. An image classifier takes a photograph or video as an input and classifies it into one of the possible categories that it was trained to identify. They have applications in various fields like driver less cars, defense, healthcare etc. There are many algorithms for image classification and in this experiment, we are going to look at one of the most popular algorithms in this genre, called SqueezeNet by DeepScale.
Our goal is to design an application that will use a webcam(or an external camera) as an input device and it will then identify and classify the gesture into one of the categories that we are going to define. In this article, we will see how we can use the SqueezeNet algorithm to design an application that takes different gestures and then triggers certain actions. In short, we can send some commands to our computer (without touching that keyboard or the mouse). Let’s put on our magician’s hat! …
I was recently exploring the Haar Cascade object detection module of the OpenCV for a personal side project. Although there are a lot of technical materials on the internet in this area, my focus on this article is to explain the concepts in easy layman’s terms. I hope this will help the beginners in understanding Python’s OpenCV library in a simple manner.
In this demo, we will take an image and search for human faces in it. We are going to use a pre-trained classifier to perform this search. I plan on sharing some more articles on how we can train our own models in future. …
About