bazadactyl / neural-networks

🧠 Using neural networks for text, face, and general image recognition.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Neural Networks

We studied neural networks and applied them to text recognition and face recognition as part of the COMP4107 course at Carleton University.

This work was done by myself, Basim Ramadhan, and my partner Christian Abbott.

General Image Recognition on Tiny Imagenet

For our end-of-course project, we aimed to classify images from the Tiny Imagenet dataset.

Sample images from Tiny Imagenet

We referred to network structures and techniques use by YOLO and AlexNet, and made derived simplified versions that we could run on a single GTX 970 GPU card.

After plenty of troubleshooting, parameter tweaking and experimenting, we achieved a top-1 accuracy of 30%.

Check out our report here.

Text Recognition

Using feed-forward neural networks

We used neural networks to recognize numbers from the MNIST dataset.

Sample images from the MNIST dataset

Check out the write-up.

Our best model achieved an accuracy of 96%:

Chart of error rate for our best performing model

Experimenting with Hopfield networks

We experimented with using Hopfield networks to remember images using Storkey's and Hebb's learning rules for later retrieval.

See part 1 of this write-up.

Accuracy attained with Hebb's vs. Storkey's rules

Accuracy attained with Hebb's vs. Storkey's rules

Visualization of a Hopfield ntwork

Visualization of a Hopfield Network

Image restoration from a Hopfield network

Image restoration from a Hopfield network

Experimenting with self-organizing maps (SOM)

Continuing with the MNIST dataset, we experimented with using SOMs to recognize the hand-written numbers.

See part 2 of this write-up.

Visualizing the state of a SOM

Visualizing the state of a SOM

K-means clustering of the MNIST data reduced to 2D

K-means clustering of the MNIST data reduced to 2D

Face Recognition

We used neural networks to recognize faces from the LFW dataset.

See part 3 of this write-up.

We were able to achieve an accuracy of 83% in recognizing faces using a regular feed-forward network.

We then used principal component analysis (PCA) to reduce the size of the network and see how much accuracy it retains:

Accuracy chart for face recognition

General Image Recognition on CIFAR-10

Later in the course, we tackled the CIFAR-10 dataset, which contains images of various animals and objects.

Sample images from the CIFAR-10 dataset

We used convolutional neural networks (CNNs) for this task.

We achieved an accuracy of 75%:

CNN accuracy on the CIFAR-10 dataset

Check out our write-up here.

About

🧠 Using neural networks for text, face, and general image recognition.


Languages

Language:Jupyter Notebook 37.6%Language:Python 27.5%Language:C 25.2%Language:HTML 5.5%Language:TeX 3.9%Language:Makefile 0.1%Language:CSS 0.1%Language:Shell 0.0%