Thursday, January 19, 2017

New Page - What is Deep Learning?

Deep Learning is the latest trend in Machine Learning. We hear about new innovations in Deep Learning every day, to a point that it has started to become a household name. Big companies such as Google, Apple, Amazon, Microsoft, IBM, and many others seems to be pushing for Deep Learning.

But, do you know what Deep Learning really is?

http://www.codesofinterest.com/p/what-is-deep-learning.html

Since it's one of the most frequent questions that comes up, I created a new page "What is Deep Learning?" which talks about what Deep Learning is, how it relates to Machine Learning and Artificial Intelligence, and their history. Have a look at it from the below link,


Let me know what you think of Deep Learning.

Build Deeper: Deep Learning Beginners' Guide is the ultimate guide for anyone taking their first step into Deep Learning.

Get your copy now!

Friday, January 13, 2017

Stepping into audio classification - Getting started with PyAudio

I've had an idea to attempt to train a deep learning model that can classify different audio noises. Having a system that can accurately identify different sounds would have implications in many fields, from medical diagnostics to echo locations systems, among others. I wouldn't expect building such a system would be an easy task. But, let's give it a try.

I first had the idea about 8 years back. But back then, libraries that enable audio processing were scarce, and what was available required a massive effort to get installed. Now it seems that things have improved a lot. I myself was searching online for audio processing libraries for Python, and I came across this excellent post - Realtime Audio Visualization in Python - by Scott Harden of University of Florida.

Realtime Audio Visualization with PyAudio
Realtime Audio Visualization with PyAudio

The tutorial uses the PyAudio Python package (PyAudio homepage), which is the Python bindings for PortAudio (PortAudio homepage) - a cross-platform audio I/O library - allowing PyAudio to give a consistent interface to process audio across platforms. So, I decided to give PyAudio a try. First of all, I needed to install PyAudio.

Installing PyAudio


At the time of this writing, the latest version of PyAudio is v0.2.9, and the PyAudio team has made the installation as simple as possible.

Sunday, January 8, 2017

Installing OpenCV from source on Anaconda Python on Ubuntu 16.10

I recently switched to Linux for my Machine Learning experiments, and I did a post on How to install Keras and Anaconda Python on Ubuntu 16.10.

Now, I wanted to install OpenCV on Ubuntu also. Since OpenCV does not have a pre-built package for Linux, it meant I had to compile OpenCV from source.

OpenCV 3.1 running on Lubuntu 16.10
OpenCV 3.1 running on Lubuntu 16.10

Adrian of PyImageSearch has recently done a post about how to compile OpenCV on Ubuntu 16.04 using virtualenv. I followed his steps as a base, but had to make numerous adjustments to some of the packages which gets installed (e.g. libpng-dev, libhdf5-serial-dev) and the build commands due to the changes from Ubuntu 16.04 to 16.10, and because I'm using Anaconda environments rather than virtualenv.

I'll be installing OpenCV 3.1, and will be using the Lubuntu 16.10 virtual machine which I used in my earlier post. But the steps and commands will be exactly the same for any flavor of Ubuntu 16.10.

First, as a habit, get and install the latest updates for Ubuntu,
 sudo apt-get update   
 sudo apt-get upgrade   

Then (if you have not done already) install the necessary build tools,
 sudo apt-get install build-essential cmake git unzip pkg-config  

Then, we install the following packages which allows OpenCV to interact with various image and video formats,
 sudo apt-get install libjpeg8-dev libtiff5-dev libjasper-dev libpng-dev  
 sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev  
 sudo apt-get install libxvidcore-dev libx264-dev  

Note: on Ubuntu 16.04, the package name for libpng was libpng12-dev. But on 16.10, it should be libpng-dev.