⚡ AI Models Quick Summary

Ultra-quick reference for all 11 models

Perfect for quick lookup - what each model does and which to use

📋 All 11 Models at a Glance

Detection Models (8 models)

These find and label objects/text in drawings.

# Model What It Finds Speed
1 canvas_ocr Dimension tolerances, beveling, instructions 40ms
2 welding_symbol_detection Welding symbols (fillet, butt, groove, etc) 20ms
3 surface_roughness_detection Surface finish symbols (Ra 3.2, etc) 50ms
4 thickness_estimation Thickness specifications 15ms
5 manufactured_size_estimation Size/dimension marking regions 15ms
6 geometric_tolerance_detection 14 types of tolerance specs 60ms
7 part_table_recognition Tables with parts lists 100ms
8 material_shape_classification Material shape (cylinder, cube, plate, etc) 10ms

Feature Model (1 model)

Converts images to numerical vectors.

# Model What It Does Output
9 deep_feature_v2 Convert image to 1024-dimensional vector 1024 numbers

Classification Models (2 models)

Binary classification decisions.

# Model What It Decides Use Case
10 drawing_or_not_classification Is this a technical drawing? Preprocessing filter
11 dummy_inference Returns "hello world" Testing only

ðŸŽŊ Which Model to Use?

Detect Welding Symbols
Use: welding_symbol_detection
Extract Surface Roughness
Use: surface_roughness_detection
Extract Dimensions/Tolerances
Use: canvas_ocr
Geometric Tolerance Specs
Use: geometric_tolerance_detection
Extract Parts Table
Use: part_table_recognition
Identify Material Shape
Use: material_shape_classification
Find Similar Drawings
Use: deep_feature_v2
Check if Image is Drawing
Use: drawing_or_not_classification
Detect Thickness Specs
Use: thickness_estimation
Find Size Markings
Use: manufactured_size_estimation

🏗ïļ Architecture Patterns

Simple Pattern (2 models)

Image → Model → Result

Models: drawing_or_not_classification, material_shape_classification

Detection Pattern (3 models)

Image → YOLOX detection → NMS filtering → Result

Models: welding_symbol_detection, thickness_estimation, manufactured_size_estimation

Detection + OCR Pattern (4 models)

Image → YOLOX → Find text → Rotate text → Recognize text → Result

Models: canvas_ocr, surface_roughness_detection, geometric_tolerance_detection

Complex Pattern (1 model)

Image → Detection → Table Structure → Text Detection → Text Recognition → Assembly → HTML/CSV Result

Models: part_table_recognition

Feature Extraction Pattern (1 model)

Image → EfficientNet-B2 → GeM Pooling → 1024-dim vector

Models: deep_feature_v2

🚀 API Usage Pattern

All models follow the same HTTP API pattern:

POST /predict Content-Type: application/json { "image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABA..." } Response: { "detections": [...], "model_version": "v1.2.3", "inference_time_ms": 45 }
Framework: LitServe (9 models) or FastAPI (2 models)
Input: Base64-encoded image
Output: JSON with model-specific results

📊 Performance Specs (on GPU)

Fastest (< 20ms)

Model Speed
drawing_or_not_classification 5ms
deep_feature_v2 10ms
material_shape_classification 10ms
thickness_estimation 15ms
manufactured_size_estimation 15ms

Medium (20-50ms)

Model Speed
welding_symbol_detection 20ms
canvas_ocr 40ms

Slowest (50ms+)

Model Speed
surface_roughness_detection 50ms
geometric_tolerance_detection 60ms
part_table_recognition 100ms

🛠ïļ Technology Stack

Deep Learning
PyTorch, YOLOX, EfficientNet-B2, BERT, Vision Encoder-Decoder
Serving
LitServe (9 models), FastAPI (2 models)
Image Processing
OpenCV, PIL, Pydantic validation
Infrastructure
Kubernetes (GKE), Docker, Git tags for versioning

⚡ Key Facts

  • 📊 Total models: 11
  • ðŸŽŊ Detection-based: 8
  • 🚀 Using YOLOX: 8
  • 🔧 Using LitServe: 9
  • ⚙ïļ Using FastAPI: 2
  • 📁 Lines of code: 50,000+
  • ðŸ’ū Model size (total): ~2GB
  • ðŸ–Ĩïļ GPU memory per pod: 4-8GB
  • ⏱ïļ Avg inference time: 30-50ms on GPU
  • 📈 Typical throughput: 50-200 req/sec per pod

📖 Real-World Example

Analyzing a Technical Drawing

Input: Technical Drawing ↓ [drawing_or_not_classification] → "Yes, it's a drawing" ↓ [canvas_ocr] → "Tolerance: ±0.05mm" ↓ [welding_symbol_detection] → "Fillet weld at (100, 200)" ↓ [surface_roughness_detection] → "Ra 3.2 ξm" ↓ [geometric_tolerance_detection] → "Perpendicularity: 0.05mm to datum A" ↓ [part_table_recognition] → Extracts table (if exists) ↓ [deep_feature_v2] → [1024-dim vector for search] ↓ Structured Output JSON

🆘 Common Issues & Fixes

Problem Cause Solution
CUDA out of memory Model too large Use GPU with more VRAM or CPU mode
Low accuracy Blurry/small image Ensure input image quality and size
Slow inference (>500ms) Using CPU Use GPU instead
Wrong detections Overlapping boxes Lower NMS threshold
↑