Training:
Self-supervised pre-training on fMoW dataset (200 epochs)
Usage
Feature Extraction
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)
Fine-tuning for Classification
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
Model Architecture
The model consists of:
Backbone:
ResNet-50 (conv1, bn1, layer1-4)
Feature extractor:
Adaptive average pooling + flattening
Classification head:
Linear layer (2048 -> num_labels), or Identity for feature extraction
Pre-training Details
This model was pre-trained using:
Method:
MoCo-v2 (Momentum Contrast) with Temporal Pairing
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}
}
MoCo-TP-ResNet-50 huggingface.co is an AI model on huggingface.co that provides MoCo-TP-ResNet-50's model effect (), which can be used instantly with this BiliSakura MoCo-TP-ResNet-50 model. huggingface.co supports a free trial of the MoCo-TP-ResNet-50 model, and also provides paid use of the MoCo-TP-ResNet-50. Support call MoCo-TP-ResNet-50 model through api, including Node.js, Python, http.
MoCo-TP-ResNet-50 huggingface.co is an online trial and call api platform, which integrates MoCo-TP-ResNet-50's modeling effects, including api services, and provides a free online trial of MoCo-TP-ResNet-50, you can try MoCo-TP-ResNet-50 online for free by clicking the link below.
BiliSakura MoCo-TP-ResNet-50 online free url in huggingface.co:
MoCo-TP-ResNet-50 is an open source model from GitHub that offers a free installation service, and any user can find MoCo-TP-ResNet-50 on GitHub to install. At the same time, huggingface.co provides the effect of MoCo-TP-ResNet-50 install, users can directly use MoCo-TP-ResNet-50 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.