How salkeomkar578-lab/quantum-secured-pashu-aadhaar works
Quantum Cow is a proof-of-concept for identifying livestock from muzzle images, securing biometric payloads with simulated BB84 QKD and AES, and matching them against a cloud registry. The documented path runs from edge capture through detection, image enhancement, embedding, encryption, offline buffering or transmission, and API-side identification. Benchmarking compares classical and quantum approaches. The README documents the end-to-end flow; sampled code confirms the benchmark, BB84 encryption, and API/database responsibilities. Several phase modules were not sampled, so their internal calls are not inferred.
Main entry points: phase4_edge_inference.py Edge inference · phase4_api_server.py FastAPI receiver · phase1_yolo_detection.py Muzzle detector · phase2_qimp_simulation.py QIMP filtering
Components 14
Edge Vision
- Muzzle detector
phase1_yolo_detection.py - QIMP filtering
phase2_qimp_simulation.py - Biometric embedder
phase1_embedding_extractor.py - Edge inference
phase4_edge_inference.py - Offline payload queue
phase4_edge_inference.py - Muzzle dataset
dataset/data.yaml
Quantum Security
- BB84 key exchange
phase3_bb84_qkd.py - AES embedding encryption
phase3_bb84_qkd.py
Cloud Registry
- FastAPI receiver
phase4_api_server.py - Cosine identification
phase4_api_server.py - Cattle registry
phase4_api_server.py
Evaluation
- Pipeline benchmark
benchmark_pipeline.py
Other components
- Farm camera
- Cloud connection
Connections 17
- Farm camera → Muzzle detector: captures images
README.md - Muzzle detector → QIMP filtering: passes muzzle ROI
README.md - QIMP filtering → Biometric embedder: passes filtered image
README.md - Biometric embedder → Edge inference: provides embedding
README.md - Edge inference → BB84 key exchange: requests secure key
README.md - BB84 key exchange → AES embedding encryption: derives encryption key
phase3_bb84_qkd.py - Edge inference → AES embedding encryption: encrypts embedding
README.md - Edge inference → Offline payload queue: caches offline
README.md - Edge inference → Cloud connection: sends payload
README.md - Offline payload queue → Cloud connection: flushes on reconnect
README.md - Cloud connection → FastAPI receiver: delivers payload
README.md - FastAPI receiver → Cosine identification: routes identification
README.md - Cosine identification → Cattle registry: matches against
README.md - FastAPI receiver → Cattle registry: registers cattle
phase4_api_server.py - Muzzle dataset → Muzzle detector: configures training data
README.md - Pipeline benchmark → QIMP filtering: evaluates quantum path
benchmark_pipeline.py - Pipeline benchmark → BB84 key exchange: evaluates security
benchmark_pipeline.py