azam897/Masked-Autoencoders-MAE
0
Masked Autoencoder (MAE) — Gradio Demo
Self-supervised image representation learning using Masked Autoencoders trained on TinyImageNet. Built as part of FAST-NUCES AI4009 (Generative AI) Assignment 2, Spring 2026.
Files
app.py— Self-contained app with MAE model classes and Gradio UIrequirements.txt— Python dependenciesmae_model.pth— Trained model weights (tracked via Git LFS)
Model Architecture
How It Works
- Upload any image
- Adjust the masking ratio with the slider (10%–90%)
- The app displays three outputs side by side:
- Masked Input — image with patches removed
- MAE Reconstruction — model's predicted reconstruction
- Original — ground truth for comparison
Run Locally
pip install -r requirements.txt
python app.pyGradio will open at http://127.0.0.1:7860
Notes
mae_model.pthmust be in the same folder asapp.py- Large weight files are tracked via Git LFS — run
git lfs installbefore cloning
