Giter Site home page Giter Site logo

jaedukseo / 3d-to-photo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dabble-studio/3d-to-photo

0.0 0.0 0.0 22.87 MB

3D to Photo is an open-source package by Dabble, that combines threeJS and Stable diffusion to build a virtual photo studio for product photography. Load a 3D model into the browser and virtual shoot it in any kind of scene you can imagine

License: MIT License

JavaScript 66.52% Python 7.52% CSS 25.96%

3d-to-photo's Introduction

3D to Photo

3D to Photo is an open-source package by Dabble, that combines threeJS and Stable diffusion to build a virtual photo studio for product photography. Load a 3D model into the browser and virtual shoot it in any kind of scene you can imagine. The app currently uses Stable Diffusion 1.5-inpainting, hosted on Replicate.

Demo Video

3D Photo to Studio Demo

How it Works

  • Upload a 3D model of any object in .glb format.
  • Adjust the position and orientation of the model on the canvas
  • Describe the scene you want to create in the text box and click generate image

Use Cases

  • Product Photography: Create product lifestyle photos in any backdrop you can imagine, without a physical photoshoot.
  • Synthetic Data Generation: Generate synthetic images of an item in a variety of scenes. Useful when training object detection models.
  • Previsualize Game Assets: Upload your game assets and generate level art around it to previsualize scenes.

Tech Stack

  • ThreeJS to handle loading and viewing 3D models
  • Stable Diffusion 1.5 (inpainting) by stability.ai
  • Replicate to run Stable Diffusion
  • NextJS by Vercel for the front-end
  • Python Flask Server for some backend image processing functions

Install and Run

  1. Clone this repository
git clone [email protected]:Dabble-Studio/3d-to-photo.git
  1. Install neccessary packages for the front end
cd 3d-to-photo
npm install
  1. Install neccessary packages for the python backend
cd image_proc_server
pip install -r requirements.txt
  1. Run the Flask Server
flask run
  1. Set your Replicate API key. In another terminal, navigate to the root folder and create a file called .env. You can use the .env.example file as a template. Paste your Replicate API key in this line REPLICATE_API_TOKEN=YOUR_API_TOKEN, in place of YOUR_API_TOKEN

  2. Run the NextJS app

npm run dev
  1. Use one of the sample 3D models and drag it into the upload area. Enter a prompt in the text box and click "Generate Image"

3d-to-photo's People

Contributors

nmathew87 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.