regnetx_032.tv2_in1k

我要开发同款
匿名用户2024年07月31日
62阅读

技术信息

开源地址
https://modelscope.cn/models/timm/regnetx_032.tv2_in1k
授权协议
bsd-3-clause

作品详情

Model card for regetx032.tv2i1k

A RegNetX-3.2GF image classificatio model. Pretraied o ImageNet-1k by torchvisio cotributors (see ImageNet1K-V2 weight details https://github.com/pytorch/visio/issues/3995#ew-recipe).

The timm RegNet implemetatio icludes a umber of ehacemets ot preset i other implemetatios, icludig:

  • stochastic depth
  • gradiet checkpoitig
  • layer-wise LR decay
  • cofigurable output stride (dilatio)
  • cofigurable activatio ad orm layers
  • optio for a pre-activatio bottleeck block used i RegNetV variat
  • oly kow RegNetZ model defiitios with pretraied weights

Model Details

  • Model Type: Image classificatio / feature backboe
  • Model Stats:
  • Params (M): 15.3
  • GMACs: 3.2
  • Activatios (M): 11.4
  • Image size: 224 x 224
  • Papers:
  • Desigig Network Desig Spaces: https://arxiv.org/abs/2003.13678
  • Origial: https://github.com/pytorch/visio

Model Usage

Image Classificatio

from urllib.request import urlope
from PIL import Image
import timm

img = Image.ope(urlope(
    'https://huggigface.co/datasets/huggigface/documetatio-images/resolve/mai/beigets-task-guide.pg'
))

model = timm.create_model('regetx_032.tv2_i1k', pretraied=True)
model = model.eval()

# get model specific trasforms (ormalizatio, resize)
data_cofig = timm.data.resolve_model_data_cofig(model)
trasforms = timm.data.create_trasform(**data_cofig, is_traiig=False)

output = model(trasforms(img).usqueeze(0))  # usqueeze sigle image ito batch of 1

top5_probabilities, top5_class_idices = torch.topk(output.softmax(dim=1) * 100, k=5)

Feature Map Extractio

from urllib.request import urlope
from PIL import Image
import timm

img = Image.ope(urlope(
    'https://huggigface.co/datasets/huggigface/documetatio-images/resolve/mai/beigets-task-guide.pg'
))

model = timm.create_model(
    'regetx_032.tv2_i1k',
    pretraied=True,
    features_oly=True,
)
model = model.eval()

# get model specific trasforms (ormalizatio, resize)
data_cofig = timm.data.resolve_model_data_cofig(model)
trasforms = timm.data.create_trasform(**data_cofig, is_traiig=False)

output = model(trasforms(img).usqueeze(0))  # usqueeze sigle image ito batch of 1

for o i output:
    # prit shape of each feature map i output
    # e.g.:
    #  torch.Size([1, 32, 112, 112])
    #  torch.Size([1, 96, 56, 56])
    #  torch.Size([1, 192, 28, 28])
    #  torch.Size([1, 432, 14, 14])
    #  torch.Size([1, 1008, 7, 7])

    prit(o.shape)

Image Embeddigs

from urllib.request import urlope
from PIL import Image
import timm

img = Image.ope(urlope(
    'https://huggigface.co/datasets/huggigface/documetatio-images/resolve/mai/beigets-task-guide.pg'
))

model = timm.create_model(
    'regetx_032.tv2_i1k',
    pretraied=True,
    um_classes=0,  # remove classifier .Liear
)
model = model.eval()

# get model specific trasforms (ormalizatio, resize)
data_cofig = timm.data.resolve_model_data_cofig(model)
trasforms = timm.data.create_trasform(**data_cofig, is_traiig=False)

output = model(trasforms(img).usqueeze(0))  # output is (batch_size, um_features) shaped tesor

# or equivaletly (without eedig to set um_classes=0)

output = model.forward_features(trasforms(img).usqueeze(0))
# output is upooled, a (1, 1008, 7, 7) shaped tesor

output = model.forward_head(output, pre_logits=True)
# output is a (1, um_features) shaped tesor

Model Compariso

Explore the dataset ad rutime metrics of this model i timm model results.

For the compariso summary below, the rai1k, ra3i1k, chi1k, sw, ad lio_ tagged weights are traied i timm.

model img_size top1 top5 param_cout gmacs macts
regety1280.swagft_i1k 384 88.228 98.684 644.81 374.99 210.2
regety320.swagft_i1k 384 86.84 98.364 145.05 95.0 88.87
regety160.swagft_i1k 384 86.024 98.05 83.59 46.87 67.67
regety160.swi12kfti1k 288 86.004 97.83 83.59 26.37 38.07
regety1280.swaglc_i1k 224 85.996 97.848 644.81 127.66 71.58
regety160.lioi12kfti1k 288 85.982 97.844 83.59 26.37 38.07
regety160.swi12kfti1k 224 85.574 97.666 83.59 15.96 23.04
regety160.lioi12kfti1k 224 85.564 97.674 83.59 15.96 23.04
regety120.swi12kfti1k 288 85.398 97.584 51.82 20.06 35.34
regety2560.seerft_i1k 384 85.15 97.436 1282.6 747.83 296.49
regetze8.ra3i1k 320 85.036 97.268 57.7 15.46 63.94
regety120.swi12kfti1k 224 84.976 97.416 51.82 12.14 21.38
regety320.swaglc_i1k 224 84.56 97.446 145.05 32.34 30.26
regetz040h.ra3_i1k 320 84.496 97.004 28.94 6.43 37.94
regetze8.ra3i1k 256 84.436 97.02 57.7 9.91 40.94
regety1280.seerft_i1k 384 84.432 97.092 644.81 374.99 210.2
regetz040.ra3i1k 320 84.246 96.93 27.12 6.35 37.78
regetzd8.ra3i1k 320 84.054 96.992 23.37 6.19 37.08
regetzd8evos.ch_i1k 320 84.038 96.992 23.46 7.03 38.92
regetzd32.ra3i1k 320 84.022 96.866 27.58 9.33 37.08
regety080.ra3i1k 288 83.932 96.888 39.18 13.22 29.69
regety640.seerft_i1k 384 83.912 96.924 281.38 188.47 124.83
regety160.swaglc_i1k 224 83.778 97.286 83.59 15.96 23.04
regetz040h.ra3_i1k 256 83.776 96.704 28.94 4.12 24.29
regetv064.ra3i1k 288 83.72 96.75 30.58 10.55 27.11
regety064.ra3i1k 288 83.718 96.724 30.58 10.56 27.11
regety160.deiti1k 288 83.69 96.778 83.59 26.37 38.07
regetz040.ra3i1k 256 83.62 96.704 27.12 4.06 24.19
regetzd8.ra3i1k 256 83.438 96.776 23.37 3.97 23.74
regetzd32.ra3i1k 256 83.424 96.632 27.58 5.98 23.74
regetzd8evos.ch_i1k 256 83.36 96.636 23.46 4.5 24.92
regety320.seerft_i1k 384 83.35 96.71 145.05 95.0 88.87
regetv040.ra3i1k 288 83.204 96.66 20.64 6.6 20.3
regety320.tv2i1k 224 83.162 96.42 145.05 32.34 30.26
regety080.ra3i1k 224 83.16 96.486 39.18 8.0 17.97
regetv064.ra3i1k 224 83.108 96.458 30.58 6.39 16.41
regety040.ra3i1k 288 83.044 96.5 20.65 6.61 20.3
regety064.ra3i1k 224 83.02 96.292 30.58 6.39 16.41
regety160.deiti1k 224 82.974 96.502 83.59 15.96 23.04
regetx320.tv2i1k 224 82.816 96.208 107.81 31.81 36.3
regety032.rai1k 288 82.742 96.418 19.44 5.29 18.61
regety160.tv2i1k 224 82.634 96.22 83.59 15.96 23.04
regetzc16evos.ch_i1k 320 82.634 96.472 13.49 3.86 25.88
regety080tv.tv2_i1k 224 82.592 96.246 39.38 8.51 19.73
regetx160.tv2i1k 224 82.564 96.052 54.28 15.99 25.52
regetzc16.ra3i1k 320 82.51 96.358 13.46 3.92 25.88
regetv040.ra3i1k 224 82.44 96.198 20.64 4.0 12.29
regety040.ra3i1k 224 82.304 96.078 20.65 4.0 12.29
regetzc16.ra3i1k 256 82.16 96.048 13.46 2.51 16.57
regetzc16evos.ch_i1k 256 81.936 96.15 13.49 2.48 16.57
regety032.rai1k 224 81.924 95.988 19.44 3.2 11.26
regety032.tv2i1k 224 81.77 95.842 19.44 3.2 11.26
regetx080.tv2i1k 224 81.552 95.544 39.57 8.02 14.06
regetx032.tv2i1k 224 80.924 95.27 15.3 3.2 11.37
regety320.pyclsi1k 224 80.804 95.246 145.05 32.34 30.26
regetzb16.ra3i1k 288 80.712 95.47 9.72 2.39 16.43
regety016.tv2i1k 224 80.66 95.334 11.2 1.63 8.04
regety120.pyclsi1k 224 80.37 95.12 51.82 12.14 21.38
regety160.pyclsi1k 224 80.288 94.964 83.59 15.96 23.04
regetx320.pyclsi1k 224 80.246 95.01 107.81 31.81 36.3
regety080.pyclsi1k 224 79.882 94.834 39.18 8.0 17.97
regetzb16.ra3i1k 224 79.872 94.974 9.72 1.45 9.95
regetx160.pyclsi1k 224 79.862 94.828 54.28 15.99 25.52
regety064.pyclsi1k 224 79.716 94.772 30.58 6.39 16.41
regetx120.pyclsi1k 224 79.592 94.738 46.11 12.13 21.37
regetx016.tv2i1k 224 79.44 94.772 9.19 1.62 7.93
regety040.pyclsi1k 224 79.23 94.654 20.65 4.0 12.29
regetx080.pyclsi1k 224 79.198 94.55 39.57 8.02 14.06
regetx064.pyclsi1k 224 79.064 94.454 26.21 6.49 16.37
regety032.pyclsi1k 224 78.884 94.412 19.44 3.2 11.26
regety008tv.tv2_i1k 224 78.654 94.388 6.43 0.84 5.42
regetx040.pyclsi1k 224 78.482 94.24 22.12 3.99 12.2
regetx032.pyclsi1k 224 78.178 94.08 15.3 3.2 11.37
regety016.pyclsi1k 224 77.862 93.73 11.2 1.63 8.04
regetx008.tv2i1k 224 77.302 93.672 7.26 0.81 5.15
regetx016.pyclsi1k 224 76.908 93.418 9.19 1.62 7.93
regety008.pyclsi1k 224 76.296 93.05 6.26 0.81 5.25
regety004.tv2i1k 224 75.592 92.712 4.34 0.41 3.89
regety006.pyclsi1k 224 75.244 92.518 6.06 0.61 4.33
regetx008.pyclsi1k 224 75.042 92.342 7.26 0.81 5.15
regetx004tv.tv2_i1k 224 74.57 92.184 5.5 0.42 3.17
regety004.pyclsi1k 224 74.018 91.764 4.34 0.41 3.89
regetx006.pyclsi1k 224 73.862 91.67 6.2 0.61 3.98
regetx004.pyclsi1k 224 72.38 90.832 5.16 0.4 3.14
regety002.pyclsi1k 224 70.282 89.534 3.16 0.2 2.17
regetx002.pyclsi1k 224 68.752 88.556 2.68 0.2 2.16

Citatio

@IProceedigs{Radosavovic2020,
  title = {Desigig Network Desig Spaces},
  author = {Ilija Radosavovic ad Raj Prateek Kosaraju ad Ross Girshick ad Kaimig He ad Piotr Doll{'a}r},
  booktitle = {CVPR},
  year = {2020}
}
@misc{rw2019timm,
  author = {Ross Wightma},
  title = {PyTorch Image Models},
  year = {2019},
  publisher = {GitHub},
  joural = {GitHub repository},
  doi = {10.5281/zeodo.4414861},
  howpublished = {\url{https://github.com/huggigface/pytorch-image-models}}
}

功能介绍

Model card for regnetx032.tv2in1k A RegNetX-3.2GF image classification model. Pretrained on ImageNet

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论