Feature Extraction
Feature Extraction
Every image is composed of a 3-D matrix, with each dimension representing one of the RGB colors. Each value represents a number between 0 and 255 and showcases the intensity of that specific color. Looking at both ends of the spectrum, an image where each of the RGB values is (0,0,0) would be black and an image where each of the RGB values is (255,255,255) would be white. This concept is demonstrated in the figure on the right.
Source: GeeksForGeeks
When performing image analysis or computer vision, comparing each individual RGB coordinate often doesn't provide significant differences between classes of objects. For example, some cats and dogs have similar fur coats and it would be difficult to differentiate them based on color pixels alone. Furthermore, most images in our data set do not have just a cat and dog against a clean background. Therefore, other objects and colors can affect the classification results. Using each RGB coordinate as a feature also requires a lot of computationally memory and power which another disadvantage.
In our project, we explore two feature extraction techniques: Gray Scale Pixel Values & Edge Extraction
Our group also looked into Object Extraction which involves completely removing the background of an image. However, due to the complexity of this technique, we weren't able to fully implement it. This technique involves the gray-scale and edge extraction techniques from above, as well as contour mapping and area thresholding. Once we have finished these extractions we can create a mask for the image and apply it to the image eliminating the background.
Here is our code for reference:
In the future, we would like to work with pre-trained models to perform feature extraction. While, we had to estimate the settings for our dataset, pre-trained models are able to determine the best parameters. This would make feature extraction much more accurate. Models such as the VGG-16 would be very useful for this, but due to computational memory and power are beyond the scope of this project.