An end-to-end Industrial Digital Twin, Video Telemetry & Structural Inspection Platform for vehicle ladder-frame chassis assemblies and heavy crane fabrication (Girder 516).
feature/v3-convlstm).AutoTwin-AI v2.0 integrates real-world factory video telemetry to benchmark robotic welding against internal controller logs, monitor human manual fabrication, and enforce takt compliance across the Crane Gallery Assembly.
The robotic welding videos serve as a controlled benchmark. Vision-derived metrics are compared against the robotβs internal controller logs to validate measurement accuracy:
| Metric | Girder 516 // Inner Corner Seam (170143) |
Girder 516 // Lower Flange Seam (171604) |
|---|---|---|
| Video Duration | 228.52s (3m 48s) | 268.03s (4m 28s) |
| Total Frames | 6,860 @ 30.02 FPS | 8,046 @ 30.02 FPS |
| Arc-On Duration | 228.46s (100.0% Duty Cycle) | 267.97s (100.0% Duty Cycle) |
| Spatter Tracking | 36.87 sparks/frame (~1,106.9 sparks/s) | 86.95 sparks/frame (~2,610.2 sparks/s) |
| Peak Spatter Burst | 93 sparks (@ $t = 29.91$s) | 297 sparks (@ $t = 257.71$s) |
| Process Stability Index | 95.04% (34 frames $> 3\sigma$) | 93.29% (54 frames $> 3\sigma$) |
| Controller Log Audit | READY FOR LOG VERIFICATION | READY FOR LOG VERIFICATION |

IMG_3601.MOV)The ultimate deployment target is human fabrication workstations. Telemetry tracks manual tool engagement and correlates against standard fabrication cycle times:
| Duration: 326.01s (5m 26s) | 9,775 frames. |
crane_gallery_stages.xlsx):

The trained PyTorch Convolutional Autoencoder reconstructs baseline nominal joints and flags physical anomalies via high-intensity residual error heatmaps ($|I - \hat{I}|$):

High-density 3D spatial voxel clustering isolates structural load-bearing junctions from 361,174 CAD vertices (28000.obj):
| Top-Down Orthographic Chassis Overview | 3D Isometric CAD Perspective |
|---|---|
![]() |
![]() |
| Macro Top-Down Joint Crop (1:1 Sensor Framing) | High-Resolution Macro Perspective Detail |
|---|---|
![]() |
![]() |
Mathematical defect generator spawning irregular, distorted oxidic slag geometry directly onto the suspension weld seam for out-of-distribution anomaly validation:

flowchart TD
subgraph CADLayer ["1. CAD Ingestion & Clustering"]
CAD["Vehicle Chassis (28000.obj - 361k Vertices)"]
CLUSTER["3D Spatial Voxel Clustering"]
CAD --> CLUSTER
end
subgraph SyntheticGen ["2. Blender OptiX Synthetic Engine (GPU)"]
PBR["PBR Steel Shaders (Met: 0.85, Rough: 0.28)"]
RANDOM["Domain Randomization (Light Angle, Sun Energy, Jitter)"]
ANOMALY["Mathematical Slag / Weld Spatter Injector"]
CLUSTER --> RANDOM
PBR --> RANDOM
RANDOM --> |~0.60s / frame| BASELINE["4,850+ Normal Renders (weld_normal_*.png)"]
ANOMALY --> DEFECT_IMG["Defect Validation Frame (defective_test.png)"]
end
subgraph NeuralAI ["3. PyTorch Deep Autoencoder"]
ENC["Conv2d Encoder (256x256 -> 16x16)"]
DEC["ConvTranspose2d Decoder (16x16 -> 256x256)"]
LOSS["MSE Reconstruction Loss (|Input - Recon|)"]
BASELINE --> ENC --> DEC --> LOSS
end
subgraph BackendAPI ["4. FastAPI Gateway Service (:8000)"]
API_JOINTS["GET /api/joints (Hotspots Database)"]
API_INSPECT["POST /api/inspect (Live PyTorch Inference)"]
STATIC["Static Asset Server (/static/cad, /static/assets)"]
LOSS --> API_INSPECT
end
subgraph WebDashboard ["5. React + Three.js 3D Digital Twin (:5173)"]
CANVAS["Three.js 3D Viewport (OrbitControls + CAD Gizmo)"]
HOTSPOTS["Interactive Glowing 3D Hotspot Pins"]
SIDEBAR["Live Telemetry, Anomaly Gauges & Residual Heatmaps"]
RAYCAST["Click-to-Find CAD Coordinate Raycaster"]
STATIC --> CANVAS
API_JOINTS --> HOTSPOTS
API_INSPECT --> SIDEBAR
end
1024x1024 frames in ~0.60s β 0.80s (~80x speedup over CPU).3.0 to 8.5 energy).| Generates pixel-accurate reconstruction difference heatmaps ($ | \text{Input} - \text{Reconstruction} | $) to pinpoint localized structural defects. |
| Preset Key | Structural Joint Name | 3D CAD Coordinates $(X, Y, Z)$ | Local Vertices | Structural Details |
|---|---|---|---|---|
rear_sus_bracket (Defect Target) |
Rear Suspension Spring Perch | [1.358, 0.220, 0.500] |
18,395 | Rear spring perch tower and damper hardpoints (Slag defect test target). |
front_sus_bracket_left |
Front-Left Suspension Joint | [-1.227, 0.140, 0.398] |
29,947 | A-arm suspension mount, cross-tube weld interface, and frame rail flange. |
front_sus_bracket_right |
Front-Right Suspension Joint | [-1.185, 0.140, -0.416] |
26,822 | Symmetrical right A-arm bracket and gusset stiffener. |
engine_mount_crossmember |
Engine Mount Crossmember | [-0.644, 0.100, -0.452] |
21,557 | Heavy-duty chassis mounting bracket with reinforcement gussets. |
AutoTwin-AI/
βββ .gitignore # Ignores large raw renders & CAD binaries
βββ README.md # Complete project documentation & visual gallery
βββ requirements.txt # Python dependencies (PyTorch, FastAPI, Uvicorn, Trimesh)
β
βββ backend/ # FastAPI Backend Service
β βββ main.py # API Gateway, CAD asset server & live PyTorch inference
β
βββ frontend/ # React + Three.js 3D Web Application
β βββ package.json # Node dependencies (@react-three/fiber, three, tailwindcss)
β βββ vite.config.js # Vite dev server configuration
β βββ tailwind.config.js # Cyber-industrial theme & palette
β βββ postcss.config.js
β βββ index.html # HTML entrypoint
β βββ src/
β βββ App.jsx # Main dashboard, telemetry sidebar & heatmap modal
β βββ DigitalTwinViewer.jsx # Three.js 3D Canvas, CAD Gizmo & Hotspot Raycaster
β βββ index.css # Custom cyberpunk glow styles & scanline animations
β βββ main.jsx # React DOM entrypoint
β
βββ src/ # Core pipeline modules & algorithms
β βββ __init__.py
β βββ data_gen.py # Multi-joint synthetic dataset generator
β βββ generate_autoencoder_dataset.py # 5,000-sample domain-randomized baseline generator
β βββ data_gen_anomalous.py # Synthetic structural defect & weld slag injector
β βββ train_autoencoder_pytorch.py # PyTorch Autoencoder training & heatmap visualizer
β βββ data.py # Dataset verification & corrupted file cleaner
β βββ generate_synthetic_data.py # Multi-view reference renderer
β βββ debug_blender.py # Blender environment diagnostics
β
βββ docs/ # Documentation assets & showcase images
β βββ assets/
β βββ 01_full_top_view_true_joint.png
β βββ 02_full_isometric_true_joint.png
β βββ 03_zoomed_true_joint_top_crop.png
β βββ 04_zoomed_true_joint_isometric_detail.png
β βββ defective_test.png
β βββ reconstruction_analysis.png
β
βββ cad_model/ # Raw CAD assets (361k vertex chassis)
β βββ 28000.obj
β
βββ joint_inspection/ # Structural joint inspection metadata
β βββ joint_info.json # 3D spatial coordinates & cluster properties
β
βββ models/ # Trained neural network artifacts
β βββ autoencoder_best.pth # Best model checkpoint (PyTorch weights - 9.38 MB)
β βββ reconstruction_analysis.png
β
βββ synthetic_dataset/
βββ autoencoder_baseline/ # 4,855 domain-randomized normal baseline frames
β βββ manifest.json # Ground-truth camera/lighting metadata
βββ defective_test.png # Injected anomaly validation frame
# Clone the repository
git clone https://github.com/Arkz-Deepak/AutoTwin-AI.git
cd AutoTwin-AI
# Install Python dependencies (PyTorch with CUDA support)
pip install -r requirements.txt
# Install Frontend dependencies
cd frontend
npm install
cd ..
cd backend
python -m uvicorn main:app --host 0.0.0.0 --port 8000 --reload
(Interactive Swagger API docs available at http://localhost:8000/docs)
cd frontend
npm run dev
(Open http://localhost:5173 in your browser)
# Windows
$env:NUM_IMAGES="5000"
& "C:\Program Files\Blender Foundation\Blender 5.1\blender.exe" -b --python src/generate_autoencoder_dataset.py
# Ubuntu Linux
NUM_IMAGES=5000 blender -b --python src/generate_autoencoder_dataset.py
& "C:\Program Files\Blender Foundation\Blender 5.1\blender.exe" -b --python src/data_gen_anomalous.py
# Trains on GPU, evaluates reconstruction, and outputs 3-panel error heatmap
python src/train_autoencoder_pytorch.py
The script automatically generates models/reconstruction_analysis.png plotting:
| Anomaly Heatmap: Absolute pixel reconstruction residual ($ | I - \hat{I} | $). |
This project is licensed under the MIT License.