Skip to content

xuanvietchu/NeuroInfuse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

74 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 NeuroInfuse πŸ–ΌοΈ

πŸ›οΈ Bed demo

πŸ’‘ Inspiration

Non-creative individuals often struggle to visualize how different elements can come together cohesively. This limits their ability to explore design or architectural ideas. NeuroInfuse was created to solve this problem by leveraging AI to seamlessly integrate objects into background images while preserving their structure, making creative design accessible to everyone.

βš™οΈ What it does

NeuroInfuse is an AI-powered tool that seamlessly integrates objects into background images while maintaining their original structure. It functions like an automated version of Photoshop, using a Stable Diffusion model to blend elements naturally and realistically. Users can input objects and backgrounds, and the system generates a cohesive composition.

▢️ πŸ›οΈ Watch Bed Demo

bed.demo.mov

▢️ 🐱 Watch Cat Demo

cat.demo.mov

πŸ”§ How we built it

NeuroInfuse was built using a combination of modern technologies:

  • πŸ–₯️ Frontend: Developed with React and TypeScript for a responsive and intuitive user interface.
  • βš™οΈ Backend: Powered by Python FastAPI to handle communication between the frontend and the AI model.
  • 🧠 AI Model: Utilized PyTorch and Stable Diffusion for image generation and integration.
  • πŸ”— Integration: The system was designed to ensure smooth interaction between the frontend, backend, and AI components.

Our backend is based on ObjectStitch-Image-Composition utilizing masked foreground images and employing all class and patch tokens from the foreground image as conditional embeddings.

πŸ› οΈ System

πŸš€ Get Started

1️⃣ Dependencies

  • 🐍 Python 3.9.21
  • πŸ“¦ pip 25.0.1

πŸ–₯️ Server Setup

pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 -f https://download.pytorch.org/whl/torch_stable.html
cd server
pip install -r requirements.txt
cd src/taming-transformers
pip install -e .

πŸ—οΈ Client Setup

cd client
npm install

2️⃣ πŸ“₯ Download Models

  • Please download the following files to the checkpoints folder to create the following file tree:
    checkpoints/
    β”œβ”€β”€ ObjectStitch.pth
    └── openai-clip-vit-large-patch14
        β”œβ”€β”€ config.json
        β”œβ”€β”€ merges.txt
        β”œβ”€β”€ preprocessor_config.json
        β”œβ”€β”€ pytorch_model.bin
        β”œβ”€β”€ tokenizer_config.json
        β”œβ”€β”€ tokenizer.json
        └── vocab.json
  • πŸ“₯ openai-clip-vit-large-patch14 (Huggingface | ModelScope).
  • πŸ“₯ ObjectStitch.pth (Huggingface | ModelScope).

▢️ Run the App

πŸ—οΈ Client

npm run dev

βš™οΈ Server

python .\scripts\main.py

About

Seamlessly integrates 🏠 objects into πŸŒ„ background images while preserving their πŸ“ structured template.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors