Downloads · 30 days
0
sarequi/Bowerbird_individual_ID_classifier
Bowerbird_individual_ID_classifier is a machine learning model from sarequi. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository contains the weights for a ResNet50-based individual ID classifier trained on a set of Spotted Bowerbird individuals, as part of a project of the Fusani Lab (see https://github.com/sarequi/Bowerbird-ID).
Downloads · 30 days
0
Access
Public
Updated Nov 13, 2025
Repo size
94.5 MB
Likes
0
Public
Click a slice to open those files.
.pth94.5 MB · 100%
From the Hugging Face model README
This repository contains the weights for a ResNet50-based individual ID classifier trained on a set of Spotted Bowerbird individuals, as part of a project of the Fusani Lab (see https://github.com/sarequi/Bowerbird-ID).
torchvision.models.resnet50 with ResNet50_Weights.DEFAULT (ImageNet)Bbird_individual_classifier.pthThis model is not generic. It is specific to the 16 individuals it was trained on.
NUM_CLASSESmust match the number of bird IDs used during training, unless the model is re-trained.
import torch
from torchvision.models import resnet50, ResNet50_Weights
from huggingface_hub import hf_hub_download
repo_id = "sarequi/bowerbird-individual-classifier"
# Download checkpoint
ckpt_path = hf_hub_download(
repo_id=repo_id,
filename="Bbird_individual_classifier.pth",
)
NUM_CLASSES = 16 # number of individuals used during training
# Rebuild model architecture
model = resnet50(weights=ResNet50_Weights.DEFAULT)
num_ftrs = model.fc.in_features
model.fc = torch.nn.Linear(num_ftrs, NUM_CLASSES)
# Load weights
state_dict = torch.load(ckpt_path, map_location="cpu")
model.load_state_dict(state_dict)
model.eval()