Skip to content

A modular, high-fidelity 3D inspection framework for detecting geometric deviations in engineered components through CAD-referenced scan analysis, precise point cloud registration, and spatial deviation mapping.

Notifications You must be signed in to change notification settings

GBR-RL/DeepInspect3D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeepInspect3D Banner

DeepInspect3D - 3D Mesh Inspection with Open3D-Based Point Cloud Alignment, Defect Localization, and Metric Evaluation

Computer Vision Image Processing Python OpenCV Made with Blender Open3D

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.


Project Structure Overview

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

Key Features

  • 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 .stl with Blender (HDRI + PBR materials).

  • Quantitative Evaluation
    Metrics include:

    • Mean & Max Surface Deviation
    • Chamfer Distance (bidirectional)
    • Precision / Recall / F1 (if ground truth available)

📊 Outputs

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

Quick Start

1. Install Dependencies

pip install -r requirements.txt

2. Place STL Models

Put your reference and test .stl files in the data/ directory:

3. Launch Pipeline

jupyter notebook notebook/inspection_pipeline.ipynb

Follow the notebook to:

  1. Convert STL to PLY
  2. Clean and align clouds
  3. Compute deviations
  4. Save metrics and masks

🧪 Synthetic Data Rendering

Render realistic training/inference data using Blender’s headless mode:

cd scripts
blender -b -P render.py

Outputs are saved in blender_assets/outputs/:

  • RGB images
  • 16-bit depth maps
  • Normal maps
  • Camera intrinsics (JSON)

Requirements

Install via:

pip install -r requirements.txt

Applications

  • Mechanical QA automation
  • CAD-based geometry validation
  • Metrology in manufacturing
  • Research in 3D defect detection
  • Synthetic dataset generation for 3D vision models

What's Next?

  • Add Mesh-to-Mesh Deviation (Not Just Point Clouds)
  • Surface Defect Segmentation using Deep Learning
  • Integration with Industrial 3D Scanners

📩 Contact

I’m excited to connect and collaborate!


📚 License

This project is open-source and available under the MIT License.


🌟 If you like this project, please give it a star! 🌟

About

A modular, high-fidelity 3D inspection framework for detecting geometric deviations in engineered components through CAD-referenced scan analysis, precise point cloud registration, and spatial deviation mapping.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages