Instructions to use print1Username/COS30082-Assignment-1-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- timm
How to use print1Username/COS30082-Assignment-1-model with timm:
import timm model = timm.create_model("hf-hub:print1Username/COS30082-Assignment-1-model", pretrained=True) - Notebooks
- Google Colab
- Kaggle
COS30082 Assignment 1 - Bird Species Classification
Model Description
This is an image classification model trained to identify 200 bird species from the Caltech-UCSD Birds 200 (CUB-200) dataset. It was developed as part of COS30082 Assignment 1.
The model takes an image as input and predicts the bird species category shown in the image.
Intended Use and Limitations
- Intended use: Academic research and coursework for predicting bird species from images.
- Scope: The model is trained to classify the 200 bird species included in the CUB-200 dataset.
- Limitations: The model is primarily suitable for species represented in the dataset. Its performance may be lower on bird species outside the dataset or under substantially different lighting, backgrounds, camera angles, and image-quality conditions.
Training Data
The model was trained using the Caltech-UCSD Birds 200 (CUB-200) dataset, which contains images of 200 bird species.
- Dataset source: Caltech-UCSD Birds 200
- Hugging Face dataset page: print1Username/COS30082-Assignment-1
Evaluation Results
Based on the testing dataset used for this project, the model achieved the following results:
| Metric | Result |
|---|---|
| Top-1 accuracy | 78.5% |
| Average accuracy per class | 77.2% |
These results are based on the test dataset used in this project. Performance may differ on other datasets or in real-world conditions.
How to Use
The following example shows how to download the model weights and load them into a model architecture using PyTorch and huggingface_hub.
import torch
from huggingface_hub import hf_hub_download
# Define the same model architecture used during training
# model = MyBirdClassifier()
# Download the model weights
model_path = hf_hub_download(
repo_id="print1Username/COS30082-Assignment-1-model",
filename="bird_model.pth",
)
# Load the weights
state_dict = torch.load(model_path, map_location="cpu")
model.load_state_dict(state_dict)
model.eval()
Note: Replace MyBirdClassifier() with the actual model architecture used during training, and make sure it matches the saved weights. A weights file alone is generally not enough to reconstruct the model architecture.
Model Information
- Base model: ResNet-50
- Framework/library: PyTorch / timm
- Number of classes: 200
- Project: COS30082 Assignment 1
- Downloads last month
- -
Model tree for print1Username/COS30082-Assignment-1-model
Base model
microsoft/resnet-50