awhb/art-style-classifier
Art Style Classifier
Classify your art by a fine art movement/style! Especially for those new to fine art history (like myself). Do read up more on the art styles/movements by visiting WikiArt.
A HuggingFace Space which was built using the FastAI library following the FastAI course. Training dataset of around 4000 images obtained from WikiArt by user Sivar Azadi, reposted as a Kaggle Dataset.
Do checkout my process of fine-tuning the ConvNeXt-small-22k model using the fastai library on this Kaggle Notebook. Leave an upvote there if you enjoy!
Tools/Technologies Used
- fastai library (and dependencies)
- Gradio (version 6.14.0)
- huggingface-cli for authentication/deployment
- For Python libraries view requirements.txt
Project File Structure
├── LICENSE
├── README.md
├── app.ipynb
├── app.py
├── images
│ ├── baroque_art.jpg
│ ├── realism_art.jpg
│ ├── renaissance_art.jpg
│ └── romanticism_art.jpg
├── model.pkl
└── requirements.txtInstructions to deploy to HF spaces
(Note: Current local repo should already be tracking a HF remote space)
Part 1: Init Git LFS
- Run
git lfs installafter installing git-lfs (OS-dependent, I used Homebrew) - Run
git lfs track "*.jpg". - Run
git add .gitattributes,git commit -m "Track images with Git LFS". - Run
git add ...for all image files. - Run
git commit -m "Add art images tracked by Git LFS"
Part 2: Deploy to HF-Spaces
- Run
git push.
Additional Note:
My local repository sets remotes of origin for the HuggingFace space and upstream for the GitHub repository. This behaviour can be modified, depending on where you begin initialising from.
