$ show mymagicpower/AIAS
This repository is a comprehensive AI inference and application platform built primarily on Java (Spring Boot) and Vue.js. It provides a suite of SDKs for computer vision (face recognition, OCR, segmentation), NLP (text embedding, translation), and AIGC (Stable Diffusion, ControlNet). The architecture is modular, separating inference logic (SDKs) from application logic (Web Apps, Desktop Apps, API Platform). It utilizes Deep Java Library (DJL) for model inference, integrating PyTorch and ONNX Runtime backends. The system supports multimodal search (Face, Image, Code, Text) using vector databases like Milvus. Hybridity: While it contains AI research components (models, inference), the codebase is structured as a production-ready software platform with web interfaces, APIs, and desktop wrappers, rather than a research notebook collection. It functions as a monorepo containing multiple distinct Spring Boot applications and Vue.js frontends, each serving a specific AI task (e.g., face_search, image_search, aigc_image_gen).
The LLM identified 3 files worth highlighting for reuse:
Implements a synchronized predictor pool pattern for managing Deep Java Library (DJL) model instances. This component handles the lifecycle of AI model predictors (load, inference, close) using wait/notify mechanisms to optimize resource usage under concurrent load. It is reusable for any DJL-based inference task requiring connection pooling.
Encapsulates sentence embedding logic using SentencePiece tokenization and a pre-trained encoder model. It provides a clean interface for converting text inputs into float vector embeddings suitable for similarity search. The implementation is self-contained and can be adapted for different NLP models.
Defines Spring @Bean configurations for initializing AI models as application-scoped or singleton beans. It centralizes model loading parameters (device, pool size) and integrates with the application context. This pattern allows for consistent model management across different API services.