Improve model card with metadata and description
#1
by
nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,3 +1,85 @@
|
|
| 1 |
---
|
| 2 |
-
license:
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: mit
|
| 3 |
+
pipeline_tag: text-to-image
|
| 4 |
+
library_name: diffusers
|
| 5 |
---
|
| 6 |
+
|
| 7 |
+
# DiffCoRe-Mix : Context-Guided Responsible Data Augmentation with Diffusion Models [ICLRw-2025]
|
| 8 |
+
<p align="center">
|
| 9 |
+
<img src="assets/placeholder.png" alt="DiffCoRe-Mix Overview">
|
| 10 |
+
</p>
|
| 11 |
+
|
| 12 |
+
<p align="center">
|
| 13 |
+
<a href="https://arxiv.org/pdf/2503.10687"><img src="https://img.shields.io/badge/Paper-ICLR2025-blue" alt="arXiV"></a>
|
| 14 |
+
<a href="https://github.com/khawar-islam/DiffCoRe-Mix"><img src="https://img.shields.io/badge/Code-GitHub-brightgreen" alt="Code"></a>
|
| 15 |
+
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellowgreen" alt="License"></a>
|
| 16 |
+
</p>
|
| 17 |
+
|
| 18 |
+
#### [Khawar Islam](mailto:khawar.islam@student.unimelb.edu.au), [Naveed Akhtar](mailto:naveed.akhtar1@unimelb.edu.au)
|
| 19 |
+
#### **School of Computing and Information Systems, The University of Melbourne**
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
### 📢 Latest Updates
|
| 23 |
+
- **Mar-15-25**: Preprint is available.
|
| 24 |
+
- **Mar-13-25**: Public release of the code and models.
|
| 25 |
+
- **Mar-12-25**: Paper accepted at **ICLRw-2025**.
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
---
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
### Key Features
|
| 32 |
+
|
| 33 |
+
- **Contextual & Negative Prompting:** Guides the diffusion process to generate domain-specific images while suppressing undesired content.
|
| 34 |
+
- **Hard Cosine Similarity Filtration:** Uses CLIP embeddings to filter out generated samples that do not meet semantic alignment criteria.
|
| 35 |
+
- **Composite Image Mixing:** Combines real and generative images using both pixel-wise and patch-wise strategies.
|
| 36 |
+
|
| 37 |
+
---
|
| 38 |
+
|
| 39 |
+
## Install
|
| 40 |
+
1. Clone this repository and navigate to DiffCoRe-Mix folder
|
| 41 |
+
```bash
|
| 42 |
+
git clone https://github.com/khawar-islam/DiffCoRe-Mix.git
|
| 43 |
+
cd DiffCoRe-Mix
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
2. Install Package
|
| 47 |
+
```shell
|
| 48 |
+
conda create -n DiffCoreMix python=3.9.19 -y
|
| 49 |
+
conda activate DiffCoreMix
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
3. Download pre-trained CosXL model
|
| 53 |
+
```
|
| 54 |
+
https://huggingface.co/cocktailpeanut/c/blob/main/cosxl.safetensors
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
4. To run the augmentation process, use:
|
| 58 |
+
```bash
|
| 59 |
+
python main.py --dataset <DATASET_NAME> --output_folder <PATH_TO_OUTPUT_FOLDER> --aug_per <AUGMENTATION_PERCENTAGE>
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
5. For instance, to augment the CUB200 dataset with 30% augmentation
|
| 63 |
+
```bash
|
| 64 |
+
python main.py --dataset cub200 --output_folder /path/to/cub200/train --aug_per 0.3
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
---
|
| 68 |
+
|
| 69 |
+
## Examples
|
| 70 |
+
<p align="center">
|
| 71 |
+
<img src="assets/diversity.jpg" alt="DiffCoRe-Mix Overview">
|
| 72 |
+
</p>
|
| 73 |
+
|
| 74 |
+
---
|
| 75 |
+
|
| 76 |
+
## Citation
|
| 77 |
+
|
| 78 |
+
If you use DiffCoRe-Mix in your research, please cite our paper:
|
| 79 |
+
```
|
| 80 |
+
@inproceedings{islam2025context,
|
| 81 |
+
title={Context-Guided Responsible Data Augmentation with Diffusion Models},
|
| 82 |
+
author={Islam, Khawar and AKHTAR, NAVEED},
|
| 83 |
+
booktitle={ICLR 2025 Workshop on Navigating and Addressing Data Problems for Foundation Models}
|
| 84 |
+
}
|
| 85 |
+
```
|