Research demo · open/synthetic data
Industrial NeRF Factory
Problem
Industrial AI models for manufacturing (e.g. robotic inspection and manipulation) need large, diverse, accurately-labeled training data, but capturing real-world data for every part, angle, lighting condition, and defect type is slow and expensive. The goal was to build a NeRF-based pipeline that reconstructs an industrial target in 3D from a set of multi-view camera images, then renders unlimited photorealistic novel views and physics-based synthetic defects (scratches, cracks, dents, contamination) so that downstream inspection/robotics AI can be trained on automatically-labeled synthetic data, plus a digital twin and domain-randomized simulation for sim-to-real robot training.
What I built
- NeRF core, from scratch: implemented an Instant-NGP-style NeRF in PyTorch (multi-resolution hash encoding + tiny MLP, src/.../core/nerf_engine.py) with volume rendering and marching-cubes mesh export — reused by the acoustic and hyperspectral variants.
- Synthetic-data pipeline: built a physics-based DefectInjectionEngine (scratch/crack/dent/contamination) and a SyntheticDataGenerator that produces labeled datasets (COCO export) for training inspection AI without manual annotation.
- Solo developer of the full platform end-to-end (backend + ML): a modular architecture spanning NeRF synthetic data, digital twin, sim-to-real, and multimodal variants behind a FastAPI/Typer API+CLI (Celery/Redis, PostgreSQL, MinIO/S3, Docker, Prometheus/Grafana), with a 500+ test-function pytest suite across 31 files.
Design decisions
-
Physics-based defect injection for automatically-labeled synthetic data
Rather than capturing rare real defects, a DefectInjectionEngine modifies the trained NeRF's density/color fields to synthesize scratches, cracks, dents, and contamination, and SyntheticDataGenerator renders large labeled datasets (e.g. 10,000 images, COCO export) for inspection-AI training. This is the actual 'synthetic data' mechanism in the repo (more so than novel-view rendering alone).
The differentiator: rather than capture rare real defects, the DefectInjectionEngine perturbs the trained NeRF density/color fields to synthesize scratches, cracks, dents, and contamination, then exports automatically-labeled training data (COCO). -
Implement an Instant-NGP-style NeRF from scratch in PyTorch instead of binding the native CUDA library
The NeRF core (src/industrial_nerf_factory/core/nerf_engine.py) implements multi-resolution hash encoding (MultiResHashEncoding) plus a small MLP in the style of Instant-NGP, with a docstring fast-training goal of <5 min (an aspirational target, not a measured benchmark). This same encoding is reused by the acoustic and hyperspectral NeRF variants. Nerfstudio and tiny-cuda-nn are listed as dependencies but are not imported in the source, and the native NVIDIA Instant-NGP CUDA library is not wired in; the implementation is the project's own from-scratch PyTorch reimplementation.
-
Camera pose estimation: COLMAP is referenced as the intended production path but not integrated
Camera poses can be supplied directly to the NeRF engine; where poses are missing (e.g. plant_nerf), the code generates a mock circular trajectory and explicitly notes 'For production use, integrate with COLMAP or OpenCV SfM' (src/.../agriculture/plant_nerf.py). COLMAP-based pose estimation is documented as future work, not implemented; the pipeline currently relies on supplied poses or a synthetic circular trajectory.
-
Domain randomization for sim-to-real robot training
The sim-to-real approach is visual + physics domain randomization (src/.../robotics/domain_randomization.py) wrapping a Gymnasium NeRF environment, with PPO policy training and a success-rate evaluation computed over simulated episodes. The robot's NeRF rendering is a mock stub (returns random RGB/depth), so transfer is not validated on hardware and no real sim-to-real success rate is measured; the technique implemented is domain randomization, not a separate learned domain-adaptation method.

Side-by-side comparison illustrating the sim-to-real concept: synthetic renderings generated from the digital twin alongside reference captures, highlighting the visual + physics domain-randomization technique used to bridge the simulation gap. Transfer is evaluated in simulation only; no real-robot deployment or measured degradation is shown. -
FastAPI + Celery/Redis service architecture (not Ray/gRPC)
The backend is a FastAPI REST API with a Celery/Redis task queue, SQLAlchemy + PostgreSQL, and MinIO/S3 storage, containerized via Docker/docker-compose with Prometheus + Grafana monitoring scaffolding. ray[tune] is a dependency for hyperparameter search, but there is no Ray distributed-cluster training and no gRPC anywhere in the code; the architecture is single-node, not a distributed training cluster.
-
Multimodal NeRF variants: acoustic and hyperspectral
Beyond RGB NeRF, the platform extends the radiance field to predict sound intensity (AcousticNeRF, for 3D sound-source localization and predictive maintenance) and 128-band spectra (HyperspectralNeRF, 400-1000nm, for material-level QC), reusing the shared hash encoding. These are framed as novel research directions.
-
Quality metric capture is scaffolded, not measured
The data model stores a nullable best_psnr field, and the platform is intended to evaluate rendering quality; however SSIM and LPIPS are not computed anywhere in the source and no PSNR/SSIM/LPIPS values are committed. Rendering-quality metrics are scaffolded for storage only, not measured; no fidelity numbers are claimed.
In operation




Engineering foothold
| Claim | Evidence |
|---|---|
| Sim-to-real success rate is computed in simulation only, not measured on real hardware | The code computes success_rate = n_success / n_episodes over simulated episodes (rl_trainer.py / sim_to_real.py) with a mock NeRF renderer; there is no real-robot measurement. The '>95%' figure in the README Key Features table and sim_to_real.py docstring is an aspirational target, not a measured result, and is not claimed here. |
| Multi-view image inputs drive NeRF training (per-target view count is supplied at runtime, not a fixed constant) | The NeRF engine consumes a set of multi-view images with camera poses; there is no fixed '36'-viewpoint constant anywhere in the source, so no specific viewpoint count is claimed. |
| ~14k LOC of core platform source (~23k including tests/scripts) | src/ = 14,256 LOC across 34 .py files; whole repo = 23,079 LOC (find . -name '*.py' | xargs wc -l). The README/badges/citation '15,704 lines' figure is a stale self-reported sum and does not match the current tree. |
| 500+ test functions across 31 test files | Current suite has 511 test functions (grep -rE 'def test_' tests/ | wc -l) across 31 test files. (README/badges say '157 tests' and an older TEST_ANALYSIS_REPORT.md counted '114+' — both stale snapshots.) No committed pytest run/coverage report exists, so the count is a static collection figure, not a pass-status figure. |
| End-to-end pipeline is architected and demo-runnable, not a validated production deployment | Architecture/README describe a full data-collection -> NeRF -> synthetic-data -> training -> deployment flow, and modules exist for each stage. The validation reports (ULTRATHINK_VALIDATION_REPORT.md, COMPREHENSIVE_CODE_VALIDATION_REPORT.md) rate it 'demo/research level' (데모 가능 / 프로덕션 불가) with 5 unfixed Critical issues and mock stages (robot NeRF render, SfM pose estimation). |
| Novel view synthesis from arbitrary unseen camera positions | The NeRF engine supports rendering novel views from arbitrary poses (nerf_engine.render), the core capability of NeRF. No committed quantitative fidelity (PSNR/SSIM/LPIPS) exists for the rendered views, so the capability is claimed structurally, not with a measured photorealism score. |
| Rendering-quality metric storage is scaffolded (best_psnr field), but SSIM/LPIPS are not implemented and no values are measured | Only best_psnr (a nullable DB column) exists; SSIM and LPIPS are not computed anywhere in src, and no metric values are committed. PSNR is scaffolded for storage; SSIM/LPIPS are not implemented and no measured fidelity values exist, so none are claimed. |
| Physics-based synthetic defect generation with automatic labels | DefectInjectionEngine implements scratch/crack/dent/contamination by modifying NeRF density/color, and SyntheticDataGenerator.generate_dataset produces labeled images (COCO export). Verified in src/.../core/defect_injection.py and core/synthetic_data.py and README usage examples. |
Tech stack
- 3D Reconstruction / NeRF
- NeRF (custom PyTorch), Instant-NGP-style hash encoding, PyTorch, Open3D / Trimesh, scikit-image (marching cubes)
- Synthetic Data / Vision
- Physics-based defect injection, OpenCV / Kornia, COCO-format dataset export, Albumentations
- Robotics / Sim-to-Real
- Gymnasium, PPO (Stable-Baselines3), Visual + physics domain randomization
- Multimodal NeRF
- Acoustic NeRF (librosa / pyroomacoustics), Hyperspectral NeRF (128 bands)
- Backend / Infrastructure
- FastAPI, Celery + Redis, SQLAlchemy + PostgreSQL, Alembic, MinIO / S3, Docker / docker-compose, Prometheus + Grafana
- Quality Metrics
- PSNR (stored field, scaffolded)