SYSTEM ARCHITECTURE

[INFRASTRUCTURE NOTE]
To strictly enforce the Green AI mandate and eliminate idle cloud compute costs, the live multi-container pipeline (Spring Boot, PostGIS, PyTorch) is currently hibernating. This live demo simulates the edge routing logic. The complete backend orchestration and C++ spatial code are available for review on GitHub.

The Compute Constraint & Optimized AI:
While deploying an image classifier is straightforward with access to heavy GPU clusters in the cloud, this project was designed around strict, artificial compute constraints. Drawing from enterprise-grade systems engineering, the goal was to architect an "Optimized AI" microservices pipeline capable of running locally on standard CPU edge devices. By minimizing the computational footprint, we drastically reduce energy consumption and latency while maintaining production-level accuracy for comic book cover identification.

1. Spatial Caching via C++ (The Gatekeeper):
Because neural network inference is inherently computationally expensive, the architecture deliberately avoids spinning up the machine learning engine right away. Instead, a highly optimized, native C++ microservice layer intercepts incoming requests. It calculates a byte-level Perceptual Hash (pHash) of the image and evaluates it against a local spatial database. If it finds an exact geometric match, the system returns the metadata instantly—bypassing the ML layer entirely and saving massive compute cycles.

2. Machine Learning & Edge Intelligence:
When a cache miss occurs, the system triggers the Machine Learning pipeline. The payload is forwarded to a Python FastAPI endpoint running a PyTorch vision model. To strictly maintain optimization, the system utilizes a lightweight MobileNetV3 backbone. By aggressively pruning weights and applying INT8 Dynamic Quantization (compressing 32-bit floating-point parameters down to highly efficient 8-bit integers), the model achieves near-instant inference with significantly reduced memory utilization and power draw.

Project Credits

Special thanks to Aidan P. and Decagon for their invaluable contributions to dataset engineering, edge-case testing protocols, and frontend web deployment.