Learned Linear Algebra from Gilbert Strang's lectures.
- Resumed Machine Learning course by Andrew Ng on Coursera.
- Had completed upto week 4 before.
- Resumed from week 5.
- Since it was my birthday, I decided to apply the knowledge that I have gained so far before proceeding further with learning process.
- Searched for projects and found MNIST Model was the best thing to train to get good hold of concepts as a beginner.
- Trained the MNIST model for Digit Classification.
- By Using Tensorflow.
- Created a neural network model with 2 hidden layers, an input layer and an output layer.
- Achieved accuracy near to about 97% after using 'Sigmoid' as an activation function.
- Trained the MNIST model for Digit Classification again but this time I used Convolutional Neural Network or CNN.
- By Using Tensorflow.
- Created a neural network model with 3 convolutional layers, a fully connected layer and an output layer.
- Achieved accuracy near to about 97.5% after using 'Sigmoid' as an activation function and AdamOptimizer.
- Trained the MNIST model for Digit Classification again using Convolutional Neural Network or CNN.
- By Using tflearn.
- Created a neural network model with 2 convolutional layers, and 2 fully connected layers.
- Achieved accuracy near to about 97.5% after using 'Relu' and 'Softmax' as activation functions and AdamOptimizer.
- Trained the MNIST model for Digit Classification again but this time I used Recurrent Neural Network or RNN.
- By Using Tensorflow.
- Created a BasicLSTMCell.
- Achieved accuracy near to about 98.5% after using AdamOptimizer.
- Did not understand fully, will study further about RNN in future.
- Came to know about Kaggle.
- Browsed through the website and found various competitions that were going on or were finished in the past.
- Picked the competition held in 2017 Dogs vs Cats Redux and decided to implement it using CNN.
- By using tflearn
- Created a neural network model with 6 convolutional layers and 2 fully connected layers.
- Achieved accuracy near to about 82% after using 'Relu' and 'Softmax' as activation functions and AdamOptimizer.
- Plotted the images using matplotlib to see the results.
- Completing the previous project involving classification of cats and dogs, I got interested in Image and Video Operations.
- So I started looking up as to what else can be done in this field.
- So I found OpenCV played a major role here along with Python Imaging Library or PIL.
- So started learning OpenCV.
- Learned to open or load images from local folders or access webcam using imread from cv2 library.
- Learned to display the images using imshow() from cv2 library.
- Learned to display images or plot them using matplotlib library.
- Learned to draw on the images plotted with matplotlib.
- Learned to open or load videos from local folders or access webcam using VideoCapture() from cv2 library.
- Learned to read the frames using read() function.
- Learned to convert color of frames or images using cvtColor() from cv2 library.
- Learned about the codecs and formats associated with them to save the videos read from webcam or local folder using VideoWriter from cv2 library.
- Learned to draw shapes on a loaded image using following functions of cv2 library :- i) line() ii) rectangle() iii) circle() iv) polylines()
- Learned to write text on loaded image using putText() of cv2 library.
- Learned to manipulate pixels of a loaded image.
- Pixels are just coordinates in a image containing a list of three values [Blue, Green, Red].
- cv2 loads images in BGR mode so to convert to original color we have to apply cvtColor(image, cv2.COLOR_BGR2RGB).
- We can change color of a pixel by altering BGR value at that pixel.
- We can select a part of picture and copy it over another part of the same picture.
- Learned masking in OpenCV.
- Used the following functions :- i) threshold() --> selects the parts of image between two threshold values. ii) bitwise_not() --> inverts the mask. iii) bitwise_and() --> overlaps the mask with background. iv) add() --> adds two images.
- Learned different thresholding functions :- i) threshold() --> normal threshold function. ii) adaptiveThreshold() --> gaussian threshold function. iii) threshold() --> otsu threshold function (did not understand much about it though).
- Learned color filtering in OpenCV.
- Basically color filtering creates a mask between two ranges of color values.
- First converted the color of image to hsv using cv2.COLOR_BGR2HSV then overlapped it with frames with bitwise_and() to just show that mask and black background.
- There was some noise in the background as well as on the mask though.
- Converted to hsv because color filtering works on brightness or lightness rather than the color values.
- Learned blurring and smoothing in OpenCV.
- Basically blurring and smoothing remove the noise as much as possible from the image.
- For smoothing :- i) A kernel is made which is simply an array of ones of some size e.g. 15x15. ii) Keep the kernel above a pixel and take an average of all 225 (15x15) pixels below it and replace central pixel with this average. iii) Repeat for all pixels. iv) Function used --> cv2.filter2D().
- For blurring, following functions can be used :- i) cv2.GaussianBlur() ii) cv2.medianBlur()
- Learned to apply gradients and implement edge detection.
- For gradient, following functions can be used :- i) cv2.Laplacian() --> applies laplacian blur. ii) cv2.Sobel(frame, datatype, x, y, ksize) --> applies horizontal or vertical gradient if (x=1 and y=0) or (x=0 and y=1).
- For edge detection, function that can be used --> cv2.Canny() --> converts the image into network of edges.
- Learned template matching in OpenCV.
- Function used --> cv2.matchTemplate()
- Learned corner detection in OpenCV.
- Function used --> cv2.goodFeaturesToTrack() --> detects corners in an image.
- Corner detection works best when image is grayscaled.