How harshkumar077/underwater-animal-classification-using-resnet-and-quantum-cnn works
Project type and purpose
• This is a full-stack web application for Underwater Marine Animal Classification.
• It combines a browser-based UI (HTML/CSS/JS) with a Python backend exposing REST endpoints for:
• Image classification via hybrid Quantum-CNN + ResNet/Inception pipelines
• Chatbot interactions powered by GPT-2
• Lookup of geolocation data for classified species
File structure
• Top level “index.html”, “mainscript.js”, “mainstyle.css”, “popupContact.css”, “popupcontact.js” → Single-page frontend
• “server.py” (or “main.py”) → Backend web server (Flask/FastAPI style)
• “inception_execution.py”, “resnet50_execution.py” → Model-inference modules combining classical CNNs with quantum layers
• “quantum_execution.py” (implied by “inception_execution.py” for quantum calls)
• No dedicated DB folder → Likely in-memory/static JSON or small storage of species meta
From the README
• Purpose: classify underwater animals into 23 classes using a hybrid quantum-classical CNN
• Embedded GPT-2 chatbot for contextual marine life info
• Provides location data (latitude/longitude) for species hotspots
Main components
a. User Browser (Client UI)
• index.html + mainstyle.css + mainscript.js + popup.js/css
b. Web Server/API Layer
• server.py (Flask/FastAPI) handling HTTP(S) requests
• Routes: /classify, /chat, /species-info
c. Classification Service
• ResNet50 pipeline (resnet50_execution.py)
• InceptionNet pipeline (inception_execution.py)
• Underlying Quantum CNN layers (quantum execution)
d. Chatbot Service
• GPT-2 module imported in server.py or separate chatbot.py
e. Species Metadata Store
• Static JSON or Python dict mapping class → location data
f. Optional: Quantum Simulator or External Quantum Backend
• Local quantum simulator or cloud quantum resource endpoint
Relationships and data flows
• Browser → Web Server: HTTP POST /classify with image
• Web Server → Classification Service: in-process function calls
• Classification Service → Quantum Backend: invoke quantum layer simulator
• Classification Service returns “label + confidence”
• Web Server → Metadata Store: lookup lat/long for label
• Browser → Web Server: HTTP GET/POST /chat with user message
• Web Server → GPT-2 Chatbot: in-process model inference
• Responses returned to Browser
Architectural patterns and design principles
• RESTful API boundary between frontend and backend
• Modular ML pipelines: separate scripts for each model
• Hybrid computing: classical CPU/GPU + quantum simulation
• Single-page application (SPA) frontend
• Separation of concerns: classification vs. chatbot vs. metadata