{"id":21842535,"url":"https://github.com/reshalfahsi/quantum-transfer-learning-metastases","last_synced_at":"2026-04-18T17:36:53.918Z","repository":{"id":264720928,"uuid":"894201985","full_name":"reshalfahsi/quantum-transfer-learning-metastases","owner":"reshalfahsi","description":"Quantum Transfer Learning for Lymph Node Metastases Detection","archived":false,"fork":false,"pushed_at":"2024-11-25T23:59:06.000Z","size":1941,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-28T14:27:44.330Z","etag":null,"topics":["googlenet","inception","inceptionv1","lymph-node-metastasis","medical-image-classification","pennylane","pytorch","pytorch-lightning","quantum-computing","quantum-machine-learning","quantum-transfer-learning"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reshalfahsi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-25T23:53:51.000Z","updated_at":"2025-01-06T12:03:14.000Z","dependencies_parsed_at":"2024-11-26T00:40:05.621Z","dependency_job_id":null,"html_url":"https://github.com/reshalfahsi/quantum-transfer-learning-metastases","commit_stats":null,"previous_names":["reshalfahsi/quantum-transfer-learning-metastases"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reshalfahsi/quantum-transfer-learning-metastases","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reshalfahsi%2Fquantum-transfer-learning-metastases","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reshalfahsi%2Fquantum-transfer-learning-metastases/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reshalfahsi%2Fquantum-transfer-learning-metastases/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reshalfahsi%2Fquantum-transfer-learning-metastases/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reshalfahsi","download_url":"https://codeload.github.com/reshalfahsi/quantum-transfer-learning-metastases/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reshalfahsi%2Fquantum-transfer-learning-metastases/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31978595,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T17:30:12.329Z","status":"ssl_error","status_checked_at":"2026-04-18T17:29:59.069Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["googlenet","inception","inceptionv1","lymph-node-metastasis","medical-image-classification","pennylane","pytorch","pytorch-lightning","quantum-computing","quantum-machine-learning","quantum-transfer-learning"],"created_at":"2024-11-27T22:12:27.274Z","updated_at":"2026-04-18T17:36:53.897Z","avatar_url":"https://github.com/reshalfahsi.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quantum Transfer Learning for Lymph Node Metastases Detection\n\n\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://colab.research.google.com/github/reshalfahsi/quantum-transfer-learning-metastases/blob/master/Quantum_Transfer_Learning_for_Lymph_Node_Metastases_Detection.ipynb\"\u003e\u003cimg src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"colab\"\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n\u003c/div\u003e\n\n\n\u003cp align=\"center\"\u003e \u003cimg src=\"https://github.com/reshalfahsi/quantum-transfer-learning-metastases/blob/master/assets/quantum-googlenet.png\" alt=\"quantum-googlenet\" \u003e \u003cbr /\u003e The Quantum GoogLeNet model. The quantum layer: the QAOA-inspired ansatz embedding, the particle-conserving entangler, and the expectation value of the Pauli Z operator. \u003c/p\u003e\n\n\nTransfer learning may make training on a particularly distinguishable dataset easier. It enables several elements of a pre-trained model to be used as the foundation of a new model's architecture. More importantly, we can adopt this approach in quantum machine learning as well. In this project, we seek to implement quantum transfer learning using an ImageNet-pre-trained model, which will be used on the PCam dataset to tackle the lymph node metastases detection problem. The pre-trained model is GoogLeNet (i.e., Inception V1), and the classifier uses hybrid classical-quantum fully connected layers. Typically, quantum layers are made up of embedding, quantum circuits, and measurement. The embedding and quantum circuits are built upon the QAOA-inspired ansatz and particle-conserving entangler, respectively.\n\n\n## Experiment\n\nConsider exploring this [notebook](https://github.com/reshalfahsi/quantum-transfer-learning-metastases/blob/master/Quantum_Transfer_Learning_for_Lymph_Node_Metastases_Detection.ipynb) to conduct the experiment by yourself.\n\n\n## Result\n\n## Quantitative Result\n\nThe quantitative results are outlined in the following table.\n\nTest Metric | Score |\n----------- | ----- |\nAccuracy | 80.29%\nLoss | 0.464\n\n\n## Accuracy and Loss Curves\n\n\u003cp align=\"center\"\u003e \u003cimg src=\"https://github.com/reshalfahsi/quantum-transfer-learning-metastases/blob/master/assets/loss_curve.png\" alt=\"loss_curve\" \u003e \u003cbr /\u003e The model's loss curve on the train and validation sets. \u003c/p\u003e\n\n\u003cp align=\"center\"\u003e \u003cimg src=\"https://github.com/reshalfahsi/quantum-transfer-learning-metastases/blob/master/assets/acc_curve.png\" alt=\"acc_curve\" \u003e \u003cbr /\u003e The model's accuracy curve on the train and validation sets. \u003c/p\u003e\n\n\n## Qualitative Result\n\nThis 3×3 image grid presents the qualitative result.\n\n\u003cp align=\"center\"\u003e \u003cimg src=\"https://github.com/reshalfahsi/quantum-transfer-learning-metastases/blob/master/assets/qualitative.png\" alt=\"qualitative\" \u003e \u003cbr /\u003e . \u003c/p\u003e\n\n\n## Citation\n\nIf you find this repository useful for your research, please cite it:\n\n```\n@misc{quantum-transfer-learning-metastases,\n   title = {Quantum Transfer Learning for Lymph Node Metastases Detection},\n   url = {https://github.com/reshalfahsi/quantum-transfer-learning-metastases},\n   author = {Resha Dwika Hefni Al-Fahsi},\n}\n```\n\n\n## Credit\n\n- [Going deeper with convolutions](https://arxiv.org/pdf/1409.4842)\n- [PatchCamelyon (PCam)](https://github.com/basveeling/pcam)\n- [Rotation Equivariant CNNs for Digital Pathology](https://arxiv.org/pdf/1806.03962)\n- [Transfer learning in hybrid classical-quantum neural networks](https://arxiv.org/pdf/1912.08278)\n- [Quantum embeddings for machine learning](https://arxiv.org/pdf/2001.03622)\n- [Quantum algorithms for electronic structure calculations: particle/hole Hamiltonian and optimized wavefunction expansions](https://arxiv.org/pdf/1805.04340)\n- [PennyLane: Automatic differentiation of hybrid quantum-classical computations](https://arxiv.org/pdf/1811.04968)\n- [Turning quantum nodes into Torch Layers](https://pennylane.ai/qml/demos/tutorial_qnn_module_torch)\n- [PyTorch Lightning](https://lightning.ai/docs/pytorch/latest/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freshalfahsi%2Fquantum-transfer-learning-metastases","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freshalfahsi%2Fquantum-transfer-learning-metastases","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freshalfahsi%2Fquantum-transfer-learning-metastases/lists"}