--- datasets: - print1Username/COS30082-Assignment-1 language: - en - zh base_model: - microsoft/resnet-50 pipeline_tag: image-classification tags: - image-classification - pytorch metrics: - accuracy library_name: timm ---
[![English](https://img.shields.io/badge/Language-English-blue?style=for-the-badge)](README.md) [![简体中文](https://img.shields.io/badge/Language-%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87-red?style=for-the-badge)](README.zh-CN.md)
# 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](http://www.vision.caltech.edu/visipedia/CUB-200.html) - **Hugging Face dataset page:** [print1Username/COS30082-Assignment-1](https://huggingface.co/datasets/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`. ```python 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 ---
**Language:** [English](README.md) · [简体中文](README.zh-CN.md)