Skip to content

Technical appeal: “Auto-detect, mask, pose-estimate, and reconstruct humans in 3D — with just one image input.” Community-oriented: “Snap a photo. Get a 3D mesh. Zero modeling skills needed.” Speed-focused: “YOLO to PIFuHD in minutes: Rapid 3D mesh generation from real-world photos.”

Notifications You must be signed in to change notification settings

Faykar78/AI_powered_3d_model_generator

Repository files navigation

3D Human Mesh Generator from Single Image

This project is a pipeline that detects a person in an image, segments them precisely, and reconstructs a 3D mesh from the cropped region. It integrates YOLO, SAM, OpenPose, and PIFuHD to generate high-fidelity 3D models from 2D images.


🔧 Pipeline Steps

  1. Detection & Masking

    • Run main.py
    • Executes YOLO for detection
    • Applies SAM for precise segmentation
    • Uses OpenPose for keypoint detection
    • You will be prompted to save the cropped image → Save it to:
      pifuhd/openpose/example/media/
      
  2. 3D Mesh Reconstruction

    • Navigate to pifuhd/
    • Run:
      python -m apps.simple_test
      
    • This generates the 3D mesh output using PIFuHD.

🧠 Models Used

  • Yolov11 – Person detection from full image.
  • SAM (Segment Anything Model) – Precise mask of detected person.
  • OpenPose – Extracts pose landmarks to improve mesh accuracy.
  • PIFuHD – Reconstructs 3D mesh from masked image input.

📦 Folder Structure

.
├── main.py                # Orchestrates YOLO → SAM → OpenPose
├── /pifuhd
│   ├── /openpose/example/media/  # Save masked crop here
│   └── apps/simple_test.py       # Run this for 3D mesh output

📷 Example Outputs

Stage Output
1. YOLO Detection Detection
2. SAM Masking Masked
3. 3D Mesh (PIFuHD) 3D Mesh

⚠️ Limitation

  • Requires the user to manually save the cropped masked image at the specific location before mesh reconstruction.

🙌 Acknowledgements

This project integrates and builds upon the following repositories:


🏁 Getting Started

# 1. Clone all required repos
git clone https://github.com/Faykar78/AI_powered_3d_model_generator.git
cd your-repo

# 2. Setup environments for each dependency (YOLO, SAM, OpenPose, PIFuHD)

# 3. Start detection pipeline
python main.py

# 4. Save cropped output manually as instructed

# 5. Run mesh generation
cd pifuhd
python -m apps.simple_test

About

Technical appeal: “Auto-detect, mask, pose-estimate, and reconstruct humans in 3D — with just one image input.” Community-oriented: “Snap a photo. Get a 3D mesh. Zero modeling skills needed.” Speed-focused: “YOLO to PIFuHD in minutes: Rapid 3D mesh generation from real-world photos.”

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages