🏗ïļ Model Architecture Reference

Visual diagrams and architectural breakdowns for all 11 AI models

1
canvas_ocr - Technical Drawing OCR

Extracts dimension tolerances, fit tolerances, beveling specifications, and special instructions from technical drawings.

Processing Pipeline:
Input Image (2048×2048) ↓ [YOLOX Detection] ← Locates tolerance symbols ↓ [Bounding Boxes] ← Where each symbol is ↓ [Angle Classification] ← Rotates text to horizontal ↓ [Text Recognition (BERT)] ← Reads the text ↓ [Post-processing] ← Validates & formats output ↓ JSON Response: {detections: [{class: "dimensional_tolerance", bbox: [...], value: "Âą0.05mm"}]}
Detection Classes

c_beveling, dimensional_tolerance, fit_tolerance, r_beveling, special_instructions, specified_tolerance

Framework

LitServe

Speed

40ms (GPU)

Model Type

Multi-stage (Detection + OCR)

2
deep_feature_v2 - Deep Feature Extraction

Converts a technical drawing image into a 1024-dimensional feature vector for similarity matching.

Architecture Layers:
Input Image (variable size) ↓ [Resize to 224×224] ↓ [EfficientNet-B2 Backbone] ← Pre-trained CNN │ 16 Mobile Inverted Bottleneck blocks │ Output: 1280-dimensional features ↓ [GeM Pooling Head] ← Generalized Mean Pooling │ (1280-dim → 1024-dim) ↓ [L2 Normalization] ← Make unit length ↓ 1024-dimensional Feature Vector [0.123, 0.456, -0.789, ..., 0.234]
Special Feature: Dynamic Batching - processes up to 4 images simultaneously. Much faster than individual processing (10-20ms total vs 40-80ms individual).
Backbone

EfficientNet-B2 (9M parameters)

Output

1024-dimensional vector

Speed

10ms (GPU) | 100ms (CPU)

Use Case

Similarity search, duplicate detection

3
welding_symbol_detection - Welding Symbol Detection
Detection Pipeline:
Input Image ↓ [YOLOX Detection] ← Find all symbols ├─ Classes: fillet_weld, butt_weld, groove_weld, │ spot_weld, seam_weld, plug_weld ↓ [NMS Post-processing] ← Remove overlaps ↓ Bounding boxes with confidence scores
Single Detection Model: Just YOLOX - one of the simplest architectures in the portfolio.
Model Type

YOLOX Object Detection

Speed

20ms (GPU)

Framework

LitServe

4
material_shape_classification - Material Shape Classification
Classification Pipeline:
Input Image ↓ [CNN Classifier] ← Single classification ├─ Classes: cylinder, cube, plate, angle stock, │ channel, etc. ↓ Output: {shape: "cylinder", confidence: 0.92}
Model Type

CNN Classification

Speed

10ms (GPU)

5
part_table_recognition - Part Table Extraction

Most complex model with 7-stage pipeline for extracting structured table data.

Complex Multi-Stage Pipeline:
Input Image ↓ [YOLOX Detection] ← Locate table region ↓ [Table Region Extraction] ← Crop to boundaries ↓ [Table Transformer (ONNX)] ← Understand structure │ (Recognizes rows/columns) ↓ [SAHI Text Detection] ← Find text in cells │ (Sliced detection for large images) ↓ [Angle Classification] ← Determine rotation ↓ [Text Recognition (BERT)] ← Read cell values ↓ [Table Assembly] ← Reconstruct HTML/CSV ↓ Structured Table Output
Table Transformer: Special model trained to understand table structure. Uses ONNX format for optimized inference.
Pipeline Stages

7 sequential stages

Speed

100ms (GPU)

Output

HTML table or CSV

6
surface_roughness_detection - Surface Roughness Extraction

Complex OCR pipeline for detecting roughness symbols and extracting numeric values.

Surface Roughness Detection Pipeline:
Input Image ↓ [YOLOX Detection] ← Find roughness symbols (Ra, Rz) ↓ [SAHI Text Detection] ← Find numeric values │ Sliced Aided Hyper Inference │ Handles large images by tiling ↓ [Angle Classification] ← Determine text rotation │ (0°, 90°, 180°, 270°) ↓ [BERT Text Recognition] ← Read "3.2", "Ξm", etc. ↓ [Post-processing] ← Extract and validate values │ â€Ē Parse numeric value │ â€Ē Extract unit (Ξm, mm) │ â€Ē Validate against standards ↓ Output: {roughness_value: 3.2, unit: "Ξm", type: "Ra"}
Pipeline Type

Symbol detection + text recognition

Special Feature

SAHI for fast large image processing

Speed

50ms (GPU)

All Models Speed Comparison

5ms
drawing_or_not
10ms
deep_feature_v2
15ms
thickness_est
20ms
welding_detect
40ms
canvas_ocr
50ms
surface_rough
60ms
geometric_tol
100ms
part_table

Component Technologies

Detection Component: YOLOX

Architecture:
Input Image ↓ [Backbone] ← ResNet-style feature extraction ↓ [Neck] ← FPN (Feature Pyramid Network) │ Multi-scale feature combination ↓ [Head] ← Dense predictions per grid cell │ For each cell: [x, y, width, height, confidence, class_probs] ↓ [NMS (Non-Maximum Suppression)] ↓ Final Detections

Feature Extraction: EfficientNet-B2

Layer Structure:
Input Image (224×224) ↓ [Mobile Inverted Bottleneck Block #1] ↓ [Mobile Inverted Bottleneck Block #2] ↓ [... 16 blocks total ...] ↓ [Global Average Pooling] ← Spatial dimension reduction ↓ 1280-dimensional feature vector

Text Recognition: BERT vs Vision Encoder-Decoder

BERT (Used by canvas_ocr, surface_roughness_detection):

Text Image → Visual Encoding → BERT Processing → Text Output (Simple, fast, good for standard OCR)

Vision Encoder-Decoder (Used by geometric_tolerance_detection):

Text Image → Visual Encoder → Decoder (BERT-based) → Text Output (Advanced, more accurate for complex technical text)

Latency Optimization

GPU vs CPU Performance

Model GPU (NVIDIA T4) CPU (4 cores) Speedup
drawing_or_not_classification 5ms 50ms 10×
deep_feature_v2 10ms 100ms 10×
canvas_ocr 40ms 400ms 10×
part_table_recognition 100ms 1000ms 10×

Dynamic Batching (3 models)

Request 1 ─┐ Request 2 ─â”Ī Request 3 ─┾→ [Batch of 4] → Process once → Return 4 responses (much faster) Request 4 ─┘ Request 5 ─┐ Request 6 ─â”ī→ [Batch of 2] → Process → Return 2 responses Without batching: Process individually 6× → slow With batching: Process 2 batches → fast
↑