How addy999/omniparser-api works
Key Components to Include:
Client Layer
• Web browsers and applications (like OneQuery) that consume the API
API Layer (FastAPI Server)
• This as the entry point for all requests
• Single endpoint /process_image
• Swagger docs endpoint /docs
Model Layer
• Microsoft's OmniParser Model
• Two main components:
Infrastructure Layer
• GPU Processing Unit
• Docker Container
• (Optional) Fly.io hosting platform
Design Guidelines:
Component Organization
• [Clients] → [FastAPI Server] → [OmniParser Model] → [GPU Infrastructure]
Data Flow Representation
• Input: Image file
• Processing: Model inference
• Output:
a. Annotated image (base64)
b. Parsed elements list
Model Component should show
• Description Generation Pipeline
• Model weights loading process
Infrastructure Layer
• Docker container boundaries
• GPU allocation
• Memory requirements (16GB RAM)
Important Notes:
The clear input/output flow
Remember to maintain a balance between showing the technical complexity of the ML model while keeping the overall architecture clean and understandable.