Instructions to use timm/resnet50.bamboo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- timm
How to use timm/resnet50.bamboo with timm:
import timm model = timm.create_model("hf-hub:timm/resnet50.bamboo", pretrained=True) - Notebooks
- Google Colab
- Kaggle
resnet50.bamboo
A ResNet-50 pretrained on Bamboo-CLS, converted from the
authors' release to native timm weights. No fine-tuning or weight rescaling was performed.
The checkpoint wrapper and any module. prefix were removed. The released checkpoint has no classifier. num_classes=0 returns 2,048-dimensional pooled features.
Model details
- Paper: Bamboo
- Parameters: 23,508,032
- Input: RGB, 224 x 224
- Classifier outputs: 0
- Feature dimension: 2,048
- Training data: Bamboo-CLS
Preprocessing
Uses the authors' benchmark configuration: bicubic resize of the shorter side
to 224, then a 224 x 224 center crop (crop_pct=1.0).
- Mean:
(0.485, 0.456, 0.406) - Standard deviation:
(0.229, 0.224, 0.225)
The ViT benchmark uses CLIP normalization; the ResNet benchmark uses ImageNet normalization. The authors' separate ViT classification demo uses a different recipe. This export follows the benchmark.
Usage
import timm
import torch
from PIL import Image
model = timm.create_model("hf-hub:timm/resnet50.bamboo", pretrained=True).eval()
transform = timm.data.create_transform(**timm.data.resolve_model_data_config(model), is_training=False)
image = Image.open("image.jpg").convert("RGB")
with torch.inference_mode():
output = model(transform(image).unsqueeze(0))
print(output.shape) # torch.Size([1, 2048])
Source and licensing
Source URLs and SHA256 hashes are recorded in conversion.json.
The authors' demo metadata declares CC-BY-4.0;
the dataset access instructions state academic,
non-commercial use. These are upstream statements, not a new license grant for the converted weights.
Citation
@misc{zhang2022bamboo,
title={Bamboo: Building Mega-Scale Vision Dataset Continually with Human-Machine Synergy},
author={Yuanhan Zhang and Qinghong Sun and Yichun Zhou and Zexin He and Zhenfei Yin and
Kun Wang and Lu Sheng and Yu Qiao and Jing Shao and Ziwei Liu},
year={2022},
eprint={2203.07845},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
- Downloads last month
- 6