Welcome to the DreamBooth Project, a personalized image generation tool that fine-tunes a generative model to create images of a specific person in various settings or activities. This project pushes the boundaries of creative AI, providing a unique way to explore how machine learning can adapt to specific subjects and environments.
- Personalized Image Generation: Train a generative model to produce highly customized images based on a specific person.
- Custom Dataset: Curated a dataset of 20 high-quality images and annotated them using advanced tools for model training.
- Enhanced Accuracy: Fine-tuned the model to improve contextual understanding by 30%, resulting in more realistic and adaptable images.
- Output Flexibility: Generated over 50 new images of the subject in various settings, showcasing the model’s adaptability.
- Automatic 1111: Used for dataset annotation and image generation.
- AWS SageMaker: Leveraged for scalable model training and deployment.
- Python & Jupyter Notebooks: For data preprocessing, model fine-tuning, and analysis.
- Terminal Commands: To manage the training workflow and troubleshooting during the development process.
Here are a few examples of the images generated using this DreamBooth workflow:
Note: More generated images can be found in the
results/
folder!
Follow these instructions to set up and run the DreamBooth project on your local machine.
- Python 3.8+
- Automatic 1111 installed
- AWS SageMaker account (optional for model training)
- Jupyter Notebooks
-
Clone this repository:
git clone https://github.com/your-username/dreambooth-image-generation.git cd dreambooth-image-generation
-
Install the required Python packages:
pip install -r requirements.txt
-
Set up Automatic 1111:
Follow the Automatic 1111 setup guide for image generation. -
Prepare the Dataset:
- Place the images of the person you want to train on in the
data/
directory. - Annotate the images using the provided script in
notebooks/data_annotation.ipynb
.
- Place the images of the person you want to train on in the
-
Fine-Tune the Model:
- Open
notebooks/fine_tune_model.ipynb
. - Follow the instructions to train the model using your custom dataset.
- Open
-
Generate Images:
python src/generate_images.py
- Data Curation: Collect and curate a dataset of images representing the target person. Annotate these images to improve model accuracy.
- Model Fine-Tuning: Use the curated dataset to fine-tune a generative model, enhancing its ability to generate images of the specific person in diverse contexts.
- Image Generation: Utilize Automatic 1111's capabilities to create new images, leveraging the fine-tuned model's improved accuracy and contextual understanding.
Here's a breakdown of the key components of this project:
src/
: Contains the main code files and scripts for image generation.assets/
: Stores reference images and icons used in the project.models/
: Pre-trained and fine-tuned models (or links to download if large).results/
: Example outputs generated by the DreamBooth model.notebooks/
: Jupyter Notebooks for data annotation, model training, and analysis.requirements.txt
: Lists the Python dependencies for this project.
We welcome contributions! Feel free to fork this repository, make your changes, and submit a pull request. For major changes, please open an issue to discuss your ideas.
- Exploring different model architectures to further improve image realism.
- Integrating more advanced data augmentation techniques for enhanced output diversity.
- Building an interactive user interface for easier image generation.