Skip to content

Its-Itachi/Text-to-3D

Repository files navigation

🧊 AI-Powered Text-to-3D Model Generation

A GenAI-powered web application that converts natural language text prompts into 3D models using a multi-stage AI pipeline.
The system first generates an image from text and then reconstructs a 3D mesh from that image, all through an interactive web interface.


🎥 Demo Video

Text-to-3D.mp4

📊 Model Overview

  • Pipeline:
    • Text → Image (SDXL)
    • Image → 3D Mesh (TripoSR)
  • Input: Natural language text prompt
  • Output: 3D model files (.obj, .glb, etc.)

🔍 Core Components

  • Text-to-Image Generation
    SDXL model accessed via Cloudflare Workers AI.

  • Image-to-3D Reconstruction
    TripoSR for single-image 3D mesh reconstruction.

  • User Interface
    Streamlit-based interactive web application.


⚙️ Enhancements

  • Automatic preprocessing of generated images
  • Temporary file handling for intermediate pipeline outputs
  • Support for multiple 3D export formats
  • Modular pipeline design for easy extension
  • Streamlit-controlled execution flow
  • GPU-accelerated inference support (recommended)

🛠 Tech Stack

Layer Tools Used
UI / App Streamlit
AI Models SDXL, TripoSR
ML / Utils PyTorch, NumPy, Pillow
External API Cloudflare Workers AI
Deployment Local (Cloud optional)

🚀 How to Run Locally

1️⃣ Clone the Repository

git clone https://github.com/Its-Itachi/Text-to-3D.git
cd Text-to-3D

2️⃣ Create a Virtual Environment

python -m venv venv

3️⃣ Activate the Virtual Environment

Windows (PowerShell):

venv\Scripts\Activate.ps1

or

venv\Scripts\activate

macOS / Linux:

source venv/bin/activate

4️⃣ Install Dependencies

pip install -r requirements.txt

🔑 Environment Configuration (SDXL)

Set Cloudflare credentials using environment variables:

CF_ACCOUNT_ID=your_account_id
CF_API_TOKEN=your_api_token

Or via Streamlit secrets:

.streamlit/secrets.toml

▶ Run the Application

streamlit run app.py

Open in browser:

http://localhost:8501

📦 Output Structure

output/
 └── run_id/
     ├── input.png
     └── mesh.obj

Temporary files are stored in:

temp/

👤 Author

Jayesh Dethe

GitHub: https://github.com/Its-Itachi


⭐ Support

If you find this project useful:

  • ⭐ Star the repository
  • 📢 Share it with peers
  • 🔔 Follow for more AI + 3D projects

📝 Notes

  • GPU is strongly recommended for faster 3D reconstruction
  • Output quality depends heavily on the generated image
  • Complex prompts may produce noisy or incomplete meshes

Happy building in 3D! 🚀

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages