Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
stoneliu1981
pytorch-image-models
提交
c03e45cb
P
pytorch-image-models
项目概览
stoneliu1981
/
pytorch-image-models
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
pytorch-image-models
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
c03e45cb
编写于
4月 28, 2021
作者:
R
Ross Wightman
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'mrT23-master'
上级
9a1bd358
a0492e3b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
64 addition
and
1 deletion
+64
-1
timm/models/mobilenetv3.py
timm/models/mobilenetv3.py
+24
-0
timm/models/tresnet.py
timm/models/tresnet.py
+9
-1
timm/models/vision_transformer.py
timm/models/vision_transformer.py
+31
-0
未找到文件。
timm/models/mobilenetv3.py
浏览文件 @
c03e45cb
...
...
@@ -39,6 +39,12 @@ default_cfgs = {
'mobilenetv3_large_100'
:
_cfg
(
interpolation
=
'bicubic'
,
url
=
'https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/mobilenetv3_large_100_ra-f55367f5.pth'
),
'mobilenetv3_large_100_miil'
:
_cfg
(
interpolation
=
'bilinear'
,
mean
=
(
0
,
0
,
0
),
std
=
(
1
,
1
,
1
),
url
=
'https://miil-public-eu.oss-eu-central-1.aliyuncs.com/model-zoo/ImageNet_21K_P/models/timm/mobilenetv3_large_100_1k_miil_78_0.pth'
),
'mobilenetv3_large_100_miil_in21k'
:
_cfg
(
interpolation
=
'bilinear'
,
mean
=
(
0
,
0
,
0
),
std
=
(
1
,
1
,
1
),
url
=
'https://miil-public-eu.oss-eu-central-1.aliyuncs.com/model-zoo/ImageNet_21K_P/models/timm/mobilenetv3_large_100_in21k_miil.pth'
,
num_classes
=
11221
),
'mobilenetv3_small_075'
:
_cfg
(
url
=
''
),
'mobilenetv3_small_100'
:
_cfg
(
url
=
''
),
'mobilenetv3_rw'
:
_cfg
(
...
...
@@ -367,6 +373,24 @@ def mobilenetv3_large_100(pretrained=False, **kwargs):
return
model
@
register_model
def
mobilenetv3_large_100_miil
(
pretrained
=
False
,
**
kwargs
):
""" MobileNet V3
Weights taken from: https://github.com/Alibaba-MIIL/ImageNet21K
"""
model
=
_gen_mobilenet_v3
(
'mobilenetv3_large_100_miil'
,
1.0
,
pretrained
=
pretrained
,
**
kwargs
)
return
model
@
register_model
def
mobilenetv3_large_100_miil_in21k
(
pretrained
=
False
,
**
kwargs
):
""" MobileNet V3, 21k pretraining
Weights taken from: https://github.com/Alibaba-MIIL/ImageNet21K
"""
model
=
_gen_mobilenet_v3
(
'mobilenetv3_large_100_miil_in21k'
,
1.0
,
pretrained
=
pretrained
,
**
kwargs
)
return
model
@
register_model
def
mobilenetv3_small_075
(
pretrained
=
False
,
**
kwargs
):
""" MobileNet V3 """
...
...
timm/models/tresnet.py
浏览文件 @
c03e45cb
...
...
@@ -32,7 +32,9 @@ def _cfg(url='', **kwargs):
default_cfgs
=
{
'tresnet_m'
:
_cfg
(
url
=
'https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-tresnet/tresnet_m_80_8-dbc13962.pth'
),
url
=
'https://miil-public-eu.oss-eu-central-1.aliyuncs.com/model-zoo/ImageNet_21K_P/models/timm/tresnet_m_1k_miil_83_1.pth'
),
'tresnet_m_miil_in21k'
:
_cfg
(
url
=
'https://miil-public-eu.oss-eu-central-1.aliyuncs.com/model-zoo/ImageNet_21K_P/models/timm/tresnet_m_miil_in21k.pth'
,
num_classes
=
11221
),
'tresnet_l'
:
_cfg
(
url
=
'https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-tresnet/tresnet_l_81_5-235b486c.pth'
),
'tresnet_xl'
:
_cfg
(
...
...
@@ -265,6 +267,12 @@ def tresnet_m(pretrained=False, **kwargs):
return
_create_tresnet
(
'tresnet_m'
,
pretrained
=
pretrained
,
**
model_kwargs
)
@
register_model
def
tresnet_m_miil_in21k
(
pretrained
=
False
,
**
kwargs
):
model_kwargs
=
dict
(
layers
=
[
3
,
4
,
11
,
3
],
**
kwargs
)
return
_create_tresnet
(
'tresnet_m_miil_in21k'
,
pretrained
=
pretrained
,
**
model_kwargs
)
@
register_model
def
tresnet_l
(
pretrained
=
False
,
**
kwargs
):
model_kwargs
=
dict
(
layers
=
[
4
,
5
,
18
,
3
],
width_factor
=
1.2
,
**
kwargs
)
...
...
timm/models/vision_transformer.py
浏览文件 @
c03e45cb
...
...
@@ -118,6 +118,17 @@ default_cfgs = {
'vit_deit_base_distilled_patch16_384'
:
_cfg
(
url
=
'https://dl.fbaipublicfiles.com/deit/deit_base_distilled_patch16_384-d0272ac0.pth'
,
input_size
=
(
3
,
384
,
384
),
crop_pct
=
1.0
,
classifier
=
(
'head'
,
'head_dist'
)),
# ViT ImageNet-21K-P pretraining
'vit_base_patch16_224_miil_in21k'
:
_cfg
(
url
=
'https://miil-public-eu.oss-eu-central-1.aliyuncs.com/model-zoo/ImageNet_21K_P/models/timm/vit_base_patch16_224_in21k_miil.pth'
,
mean
=
(
0
,
0
,
0
),
std
=
(
1
,
1
,
1
),
crop_pct
=
0.875
,
interpolation
=
'bilinear'
,
num_classes
=
11221
,
),
'vit_base_patch16_224_miil'
:
_cfg
(
url
=
'https://miil-public-eu.oss-eu-central-1.aliyuncs.com/model-zoo/ImageNet_21K_P/models/timm'
'/vit_base_patch16_224_1k_miil_84_4.pth'
,
mean
=
(
0
,
0
,
0
),
std
=
(
1
,
1
,
1
),
crop_pct
=
0.875
,
interpolation
=
'bilinear'
,
),
}
...
...
@@ -687,3 +698,23 @@ def vit_deit_base_distilled_patch16_384(pretrained=False, **kwargs):
model
=
_create_vision_transformer
(
'vit_deit_base_distilled_patch16_384'
,
pretrained
=
pretrained
,
distilled
=
True
,
**
model_kwargs
)
return
model
@
register_model
def
vit_base_patch16_224_miil_in21k
(
pretrained
=
False
,
**
kwargs
):
""" ViT-Base (ViT-B/16) from original paper (https://arxiv.org/abs/2010.11929).
Weights taken from: https://github.com/Alibaba-MIIL/ImageNet21K
"""
model_kwargs
=
dict
(
patch_size
=
16
,
embed_dim
=
768
,
depth
=
12
,
num_heads
=
12
,
qkv_bias
=
False
,
**
kwargs
)
model
=
_create_vision_transformer
(
'vit_base_patch16_224_miil_in21k'
,
pretrained
=
pretrained
,
**
model_kwargs
)
return
model
@
register_model
def
vit_base_patch16_224_miil
(
pretrained
=
False
,
**
kwargs
):
""" ViT-Base (ViT-B/16) from original paper (https://arxiv.org/abs/2010.11929).
Weights taken from: https://github.com/Alibaba-MIIL/ImageNet21K
"""
model_kwargs
=
dict
(
patch_size
=
16
,
embed_dim
=
768
,
depth
=
12
,
num_heads
=
12
,
qkv_bias
=
False
,
**
kwargs
)
model
=
_create_vision_transformer
(
'vit_base_patch16_224_miil'
,
pretrained
=
pretrained
,
**
model_kwargs
)
return
model
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录