title | emoji | colorFrom | colorTo | sdk | sdk_version | app_file | pinned | license |
---|---|---|---|---|---|---|---|---|
Fastai Prac Guitar Classifier |
🏢 |
purple |
blue |
gradio |
3.24.1 |
app.py |
false |
apache-2.0 |
This is an image classifier app that identifies a guitar's type based on its image. This was done as a quick mini-project to try out the FastAI+Gradio+HF Spaces stack. The model itself has been fine-tuned from ResNet18 using the FastAI API.
- Acoustic Bass Guitar
- Archtop Guitar
- Classical Guitar
- Electric Bass Guitar
- Electric Guitar
- Flat-top Guitar
- Semi-acoustic guitars of all types have been kept in the acoustic category.
- There was some manual data cleaning done between data augmentation and model fine-tuning. The details are described in the train.py script.
- The most commonly confused category pairs are acoustic bass : classical and classical : flat-top. This makes sense because apart from the headstock and the strings themselves, these 3 categories are largely similar. Higher resolution images for training should help the model in doing a better job of distinguishing betweeen these categories.
- The fine-tuning works well despite being given less than 200 images per class and only 5 training epochs.
- The app can be accessed at https://huggingface.co/spaces/rdat/fastai-prac-guitar-classifier. Add an image to the input area and click submit to get the model's inference along with probability percentages.
- The train.py script can be executed with the appropriate config parameters to train (fine-tune) a new model.
- Add a component to the Gradio interface that lets the user play a sample of the instrument when its corresponding example image is selected.
- Experiment with more recent ResNet models and supply them with more data for fine-tuning.
- Perform more extensive hyperparameter tuning.
- Add performance metrics to the README file.