File size: 3,146 Bytes
cddb2c3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
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
---

<div align="center">

[![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)

</div>

# 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

---

<div align="center">

**Language:** [English](README.md) · [简体中文](README.zh-CN.md)

</div>