Convnextv2 Tiny.fcmae
基於ConvNeXt-V2的自監督特徵表示模型,採用全卷積掩碼自編碼器框架(FCMAE)進行預訓練,適用於圖像特徵提取和微調任務。
下載量 2,463
發布時間 : 1/5/2023
模型概述
這是一個未包含預訓練頭部的ConvNeXt-V2模型,專門設計用於圖像特徵提取和下游任務的微調。模型通過掩碼自編碼器框架進行自監督預訓練,能夠捕捉圖像的深層特徵表示。
模型特點
自監督預訓練
採用全卷積掩碼自編碼器(FCMAE)框架進行預訓練,無需大量標註數據即可學習有效的圖像特徵表示
高效架構
基於ConvNeXt-V2的輕量級架構,在保持高性能的同時具有較低的參數量和計算需求
多任務適配
支持特徵提取、圖像分類和遷移學習等多種計算機視覺任務
模型能力
圖像特徵提取
圖像分類
遷移學習
計算機視覺任務適配
使用案例
計算機視覺
圖像分類
可用於對圖像進行分類,支持微調以適應特定分類任務
在ImageNet-1k等基準測試上表現良好
特徵提取
提取圖像的高級特徵表示,用於下游任務如目標檢測、圖像分割等
🚀 convnextv2_tiny.fcmae模型卡片
這是一個ConvNeXt-V2自監督特徵表示模型,使用全卷積掩碼自編碼器框架(FCMAE)進行預訓練。該模型沒有預訓練的頭部,僅適用於微調或特徵提取。
🚀 快速開始
本模型可用於圖像分類和特徵提取,下面將詳細介紹使用方法。
✨ 主要特性
- 基於ConvNeXt-V2架構,通過全卷積掩碼自編碼器框架(FCMAE)進行預訓練。
- 沒有預訓練的頭部,可靈活用於微調或特徵提取任務。
📚 詳細文檔
模型詳情
屬性 | 詳情 |
---|---|
模型類型 | 圖像分類 / 特徵骨幹網絡 |
模型參數(M) | 27.9 |
GMACs | 4.5 |
激活值(M) | 13.4 |
圖像尺寸 | 224 x 224 |
相關論文 | ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoders |
原始代碼庫 | https://github.com/facebookresearch/ConvNeXt-V2 |
預訓練數據集 | ImageNet-1k |
模型比較
你可以在timm 模型結果中查看該模型的數據集和運行時指標。所有計時數據均來自在RTX 3090上使用AMP的PyTorch 1.13急切模式模型。
模型 | top1 | top5 | 圖像尺寸 | 參數數量 | GMACs | 激活值 | 每秒樣本數 | 批量大小 |
---|---|---|---|---|---|---|---|---|
convnextv2_huge.fcmae_ft_in22k_in1k_512 | 88.848 | 98.742 | 512 | 660.29 | 600.81 | 413.07 | 28.58 | 48 |
convnextv2_huge.fcmae_ft_in22k_in1k_384 | 88.668 | 98.738 | 384 | 660.29 | 337.96 | 232.35 | 50.56 | 64 |
convnext_xxlarge.clip_laion2b_soup_ft_in1k | 88.612 | 98.704 | 256 | 846.47 | 198.09 | 124.45 | 122.45 | 256 |
convnext_large_mlp.clip_laion2b_soup_ft_in12k_in1k_384 | 88.312 | 98.578 | 384 | 200.13 | 101.11 | 126.74 | 196.84 | 256 |
convnextv2_large.fcmae_ft_in22k_in1k_384 | 88.196 | 98.532 | 384 | 197.96 | 101.1 | 126.74 | 128.94 | 128 |
convnext_large_mlp.clip_laion2b_soup_ft_in12k_in1k_320 | 87.968 | 98.47 | 320 | 200.13 | 70.21 | 88.02 | 283.42 | 256 |
convnext_xlarge.fb_in22k_ft_in1k_384 | 87.75 | 98.556 | 384 | 350.2 | 179.2 | 168.99 | 124.85 | 192 |
convnextv2_base.fcmae_ft_in22k_in1k_384 | 87.646 | 98.422 | 384 | 88.72 | 45.21 | 84.49 | 209.51 | 256 |
convnext_large.fb_in22k_ft_in1k_384 | 87.476 | 98.382 | 384 | 197.77 | 101.1 | 126.74 | 194.66 | 256 |
convnext_large_mlp.clip_laion2b_augreg_ft_in1k | 87.344 | 98.218 | 256 | 200.13 | 44.94 | 56.33 | 438.08 | 256 |
convnextv2_large.fcmae_ft_in22k_in1k | 87.26 | 98.248 | 224 | 197.96 | 34.4 | 43.13 | 376.84 | 256 |
convnext_base.clip_laion2b_augreg_ft_in12k_in1k_384 | 87.138 | 98.212 | 384 | 88.59 | 45.21 | 84.49 | 365.47 | 256 |
convnext_xlarge.fb_in22k_ft_in1k | 87.002 | 98.208 | 224 | 350.2 | 60.98 | 57.5 | 368.01 | 256 |
convnext_base.fb_in22k_ft_in1k_384 | 86.796 | 98.264 | 384 | 88.59 | 45.21 | 84.49 | 366.54 | 256 |
convnextv2_base.fcmae_ft_in22k_in1k | 86.74 | 98.022 | 224 | 88.72 | 15.38 | 28.75 | 624.23 | 256 |
convnext_large.fb_in22k_ft_in1k | 86.636 | 98.028 | 224 | 197.77 | 34.4 | 43.13 | 581.43 | 256 |
convnext_base.clip_laiona_augreg_ft_in1k_384 | 86.504 | 97.97 | 384 | 88.59 | 45.21 | 84.49 | 368.14 | 256 |
convnext_base.clip_laion2b_augreg_ft_in12k_in1k | 86.344 | 97.97 | 256 | 88.59 | 20.09 | 37.55 | 816.14 | 256 |
convnextv2_huge.fcmae_ft_in1k | 86.256 | 97.75 | 224 | 660.29 | 115.0 | 79.07 | 154.72 | 256 |
convnext_small.in12k_ft_in1k_384 | 86.182 | 97.92 | 384 | 50.22 | 25.58 | 63.37 | 516.19 | 256 |
convnext_base.clip_laion2b_augreg_ft_in1k | 86.154 | 97.68 | 256 | 88.59 | 20.09 | 37.55 | 819.86 | 256 |
convnext_base.fb_in22k_ft_in1k | 85.822 | 97.866 | 224 | 88.59 | 15.38 | 28.75 | 1037.66 | 256 |
convnext_small.fb_in22k_ft_in1k_384 | 85.778 | 97.886 | 384 | 50.22 | 25.58 | 63.37 | 518.95 | 256 |
convnextv2_large.fcmae_ft_in1k | 85.742 | 97.584 | 224 | 197.96 | 34.4 | 43.13 | 375.23 | 256 |
convnext_small.in12k_ft_in1k | 85.174 | 97.506 | 224 | 50.22 | 8.71 | 21.56 | 1474.31 | 256 |
convnext_tiny.in12k_ft_in1k_384 | 85.118 | 97.608 | 384 | 28.59 | 13.14 | 39.48 | 856.76 | 256 |
convnextv2_tiny.fcmae_ft_in22k_in1k_384 | 85.112 | 97.63 | 384 | 28.64 | 13.14 | 39.48 | 491.32 | 256 |
convnextv2_base.fcmae_ft_in1k | 84.874 | 97.09 | 224 | 88.72 | 15.38 | 28.75 | 625.33 | 256 |
convnext_small.fb_in22k_ft_in1k | 84.562 | 97.394 | 224 | 50.22 | 8.71 | 21.56 | 1478.29 | 256 |
convnext_large.fb_in1k | 84.282 | 96.892 | 224 | 197.77 | 34.4 | 43.13 | 584.28 | 256 |
convnext_tiny.in12k_ft_in1k | 84.186 | 97.124 | 224 | 28.59 | 4.47 | 13.44 | 2433.7 | 256 |
convnext_tiny.fb_in22k_ft_in1k_384 | 84.084 | 97.14 | 384 | 28.59 | 13.14 | 39.48 | 862.95 | 256 |
convnextv2_tiny.fcmae_ft_in22k_in1k | 83.894 | 96.964 | 224 | 28.64 | 4.47 | 13.44 | 1452.72 | 256 |
convnext_base.fb_in1k | 83.82 | 96.746 | 224 | 88.59 | 15.38 | 28.75 | 1054.0 | 256 |
convnextv2_nano.fcmae_ft_in22k_in1k_384 | 83.37 | 96.742 | 384 | 15.62 | 7.22 | 24.61 | 801.72 | 256 |
convnext_small.fb_in1k | 83.142 | 96.434 | 224 | 50.22 | 8.71 | 21.56 | 1464.0 | 256 |
convnextv2_tiny.fcmae_ft_in1k | 82.92 | 96.284 | 224 | 28.64 | 4.47 | 13.44 | 1425.62 | 256 |
convnext_tiny.fb_in22k_ft_in1k | 82.898 | 96.616 | 224 | 28.59 | 4.47 | 13.44 | 2480.88 | 256 |
convnext_nano.in12k_ft_in1k | 82.282 | 96.344 | 224 | 15.59 | 2.46 | 8.37 | 3926.52 | 256 |
convnext_tiny_hnf.a2h_in1k | 82.216 | 95.852 | 224 | 28.59 | 4.47 | 13.44 | 2529.75 | 256 |
convnext_tiny.fb_in1k | 82.066 | 95.854 | 224 | 28.59 | 4.47 | 13.44 | 2346.26 | 256 |
convnextv2_nano.fcmae_ft_in22k_in1k | 82.03 | 96.166 | 224 | 15.62 | 2.46 | 8.37 | 2300.18 | 256 |
convnextv2_nano.fcmae_ft_in1k | 81.83 | 95.738 | 224 | 15.62 | 2.46 | 8.37 | 2321.48 | 256 |
convnext_nano_ols.d1h_in1k | 80.866 | 95.246 | 224 | 15.65 | 2.65 | 9.38 | 3523.85 | 256 |
convnext_nano.d1h_in1k | 80.768 | 95.334 | 224 | 15.59 | 2.46 | 8.37 | 3915.58 | 256 |
convnextv2_pico.fcmae_ft_in1k | 80.304 | 95.072 | 224 | 9.07 | 1.37 | 6.1 | 3274.57 | 256 |
convnext_pico.d1_in1k | 79.526 | 94.558 | 224 | 9.05 | 1.37 | 6.1 | 5686.88 | 256 |
convnext_pico_ols.d1_in1k | 79.522 | 94.692 | 224 | 9.06 | 1.43 | 6.5 | 5422.46 | 256 |
convnextv2_femto.fcmae_ft_in1k | 78.488 | 93.98 | 224 | 5.23 | 0.79 | 4.57 | 4264.2 | 256 |
convnext_femto_ols.d1_in1k | 77.86 | 93.83 | 224 | 5.23 | 0.82 | 4.87 | 6910.6 | 256 |
convnext_femto.d1_in1k | 77.454 | 93.68 | 224 | 5.22 | 0.79 | 4.57 | 7189.92 | 256 |
convnextv2_atto.fcmae_ft_in1k | 76.664 | 93.044 | 224 | 3.71 | 0.55 | 3.81 | 4728.91 | 256 |
convnext_atto_ols.a2_in1k | 75.88 | 92.846 | 224 | 3.7 | 0.58 | 4.11 | 7963.16 | 256 |
convnext_atto.d2_in1k | 75.664 | 92.9 | 224 | 3.7 | 0.55 | 3.81 | 8439.22 | 256 |
💻 使用示例
基礎用法
圖像分類
from urllib.request import urlopen
from PIL import Image
import timm
img = Image.open(urlopen(
'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png'
))
model = timm.create_model('convnextv2_tiny.fcmae', pretrained=True)
model = model.eval()
# get model specific transforms (normalization, resize)
data_config = timm.data.resolve_model_data_config(model)
transforms = timm.data.create_transform(**data_config, is_training=False)
output = model(transforms(img).unsqueeze(0)) # unsqueeze single image into batch of 1
top5_probabilities, top5_class_indices = torch.topk(output.softmax(dim=1) * 100, k=5)
特徵圖提取
from urllib.request import urlopen
from PIL import Image
import timm
img = Image.open(urlopen(
'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png'
))
model = timm.create_model(
'convnextv2_tiny.fcmae',
pretrained=True,
features_only=True,
)
model = model.eval()
# get model specific transforms (normalization, resize)
data_config = timm.data.resolve_model_data_config(model)
transforms = timm.data.create_transform(**data_config, is_training=False)
output = model(transforms(img).unsqueeze(0)) # unsqueeze single image into batch of 1
for o in output:
# print shape of each feature map in output
# e.g.:
# torch.Size([1, 96, 56, 56])
# torch.Size([1, 192, 28, 28])
# torch.Size([1, 384, 14, 14])
# torch.Size([1, 768, 7, 7])
print(o.shape)
圖像嵌入
from urllib.request import urlopen
from PIL import Image
import timm
img = Image.open(urlopen(
'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png'
))
model = timm.create_model(
'convnextv2_tiny.fcmae',
pretrained=True,
num_classes=0, # remove classifier nn.Linear
)
model = model.eval()
# get model specific transforms (normalization, resize)
data_config = timm.data.resolve_model_data_config(model)
transforms = timm.data.create_transform(**data_config, is_training=False)
output = model(transforms(img).unsqueeze(0)) # output is (batch_size, num_features) shaped tensor
# or equivalently (without needing to set num_classes=0)
output = model.forward_features(transforms(img).unsqueeze(0))
# output is unpooled, a (1, 768, 7, 7) shaped tensor
output = model.forward_head(output, pre_logits=True)
# output is a (1, num_features) shaped tensor
📄 許可證
本模型採用CC BY-NC 4.0許可證。
🔖 引用
@article{Woo2023ConvNeXtV2,
title={ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoders},
author={Sanghyun Woo, Shoubhik Debnath, Ronghang Hu, Xinlei Chen, Zhuang Liu, In So Kweon and Saining Xie},
year={2023},
journal={arXiv preprint arXiv:2301.00808},
}
@misc{rw2019timm,
author = {Ross Wightman},
title = {PyTorch Image Models},
year = {2019},
publisher = {GitHub},
journal = {GitHub repository},
doi = {10.5281/zenodo.4414861},
howpublished = {\url{https://github.com/huggingface/pytorch-image-models}}
}
Nsfw Image Detection
Apache-2.0
基於ViT架構的NSFW圖像分類模型,通過監督學習在ImageNet-21k數據集上預訓練,並在80,000張圖像上微調,用於區分正常和NSFW內容。
圖像分類
Transformers

N
Falconsai
82.4M
588
Fairface Age Image Detection
Apache-2.0
基於Vision Transformer架構的圖像分類模型,在ImageNet-21k數據集上預訓練,適用於多類別圖像分類任務
圖像分類
Transformers

F
dima806
76.6M
10
Dinov2 Small
Apache-2.0
基於DINOv2方法訓練的小尺寸視覺Transformer模型,通過自監督學習提取圖像特徵
圖像分類
Transformers

D
facebook
5.0M
31
Vit Base Patch16 224
Apache-2.0
基於ImageNet-21k預訓練和ImageNet微調的視覺變換器模型,用於圖像分類任務
圖像分類
V
google
4.8M
775
Vit Base Patch16 224 In21k
Apache-2.0
基於ImageNet-21k數據集預訓練的視覺Transformer模型,用於圖像分類任務。
圖像分類
V
google
2.2M
323
Dinov2 Base
Apache-2.0
基於DINOv2方法訓練的視覺Transformer模型,通過自監督學習提取圖像特徵
圖像分類
Transformers

D
facebook
1.9M
126
Gender Classification
一個基於PyTorch和HuggingPics構建的圖像分類模型,用於識別圖像中的性別
圖像分類
Transformers

G
rizvandwiki
1.8M
48
Vit Base Nsfw Detector
Apache-2.0
基於Vision Transformer (ViT)架構的圖像分類模型,專門用於檢測圖像是否包含NSFW(不安全)內容。
圖像分類
Transformers

V
AdamCodd
1.2M
47
Vit Hybrid Base Bit 384
Apache-2.0
混合視覺變換器(ViT)模型結合了卷積網絡和Transformer架構,用於圖像分類任務,在ImageNet上表現出色。
圖像分類
Transformers

V
google
992.28k
6
Gender Classification 2
這是一個基於PyTorch框架和HuggingPics工具生成的圖像分類模型,專門用於性別分類任務。
圖像分類
Transformers

G
rizvandwiki
906.98k
32
精選推薦AI模型
Llama 3 Typhoon V1.5x 8b Instruct
專為泰語設計的80億參數指令模型,性能媲美GPT-3.5-turbo,優化了應用場景、檢索增強生成、受限生成和推理任務
大型語言模型
Transformers 支持多種語言

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一個基於SODA數據集訓練的超小型對話模型,專為邊緣設備推理設計,體積僅為Cosmo-3B模型的2%左右。
對話系統
Transformers 英語

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基於RoBERTa架構的中文抽取式問答模型,適用於從給定文本中提取答案的任務。
問答系統 中文
R
uer
2,694
98