Techniques
Out of class DSP techniques
We experimented with a number of out of class DSP techniques. Click the following links to read about our work on feature extraction, KNN & Decision Trees, and CNN.
We experimented with a number of out of class DSP techniques. Click the following links to read about our work on feature extraction, KNN & Decision Trees, and CNN.
Our project utilized many techniques we saw in class this semester including convolution, image filtering, linearity, and translation invariance. We will now discuss how these come into play in our project.
Convolution/Image Filtering
A CNN consists of many hidden layers, each of which are a unique filter. The CNN "passes" the input layers through the various hidden layers to create an output layer. During this process, the input features are convolved with the filters to extract local patterns and produce an output layer. We had two CNN models one of which had 16 hidden layers. Therefore, in training and testing these models we used convolution many times.
We also used convolution for our edge extraction work. In order to extract the edge of images, we convolved our input image with a Gaussian filter kernel. This was used to blur out noise and extract only the significant edges.
During preprocessing, we transformed our image to the gray-scale using a filter from the CV2 library.
In object extraction, we use edge extraction techniques and contour area mapping techniques to create a "mask" for the image. The mask is used to filter out the background of the image.
Change of Bias
In our project, we used PCA and LDA to determine if the features we extracted (gray-scale or edges) were significant in distinguishing between cats and dogs. These algorithms project the original dataset onto a new bias showcasing the greatest variability of components.
PCA, is an unsupervised technique that reduces the dimensionality of a dataset to find the main contributing components. It projects, the data set onto a new bias, where only components of highest variability are considered.
LDA, is a supervised technique that reduces the dimensionality of a dataset, while taking the classes/labels into consideration. It projects, the dataset onto a new bias, where the components that distinguish the classes the most are considered.
Linearity and Translation Invariance
In a CNN, the weights and biases are the same for all neurons in a single hidden layer. This means that each hidden layer detects one feature in the images. Therefore, translation or resizing of an image won't affect accuracy or classification, because the model will still be able extract those specific features.