Downloads · 30 days
2
3% of all-time downloads
BiliSakura/MoCo-TP-ResNet-50
MoCo-TP-ResNet-50 is a image classification model from BiliSakura. Use it when you need a label for an image. It is set up for transformers. The card lists the license as mit.
ResNet-50 model pre-trained using MoCo-v2 with Temporal Pairing (TP) for geography-aware self-supervised learning on remote sensing images.
Downloads · 30 days
2
3% of all-time downloads
All-time downloads
59
Public
Parameters
23.6M
94.3 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors94.3 MB · 100%
From the Hugging Face model README
ResNet-50 model pre-trained using MoCo-v2 with Temporal Pairing (TP) for geography-aware self-supervised learning on remote sensing images.
from transformers import AutoModelForImageClassification
import torch
# Load model for feature extraction
model = AutoModelForImageClassification.from_pretrained(
"BiliSakura/MoCo-TP-ResNet-50",
trust_remote_code=True
)
# Inference - extract features
model.eval()
input_image = torch.randn(1, 3, 224, 224) # (batch, channels, height, width)
with torch.no_grad():
outputs = model(pixel_values=input_image, return_dict=True)
features = outputs["features"] # Shape: (1, 2048)
To fine-tune the model for a specific classification task, you can add a classification head:
from transformers import AutoModelForImageClassification, AutoConfig
import torch.nn as nn
# Load config and modify num_labels
config = AutoConfig.from_pretrained(
"BiliSakura/MoCo-TP-ResNet-50",
trust_remote_code=True
)
config.num_labels = 10 # Your number of classes
# Load model
model = AutoModelForImageClassification.from_pretrained(
"BiliSakura/MoCo-TP-ResNet-50",
config=config,
trust_remote_code=True
)
# The model will automatically replace the identity head with a classification head
# Now you can fine-tune on your dataset
The model consists of:
This model was pre-trained using:
If you use this model, please cite the original Geography-Aware SSL paper:
@article{ayush2021geography,
title={Geography-Aware Self-Supervised Learning},
author={Ayush, Kumar and Uzkent, Burak and Meng, Chenlin and Tanmay, Kumar and Burke, Marshall and Lobell, David and Ermon, Stefano},
journal={ICCV},
year={2021}
}
Original Repository: sustainlab-group/geography-aware-ssl
MIT License - for academic use only.