Ussop is a premium, production-ready AI visual inspection system that combines high-speed object detection (Faster R-CNN) with precise edge segmentation (NanoSAM) to automate quality control in industrial manufacturing environmentsβall engineered to run exceptionally fast on standard CPUs.
β CPU-Only β No GPU required, runs on standard industrial PCs β Fast Deployment β Hours to deploy, not months β Precise Segmentation β SAM masks enable accurate measurements β Cost-Effective β 1/3 the price of competitors like Cognex β Industrial Grade β Modbus TCP, MQTT, OPC-UA, REST API β Production Ready β 70+ API endpoints, JWT auth, audit logging β Premium UI/UX β Modern 'OS-in-Browser' TypeScript dashboard with fluid light & dark modes β Real-Time Telemetry β Live WebSockets rendering advanced Chart.js KPI analytics β Multi-Station Fleet β Centralized panoramic overview across all connected production lines β AI Query β Natural language questions about your inspection data β On-Device Retraining β Fine-tune models from active-learning annotations
Frontend (OS-in-Browser UI)
- React 18 (Vite + TypeScript)
- Tailwind CSS (Custom Olive Brand Tokens, Fluid Typography, 12px Radii System)
- Radix UI & Phosphor Icons (Accessible, Premium Aesthetics)
- Chart.js (Real-time Analytics, Scatter Plots & Pareto Visualizations)
Backend (Performant Web Engine)
- FastAPI (Async, high-throughput REST + WebSockets)
- SQLAlchemy & Alembic (Robust ORM & Database Migrations)
- PyJWT (Secure RBAC Authentication & Session Management)
- Redis & Prometheus (Caching and Real-time Telemetry)
AI & Computer Vision Core
- PyTorch & OpenVINO (CPU-Optimized Inference Engine)
- Faster R-CNN (Real-time Defect Object Detection)
- NanoSAM (Sub-millisecond Instance Segmentation)
- Transformers/VLM (Natural Language Scene Understanding)
graph TD
classDef frontend fill:#4EA5D9,stroke:#333,stroke-width:2px,color:#fff;
classDef core fill:#2A4494,stroke:#333,stroke-width:2px,color:#fff;
classDef ml fill:#F05D5E,stroke:#333,stroke-width:2px,color:#fff;
classDef storage fill:#2892D7,stroke:#333,stroke-width:2px,color:#fff;
classDef ext fill:#44CFCB,stroke:#333,stroke-width:2px,color:#fff;
UI(React SPA Dashboard):::frontend
API(FastAPI Backend):::core
subgraph Inspection Engine
Det(Faster-RCNN Detection):::ml
Seg(NanoSAM Segmentation):::ml
OV(OpenVINO Optimizer):::ml
end
subgraph Services
AL(Active Learning):::core
VLM(Vision Language Model):::core
Wkr(Background Workers):::core
end
subgraph Storage layer
DB[(PostgreSQL / SQLite)]:::storage
Cach[(Redis Cache)]:::storage
FS[(Local Image Storage)]:::storage
end
subgraph Hardware & Integrations
Cam[Cameras / CCTV]:::ext
PLC[Modbus / OPC-UA / MQTT]:::ext
end
UI <-->|REST & WebSockets| API
Cam -->|Image Streams| API
API <--> Det
Det --> Seg
Seg --> OV
API <--> AL
API <--> VLM
API <--> Cach
API <--> DB
API <--> FS
Wkr <--> DB
Wkr <--> Cach
API -->|Hardware Signals| PLC
sequenceDiagram
participant Cam as Camera
participant API as Server (FastAPI)
participant ML as Inspector (CV)
participant DB as Database
participant UI as Dashboard (WebSockets)
participant EXT as PLC / OPC-UA
Cam->>API: 1. Send Frame (Trigger)
API->>ML: 2. Process Image
Note over ML: Detect Objects (Faster R-CNN)
Note over ML: Generate Masks (NanoSAM)
Note over ML: AI Query Description (VLM)
ML-->>API: 3. Inspection Results
API->>DB: 4. Save Record & Images
API->>EXT: 5. Signal Modbus/OPC-UA/MQTT
API->>UI: 6. Push Live Update (WS)
cp .env.example .env # fill in secrets
docker compose -f docker/docker-compose.yml up -d
# API: http://localhost:8080
# UI: http://localhost:8080
# Grafana: http://localhost:3001 (admin / admin)# 1. Download models
python scripts/download_models.py
# 2. Install dependencies
pip install -e ".[full]"
# 3. Setup database
python scripts/migrate.py upgrade
# 4. Start API
cd ussop && python run.py
# 5. Start frontend dev server (separate terminal)
cd ussop/frontend && npm install && npm run dev
# Access at http://localhost:8080ussop-project/
βββ ussop/ # Production application package
β βββ api/ # FastAPI app + 70+ endpoints
β βββ services/ # Core domain services (inspector, models, etc.)
β βββ integrations/ # Modbus TCP, MQTT, Webhooks, OPC-UA server
β βββ models/ # SQLAlchemy ORM (9 tables)
β βββ config/ # Pydantic settings loading
β βββ frontend/ # React 18 + TypeScript + Vite SPA
β βββ tests/ # 437 tests across 13 files β all passing
β βββ worker.py # Background workers (batch, training, alerts)
β βββ run.py # Application entry point
βββ alembic/ # Database migrations
βββ docs/ # Comprehensive documentation
βββ examples/ # Reference implementations (legacy ML code)
βββ scripts/ # Utility scripts (download_models.py, migrate.py)
βββ docker/ # Docker configuration (Nginx, Prometheus, Grafana)
βββ pyproject.toml # Dependencies (PEP 517)
βββ .env.example # Configuration template
βββ README.md # This file
| Document | Description |
|---|---|
| API Reference | All REST + WebSocket endpoints |
| Deployment Guide | Docker + bare-metal setup |
| Customer Onboarding | 8-step go-live guide |
| Architecture | Technical design |
| Roadmap | Product roadmap |
- Minimum: Intel Core i5-10400 (6+ cores), 16GB RAM, 256GB SSD, Win10/Ubuntu 20.04
- Recommended: Intel Core i7-12700 (12 cores), 32GB RAM, 512GB NVMe SSD, Ubuntu 22.04 LTS
Interactive Swagger docs available at http://localhost:8080/docs
| Method | Path | Description |
|---|---|---|
POST |
/api/v1/inspect |
Upload and inspect image |
GET |
/api/v1/inspections |
List inspection history |
GET |
/api/v1/statistics |
Dashboard statistics (cached 30s) |
POST |
/api/v1/query |
Natural language query |
POST |
/api/v1/models/deploy |
Hot-swap inference model |
GET |
/api/v1/opcua/status |
OPC-UA server status |
WS |
/ws/dashboard |
Real-time dashboard push |
- Inference: < 1s on Intel i5 (MobileNet + NanoSAM)
- Throughput: 30+ inspections/minute
- Accuracy: > 85% mAP (Detection), > 80% IoU (Segmentation)
# Run all tests (437 passing tests)
cd ussop
pytest tests/ -v- Create a branch:
git checkout -b feature/name - Make changes and test:
pytest tests/ -v - Commit:
git commit -am "Add feature" - Push and open a Pull Request
- License: MIT License β See LICENSE file for details.
Ussop v2.0 β Sniper precision. Enterprise ready. "Every defect is a target, and we never miss."
