RepositoryPythonKRSouth Korea
khawar-islam

khawar-islam/diffuseMix

Official PyTorch implementation of DiffuseMix : Label-Preserving Data Augmentation with Diffusion Models (CVPR'2024)

136stars
9forks
0issues
4views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: cutmix

#1 Repository of the month

1
TINIX TRENDING·Topic: data-augmentation

#1 Repository of the month

1
TINIX TRENDING·Topic: generative-data-augmentation

#1 Repository of the month

DiffuseMix : Label-Preserving Data Augmentation with Diffusion Models (CVPR'2024)

Website paper video code

DiffusMix

DiffusMix Treasure


📢 Latest Updates

  • Mar-11-24: DiffuseMix paper is released arxiv link. 🔥🔥

🚀 Getting Started

Setup anaconda environment using environment.yml file.

conda env create --name DiffuseMix --file=environment.yml
conda remove -n DiffuseMix --all # In case environment installation faileds

📝 List of Prompts

Below is the list of prompts, if your accuracy is low then you can use all prompts to increase the performance. Remember that each prompt takes a time to generate images, so the best way is to start from two prompts then increase the number of prompts.

prompts = ["Autumn", "snowy", "watercolor art","sunset", "rainbow", "aurora",
               "mosaic", "ukiyo-e", "a sketch with crayon"]

📁 Dataset Structure

train
 └─── class 1
          └───── n04355338_22023.jpg
 └─── class 2
          └───── n03786901_5410.jpg
 └─── ...

✨ DiffuseMix Augmentation

To introduce the structural complexity, you can download fractal image dataset from here Fractal Dataset

`python3 main.py --train_dir PATH --fractal_dir PATH --prompts "sunset,Autumn"

💬 Citation

If you find our work useful in your research please consider citing our paper:

@article{diffuseMix2024,
  title={DIFFUSEMIX: Label-Preserving Data Augmentation with Diffusion Models},
  author={Khawar Islam, Muhammad Zaigham Zaheer, Arif Mahmood, Karthik Nandakumar},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  year={2024}
}

@article{islam2024genmix,
  title={Genmix: effective data augmentation with generative diffusion model image editing},
  author={Islam, Khawar and Zaheer, Muhammad Zaigham and Mahmood, Arif and Nandakumar, Karthik and Akhtar, Naveed},
  journal={arXiv preprint arXiv:2412.02366},
  year={2024}
}

@inproceedings{islam2025context,
  title={Context-Guided Responsible Data Augmentation with Diffusion Models},
  author={Islam, Khawar and AKHTAR, NAVEED},
  booktitle={ICLR 2025 Workshop on Navigating and Addressing Data Problems for Foundation Models}
}

❤️ Acknowledgment

I am grateful to Adversarial-AutoMixup (@JinXins) for providing the source and target images, which significantly saved me a lot of time. Thank you once again. I am also exceptionally thankful to the author of IPMix, (@hzlsaber), for presenting their method's figures clearly, which greatly aided my paper. Additionally, their timely responses to my concerns saved me considerable time. Lastly, my thanks again go to the author of GuidedMixup, (@3neutronstar), for their insights on datasets and method outputs.

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
NVIDIA-NeMo/DataDesigner

🎨 NeMo Data Designer: Generate high-quality synthetic data from scratch or from seed data.

2.4k
Dec 1, 2026
RepositoryPython
vanderschaarlab/synthcity

A library for generating and evaluating synthetic tabular data for privacy, fairness and data augmentation.

703
Apr 21, 2026
RepositoryPython
Westlake-AI/openmixup

CAIRI Supervised, Semi- and Self-Supervised Visual Representation Learning Toolbox and Benchmark

657
Oct 15, 2025
Modelsentence-similarity
sentence-transformers/all-MiniLM-L6-v2

all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...

♥0
157.6M
Jun 1, 2026
Modelimage-classification
google/vit-base-patch16-224

Vision Transformer (base-sized model) Vision Transformer (ViT) model pre-trained on ImageNet-21k (14 million images, 21,843 classes) at resolution 224x224, and fine-tuned on ImageNet 2012 (1 million images, 1,000 classes) at resolution 224x224. It w...

♥0
11.8M
Sep 5, 2023
Modelimage-classification
Falconsai/nsfw_image_detection

Model Card: Fine-Tuned Vision Transformer (ViT) for NSFW Image Classification Model Description The Fine-Tuned Vision Transformer (ViT) is a variant of the transformer encoder architecture, similar to BERT, that has been adapted for image classifica...

♥0
1.4M
Sep 7, 2026
Modelimage-classification
timm/mobilenetv3_small_100.lamb_in1k

Model card for mobilenetv3small100.lambin1k A MobileNet-v3 image classification model. Trained on ImageNet-1k in timm using recipe template described below. Recipe details: A LAMB optimizer based recipe that is similar to ResNet Strikes Back(https:/...

♥0
4.0M
Oct 30, 2026
Modelimage-classification
timm/tf_efficientnetv2_s.in21k_ft_in1k

Model card for tfefficientnetv2s.in21kftin1k A EfficientNet-v2 image classification model. Trained on ImageNet-21k and fine-tuned on ImageNet-1k in Tensorflow by paper authors, ported to PyTorch by Ross Wightman. Model Details - Model Type: Image cl...

♥0
2.8M
Jan 21, 2025
Modelimage-classification
microsoft/resnet-50

ResNet-50 v1.5 ResNet model pre-trained on ImageNet-1k at resolution 224x224. It was introduced in the paper Deep Residual Learning for Image Recognition(https://arxiv.org/abs/1512.03385) by He et al. Disclaimer: The team releasing ResNet did not wr...

♥0
95.5k
Feb 13, 2024