This repository contains the implementation, experiments, and report materials for the COMP9517 (Computer Vision) group project at UNSW Sydney, Term 2 2026. The project addresses fine-grained visual classification of living organisms — plants, animals, and fungi — using a subset of the iNaturalist-2021 dataset.
Fine-grained species recognition is a core challenge in biodiversity monitoring and citizen science: many species are visually near-identical, differing only in subtle morphological cues, while images of the same species vary widely in pose, lighting, background, and scale. This project develops and rigorously compares multiple computer vision pipelines — from classical handcrafted-feature methods to deep convolutional architectures — to tackle this problem at scale.
- Build and evaluate at least two structurally different classification pipelines: a traditional handcrafted-feature approach (e.g., SIFT / HOG / LBP with a classical classifier) and a deep learning approach (CNN trained from scratch and via transfer learning).
- Benchmark methods using top-1 / top-5 accuracy, macro-averaged precision/recall/F1, and confusion-matrix-based error analysis.
- Investigate model interpretability using Grad-CAM to verify that predictions are driven by the organism itself rather than background context.
- Conduct in-depth ablation and robustness studies to understand failure modes and generalisation behaviour under real-world conditions (e.g., noise, blur, compression).
- Source: iNaturalist-2021 "Mini" split (
train_mini,val) - Subset used: ≥ 500 randomly sampled species, with 40 training / 10 validation images per class, and 10 held-out test images per class (drawn from the official validation set)
- Data integrity: Training, validation, and test splits are kept strictly separate throughout all experiments to prevent data leakage.
Exact class lists, sampling seeds, and per-class image counts used in this project are documented in
data/README.mdfor full reproducibility.
| Category | Approach | Status |
|---|---|---|
| Traditional | Bag-of-Visual-Words (SIFT) + SVM | DONE |
| Traditional | HOG / LBP + Random Forest | DONE |
| Deep Learning | AlexNet trained from scratch and pretrained weights (transfer learning) | DONE |
| Deep Learning | ResNet 18 and ResNet50 trained from scratch and pretrained weights (transfer learning) | DONE |
| Advanced Method Development | Grad-CAM analysis,robustness to image degradation at test time,effect of the number of classes | DONE |
COMP9517GROUP_SUBJECT/
├── data/ # Dataset scripts, class splits, and metadata (raw images not included)
├── notebooks/ # Exploratory analysis and prototyping notebooks
├── src/
│ ├── traditional/ # Handcrafted-feature pipelines (SIFT, HOG, LBP, SVM, RF)
│ ├── AlexNet/ # AlexNet architectures, training, and fine-tuning scripts
│ ├── ResNet/ # ResNet architectures, training, and fine-tuning scripts
│ ├── evaluation/ # Metrics, confusion matrix, macro-F1 computation
│ └── explainability/ # Grad-CAM and visualisation utilities
├── configs/ # Experiment configuration files
├── results/ # Logs, metrics, figures (checkpoints and images excluded)
├── report/ # LaTeX (CVPR format) source for the written report
└── README.md
python >= 3.10
pip install -r requirements.txtgit clone <repo-url>
cd COMP9517GROUP_SUBJECT
pip install -r requirements.txtRefer to data/README.md for instructions on downloading the iNaturalist-2021 mini subset and generating the project's fixed 500-species split.
#TODO: change it to running python script destination
# Traditional pipeline
python src/traditional/train.py --config configs/bovw_svm.yaml
# Deep learning pipeline
python src/AlexNet/train.py --config configs/resnet_pretrained.yamlQuantitative results, training curves, and confusion matrices will be added to results/ as experiments are completed, with a summary reported in the final written report and video presentation.
| Name | Contribution Area |
|---|---|
| Anrui Geng | Traditional computer vision pipeline using HOG, LBP, and SIFT-BoVW with SGD-SVM; ablation studies, result visualisation, and error analysis |
| Haochen Han | Traditional computer vision pipeline using HOG, LBP, and SIFT-BoVW with SGD-SVM; ablation studies, result visualisation, and error analysis |
| Sergio Insuasti | AlexNet trained from scratch and pretrained weights (transfer learning) |
| Zhirong Mai | ResNet trained from scratch and pretrained weights (transfer learning) |
| Zhiyang Liu | Grad-CAM explainability, robustness evaluation , test effect of the number of classes of traditional methods, report (LaTeX/CVPR) integration |
- Van Horn et al., Benchmarking Representation Learning for Natural World Image Collections, CVPR 2021.
- Selvaraju et al., Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization, ICCV 2017.
- Hendrycks & Dietterich, Benchmarking Neural Network Robustness to Common Corruptions and Perturbations, ICLR 2019.
This repository is submitted as coursework for COMP9517 (UNSW Sydney) and is intended for academic evaluation purposes only.