AIZHEIMER: How was I Drawing? is a project aimed at exploring the concept of "unlearning" in AI models, specifically focusing on the Stable Diffusion model. The project demonstrates how to selectively forget certain concepts from a pre-trained model using custom attention mechanisms and loss functions.
The offficial introduction video (it is a parody video 😂):
AIZHEIMER: How was I Drawing? ⏯️
To set up the project, follow these steps:
-
Clone the repository:
git clone [email protected]:rusenbb/AIzheimer.git cd aizheimer
-
Install the required packages: You can run the first cell in the Jupyter notebook to install the necessary packages or use the following command:
pip install diffusers transformers accelerate torchmetrics[image] torch-fidelity
-
Download the necessary models: Ensure you have the required models from Hugging Face or other sources as specified in the notebook. The models should be automatically downloaded if not locally available. So it should not be a problem.
-
Run the Jupyter Notebook: Open the
aizheimer_main.ipynb
notebook in Jupyter and follow the instructions to execute the cells. This notebook contains the entire workflow for setting up the environment, preparing the data, training the model, and testing the results. -
Configuration: You can configure various parameters such as
model_save_path
,concept_to_forget
,num_image_generate
,num_epochs
,batch_size
,learning_rate
, andweight_decay
in the notebook. -
Training: The training process involves using custom attention mechanisms and loss functions to selectively forget the specified concept from the model.
-
Inference: After training, you can test the model by generating images and observing the results to ensure the specified concept has been forgotten.
AIZHEIMER/
├── README.md
├── aizheimer_main.ipynb
└── generated_images/
- README.md: This file.
- aizheimer_main.ipynb: Jupyter notebook containing the main code for the project.
- generated_images/: Directory for storing generated images or training images.
IMPORTANT:
If you decided to not use model generated the images,
you should have training images in the generated_images folder.
- Muhammed Ruşen Birben
- Göktürk Batın Dervişoğlu
- Abdulkadir Külçe
We would like to thank our advisor Behçet Uğur Töreyin for his guidance and support throughout the project.
This project is licensed under the MIT License. See the LICENSE file for more details.