DeepInspect3D - 3D Mesh Inspection with Open3D-Based Point Cloud Alignment, Defect Localization, and Metric Evaluation
DeepInspect3D delivers an extensible 3D inspection pipeline for high-precision geometric defect detection in mechanical components. It integrates photorealistic synthetic rendering using Blender, point cloud generation, multi-stage filtering, FPFH+ICP alignment, and deviation field analysis against CAD ground truth, enabling automated metrology-grade evaluation and quality assurance.
DeepInspect3D/
├── notebook/
│ └── inspection_pipeline.ipynb # Unified inspection notebook
├── scripts/ # Modular inspection stages
│ ├── render.py # Blender-based RGB/Depth/Normal rendering
│ ├── pointcloud.py # STL → PLY conversion
│ ├── preprocess_pointcloud.py # Denoising, voxelization, normals
│ ├── register_pointcloud.py # Global (FPFH) + ICP registration
│ ├── detect_defects.py # Deviation analysis + defect mask
│ └── evaluation_metrics.py # Chamfer, deviation, precision/recall
├── data/
│ ├── reference_master.stl # CAD ground truth model
│ ├── test_scanned.stl # QA scanned model
│ └── processed/
│ ├── reference_clean.ply
│ ├── test_clean.ply
│ └── test_aligned.ply
├── defects/
│ ├── deviation_heatmap.ply # Color-mapped geometric deviation
│ └── binary_defect_mask.ply # Thresholded defective regions
├── reports/
│ ├── metrics.json # Raw inspection metrics
│ └── inspection_report.json # Final summary
├── blender_assets/ # HDRI, textures, config
│ ├── textures/
│ ├── hdri/
│ └── config.yaml
├── requirements.txt # Python dependencies
└── README.md # Documentation and usage
-
CAD-to-Scan Inspection
Compare scanned parts against their CAD references for precise geometry verification. -
Modular Point Cloud Pipeline
Includes denoising, downsampling, normal estimation, global and local registration. -
Deviation Mapping + Masking
Visual and binary extraction of out-of-tolerance regions using thresholded spatial error maps. -
Synthetic Data Support
Procedural rendering of RGB, depth, and normal maps from.stlwith Blender (HDRI + PBR materials). -
Quantitative Evaluation
Metrics include:- Mean & Max Surface Deviation
- Chamfer Distance (bidirectional)
- Precision / Recall / F1 (if ground truth available)
| Artifact | Path |
|---|---|
| Aligned Point Cloud | data/processed/test_aligned.ply |
| Deviation Heatmap | defects/deviation_heatmap.ply |
| Binary Defect Mask | defects/binary_defect_mask.ply |
| Metric Summary | reports/metrics.json |
| Final Inspection Report | reports/inspection_report.json |
pip install -r requirements.txtPut your reference and test .stl files in the data/ directory:
jupyter notebook notebook/inspection_pipeline.ipynbFollow the notebook to:
- Convert STL to PLY
- Clean and align clouds
- Compute deviations
- Save metrics and masks
Render realistic training/inference data using Blender’s headless mode:
cd scripts
blender -b -P render.pyOutputs are saved in blender_assets/outputs/:
- RGB images
- 16-bit depth maps
- Normal maps
- Camera intrinsics (JSON)
Install via:
pip install -r requirements.txt- Mechanical QA automation
- CAD-based geometry validation
- Metrology in manufacturing
- Research in 3D defect detection
- Synthetic dataset generation for 3D vision models
- Add Mesh-to-Mesh Deviation (Not Just Point Clouds)
- Surface Defect Segmentation using Deep Learning
- Integration with Industrial 3D Scanners
I’m excited to connect and collaborate!
- Email: gbrohiith@gmail.com
- LinkedIn: https://www.linkedin.com/in/rohiithgb/
- GitHub: https://github.com/GBR-RL/
This project is open-source and available under the MIT License.
🌟 If you like this project, please give it a star! 🌟
