print1Username commited on
Commit
cddb2c3
·
verified ·
1 Parent(s): 744fdfc

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +95 -0
README.md ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - print1Username/COS30082-Assignment-1
4
+ language:
5
+ - en
6
+ - zh
7
+ base_model:
8
+ - microsoft/resnet-50
9
+ pipeline_tag: image-classification
10
+ tags:
11
+ - image-classification
12
+ - pytorch
13
+ metrics:
14
+ - accuracy
15
+ library_name: timm
16
+ ---
17
+
18
+ <div align="center">
19
+
20
+ [![English](https://img.shields.io/badge/Language-English-blue?style=for-the-badge)](README.md)
21
+ [![简体中文](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)
22
+
23
+ </div>
24
+
25
+ # COS30082 Assignment 1 - Bird Species Classification
26
+
27
+ ## Model Description
28
+
29
+ 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.
30
+
31
+ The model takes an image as input and predicts the bird species category shown in the image.
32
+
33
+ ## Intended Use and Limitations
34
+
35
+ - **Intended use:** Academic research and coursework for predicting bird species from images.
36
+ - **Scope:** The model is trained to classify the 200 bird species included in the CUB-200 dataset.
37
+ - **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.
38
+
39
+ ## Training Data
40
+
41
+ The model was trained using the **Caltech-UCSD Birds 200 (CUB-200)** dataset, which contains images of 200 bird species.
42
+
43
+ - **Dataset source:** [Caltech-UCSD Birds 200](http://www.vision.caltech.edu/visipedia/CUB-200.html)
44
+ - **Hugging Face dataset page:** [print1Username/COS30082-Assignment-1](https://huggingface.co/datasets/print1Username/COS30082-Assignment-1)
45
+
46
+ ## Evaluation Results
47
+
48
+ Based on the testing dataset used for this project, the model achieved the following results:
49
+
50
+ | Metric | Result |
51
+ | --- | ---: |
52
+ | Top-1 accuracy | 78.5% |
53
+ | Average accuracy per class | 77.2% |
54
+
55
+ These results are based on the test dataset used in this project. Performance may differ on other datasets or in real-world conditions.
56
+
57
+ ## How to Use
58
+
59
+ The following example shows how to download the model weights and load them into a model architecture using PyTorch and `huggingface_hub`.
60
+
61
+ ```python
62
+ import torch
63
+ from huggingface_hub import hf_hub_download
64
+
65
+ # Define the same model architecture used during training
66
+ # model = MyBirdClassifier()
67
+
68
+ # Download the model weights
69
+ model_path = hf_hub_download(
70
+ repo_id="print1Username/COS30082-Assignment-1-model",
71
+ filename="bird_model.pth",
72
+ )
73
+
74
+ # Load the weights
75
+ state_dict = torch.load(model_path, map_location="cpu")
76
+ model.load_state_dict(state_dict)
77
+ model.eval()
78
+ ```
79
+
80
+ **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.
81
+
82
+ ## Model Information
83
+
84
+ - **Base model:** ResNet-50
85
+ - **Framework/library:** PyTorch / timm
86
+ - **Number of classes:** 200
87
+ - **Project:** COS30082 Assignment 1
88
+
89
+ ---
90
+
91
+ <div align="center">
92
+
93
+ **Language:** [English](README.md) · [简体中文](README.zh-CN.md)
94
+
95
+ </div>