Skip to content

ArunSehrawat/Image_classification_with_CNN_and_QNN

Repository files navigation

Image classification with CNN and QNN

Image classification is a computer vision task, where a machine learning algorithm has to categorize images into predefined classes. Here, we have taken the "MNIST" and "FashionMNIST" datasets (for more details, see the attached notebooks).

The "MNIST" dataset contains images of handwritten digits from 0 to 9.

The "FashionMNIST" dataset covers ten different clothing categories, including T-shirts/tops, trousers, pullovers, dresses, coats, sandals, shirts, sneakers, bags, and ankle boots. Each image is labeled with the corresponding clothing category, providing the ground truth for training and testing.

pred_CNN


(1) In the attached Jupyter notebook Image_classification_with_CNN, I have presented the Convolutional Neural Networks (CNNs) for the task.

LeNET5

Image (LeNET-5) source: http://vision.stanford.edu/cs598_spring07/papers/Lecun98.pdf


(2) In the notebook Image_classification_with_QNN, I have presented the Quantum Neural Network (QNN) for the task. Here, the QNN consists of quantum layers followed by a classical layer at the end.

QNN


(3) Unlike Image_classification_with_QNN, we are taking only two classes 0 and 1 and taking only quantum layers in the notebook Image_classification_with_QNN_2.

QNN2


I have also uploaded:
(4) quantum circuit simulator (used in QNN)

(5) a notebook with quantum circuit examples to test the quantum circuit simulator


acc_loss_CNN