--- title: Generative Augmented Classifiers emoji: 💻 colorFrom: gray colorTo: indigo sdk: gradio sdk_version: 4.36.1 app_file: app.py pinned: false --- # Generative Augmented Classifiers Main GitHub Repo: [Generative Data Augmentation](https://github.com/zhulinchng/generative-data-augmentation) | Image Classification Demo: [Generative Augmented Classifiers](https://huggingface.co/spaces/czl/generative-augmented-classifiers). This demo showcases the performance of image classifiers trained on various datasets as part of the project `Improving Fine-Grained Image Classification Using Diffusion-Based Generated Synthetic Images' dissertation. ## Demo Usage Instructions 1. Select the dataset, the model architecture, training methods, type of training dataset to evaluate the classifier on. 2. Upload an image, or click `Sample Random Image` to select a random image from the validation dataset. 3. Click `Classify` to classify the image using the selected classifier. 4. To download the classifier, click `Download Model: `. The top 5 predicted labels and their corresponding probabilities are displayed. ## Configuration ```bash git clone https://huggingface.co/spaces/czl/generative-augmented-classifiers cd generative-data-augmentation-demo # Setup the data directory structure as shown above conda create --name $env_name python=3.11.* # Replace $env_name with your environment name conda activate $env_name # Visit PyTorch website https://pytorch.org/get-started/previous-versions/#v212 for PyTorch installation instructions. pip install torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 --index-url # Obtain the correct URL from the PyTorch website pip install -r requirements.txt python app.py ```