Classifying the OxfordIIIPet dataset using Transfer Learning.
You can find the project's google colab notebook at notebooks/OxfordIIITPet_classification.py
.
- Install miniconda
- Create a conda environment with
conda create -n <env_name> python=3.10
- Activate the environment with
conda activate <env_name>
- Install dependencies with
pip install -r requirements.txt
Generate a model for image classification by running:
python image_classifier/train.py
See modifiable parameters with:
python image_classifier/train.py help
Make predictions with:
python image_classifier/predict.py --image-path <path/to/image.jpg>
Specify the model you want to use for prediction by either using the --model-path <model_path>
or the
--mlflow-run <mlflow_run_id>
parameter. Example:
python image_classifier/predict.py --image-path <path/to/image.jpg> --mlflow-run <mlflow_run_id>
Nvidia T4: ~00:03:10 Nvidia RTX 3050: ~00:01:20