Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/reshalfahsi/quantum-lenet

Image Recognition with Quantum LeNet
https://github.com/reshalfahsi/quantum-lenet

image-classification image-recognition lenet mnist pennylane pytorch pytorch-lightning quantum-computing quantum-lenet quantum-machine-learning

Last synced: about 2 months ago
JSON representation

Image Recognition with Quantum LeNet

Awesome Lists containing this project

README

        

# Image Recognition with Quantum LeNet


colab


quantum-lenet
The Quantum LeNet model. The quantum layer consists of embedding, quantum circuits, and measurement.

Quantum computing has shaped our future hope of accomplishing calculations one million times faster than before. Its uses have influenced many things, including machine learning. Such collaboration, known as quantum machine learning (QML), has allowed quantum computers to perform a variety of machine learning tasks. In this project, we will look at how a quantum-based deep-learning model performs image classification on the MNIST dataset. The quantum-based model is a combination of classical and quantum layers. The model is based on LeNet and includes a quantum fully connected layer. The classical and quantum layers are implemented using PyTorch and PennyLane, respectively.

## Experiment

Entangle yourself with the implementation using the following [link](https://github.com/reshalfahsi/quantum-lenet/blob/master/Image_Recognition_with_Quantum_LeNet.ipynb) to see the experiment in action.

## Result

## Quantitative Result

The following table displays the quantitative outcomes.

Test Metric | Score |
----------- | ----- |
Accuracy | 96.40%
Loss | 0.364

## Accuracy and Loss Curves

loss_curve
The model's loss curve on the train and validation sets.

acc_curve
The model's accuracy curve on the train and validation sets.

## Qualitative Result

Here, the qualitative results are laid out in the image grid format.

qualitative
Nine of ten MNIST digits have their corresponding input images along with the predicted and ground-truth labels exposed to view.

## Citation

If you think this repository is helpful for your research, you may cite it:

```
@misc{quantum-lenet,
title = {Image Recognition with Quantum LeNet},
url = {https://github.com/reshalfahsi/quantum-lenet},
author = {Resha Dwika Hefni Al-Fahsi},
}
```

## Credit

- [Gradient-Based Learning Applied to Document Recognition](http://vision.stanford.edu/cs598_spring07/papers/Lecun98.pdf)
- [PennyLane: Automatic differentiation of hybrid quantum-classical computations](https://arxiv.org/pdf/1811.04968)
- [Turning quantum nodes into Torch Layers](https://pennylane.ai/qml/demos/tutorial_qnn_module_torch)
- [PyTorch Lightning](https://lightning.ai/docs/pytorch/latest/)