This project comprises two Jupyter notebooks that use machine learning to classify images as either featuring the football players Messi or Cristiano Ronaldo. The project utilizes the fastai/fastbook libraries for image processing and classification.
This notebook focuses on training a model to classify images. It includes steps for loading images, preparing them, and then feeding them to a pre-trained machine learning model for fine-tuning.
This notebook is designed for inference. It loads the fine-tuned model and creates a Gradio interface, allowing users to test the model on new data interactively.
To use these notebooks, you need to install certain Python libraries. You can install the necessary dependencies via pip:
pip install fastai fastbook gradio
- Training the Model
- Open goat_detector_training.ipynb in a Jupyter environment. Follow the instructions in the notebook to train the model. This involves loading the dataset, setting up the model, and running the training process.
- Open goat_detector_inference.ipynb in a Jupyter environment.
- Run the cells to load the trained model and set up the Gradio interface.
- Use the Gradio interface to upload new images and see the model's predictions.
Contributions to this project are welcome. Please fork the repository and submit a pull request with your proposed changes.
This project is licensed under the Apache 2.0 License - see the LICENSE.md file for details.
Fast.ai for the excellent library and resources. Gradio for the interactive interface capabilities.