Skip to content

Commit 28b2ee1

Browse files
committed
remove ice and update out_indices
1 parent fc28ad6 commit 28b2ee1

File tree

7 files changed

+115
-127
lines changed

7 files changed

+115
-127
lines changed
Lines changed: 30 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,111 @@
11
__all__ = [
2-
# "ice_mobilenetv2_100",
3-
# "ice_mobilenetv2_110d",
4-
# "ice_mobilenetv2_120d",
5-
# "ice_mobilenetv2_140",
6-
"ice_mobilenetv3_large_075",
7-
"ice_mobilenetv3_large_100",
8-
"ice_mobilenetv3_rw",
9-
"ice_mobilenetv3_small_075",
10-
"ice_mobilenetv3_small_100",
11-
"ice_tf_mobilenetv3_large_075",
12-
"ice_tf_mobilenetv3_large_100",
13-
"ice_tf_mobilenetv3_large_minimal_100",
14-
"ice_tf_mobilenetv3_small_075",
15-
"ice_tf_mobilenetv3_small_100",
16-
"ice_tf_mobilenetv3_small_minimal_100",
2+
# "mobilenetv2_100",
3+
# "mobilenetv2_110d",
4+
# "mobilenetv2_120d",
5+
# "mobilenetv2_140",
6+
"mobilenetv3_large_075",
7+
"mobilenetv3_large_100",
8+
"mobilenetv3_rw",
9+
"mobilenetv3_small_075",
10+
"mobilenetv3_small_100",
11+
"tf_mobilenetv3_large_075",
12+
"tf_mobilenetv3_large_100",
13+
"tf_mobilenetv3_large_minimal_100",
14+
"tf_mobilenetv3_small_075",
15+
"tf_mobilenetv3_small_100",
16+
"tf_mobilenetv3_small_minimal_100",
1717
]
1818

1919
from icevision.soft_dependencies import SoftDependencies
2020

2121
from timm.models.mobilenetv3 import *
2222

2323

24-
# def ice_mobilenetv2_100(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs):
24+
# def mobilenetv2_100(pretrained=True, out_indices=(2, 3, 4), **kwargs):
2525
# return mobilenetv2_100(
2626
# pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
2727
# )
2828

2929

30-
# def ice_mobilenetv2_110d(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs):
30+
# def mobilenetv2_110d(pretrained=True, out_indices=(2, 3, 4), **kwargs):
3131
# return mobilenetv2_110d(
3232
# pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
3333
# )
3434

3535

36-
# def ice_mobilenetv2_120d(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs):
36+
# def mobilenetv2_120d(pretrained=True, out_indices=(2, 3, 4), **kwargs):
3737
# return mobilenetv2_120d(
3838
# pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
3939
# )
4040

4141

42-
# def ice_mobilenetv2_140(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs):
42+
# def mobilenetv2_140(pretrained=True, out_indices=(2, 3, 4), **kwargs):
4343
# return mobilenetv2_140(
4444
# pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
4545
# )
4646

4747

48-
def ice_mobilenetv3_large_075(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs):
48+
def mobilenetv3_large_075(pretrained=True, out_indices=(2, 3, 4), **kwargs):
4949
return mobilenetv3_large_075(
5050
pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
5151
)
5252

5353

54-
def ice_mobilenetv3_large_100(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs):
54+
def mobilenetv3_large_100(pretrained=True, out_indices=(2, 3, 4), **kwargs):
5555
return mobilenetv3_large_100(
5656
pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
5757
)
5858

5959

60-
def ice_mobilenetv3_rw(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs):
60+
def mobilenetv3_rw(pretrained=True, out_indices=(2, 3, 4), **kwargs):
6161
return mobilenetv3_rw(
6262
pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
6363
)
6464

6565

66-
def ice_mobilenetv3_small_075(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs):
66+
def mobilenetv3_small_075(pretrained=True, out_indices=(2, 3, 4), **kwargs):
6767
return mobilenetv3_small_075(
6868
pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
6969
)
7070

7171

72-
def ice_mobilenetv3_small_100(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs):
72+
def mobilenetv3_small_100(pretrained=True, out_indices=(2, 3, 4), **kwargs):
7373
return mobilenetv3_small_100(
7474
pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
7575
)
7676

7777

78-
def ice_tf_mobilenetv3_large_075(
79-
pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs
80-
):
78+
def tf_mobilenetv3_large_075(pretrained=True, out_indices=(2, 3, 4), **kwargs):
8179
return tf_mobilenetv3_large_075(
8280
pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
8381
)
8482

8583

86-
def ice_tf_mobilenetv3_large_100(
87-
pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs
88-
):
84+
def tf_mobilenetv3_large_100(pretrained=True, out_indices=(2, 3, 4), **kwargs):
8985
return tf_mobilenetv3_large_100(
9086
pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
9187
)
9288

9389

94-
def ice_tf_mobilenetv3_large_minimal_100(
95-
pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs
96-
):
90+
def tf_mobilenetv3_large_minimal_100(pretrained=True, out_indices=(2, 3, 4), **kwargs):
9791
return tf_mobilenetv3_large_100(
9892
pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
9993
)
10094

10195

102-
def ice_tf_mobilenetv3_small_075(
103-
pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs
104-
):
96+
def tf_mobilenetv3_small_075(pretrained=True, out_indices=(2, 3, 4), **kwargs):
10597
return tf_mobilenetv3_small_075(
10698
pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
10799
)
108100

109101

110-
def ice_tf_mobilenetv3_small_100(
111-
pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs
112-
):
102+
def tf_mobilenetv3_small_100(pretrained=True, out_indices=(2, 3, 4), **kwargs):
113103
return tf_mobilenetv3_small_100(
114104
pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
115105
)
116106

117107

118-
def ice_tf_mobilenetv3_small_minimal_100(
119-
pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs
120-
):
108+
def tf_mobilenetv3_small_minimal_100(pretrained=True, out_indices=(2, 3, 4), **kwargs):
121109
return tf_mobilenetv3_small_100(
122110
pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
123111
)
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
11
__all__ = [
2-
"ice_resnest14d",
3-
"ice_resnest26d",
4-
"ice_resnest50d",
5-
"ice_resnest50d_1s4x24d",
6-
"ice_resnest50d_4s2x40d",
7-
"ice_resnest101e",
8-
"ice_resnest200e",
9-
"ice_resnest269e",
2+
"resnest14d",
3+
"resnest26d",
4+
"resnest50d",
5+
"resnest50d_1s4x24d",
6+
"resnest50d_4s2x40d",
7+
"resnest101e",
8+
"resnest200e",
9+
"resnest269e",
1010
]
1111

1212
from icevision.soft_dependencies import SoftDependencies
1313

1414
from timm.models.resnest import *
1515

1616

17-
def ice_resnest14d(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs):
17+
def resnest14d(pretrained=True, out_indices=(2, 3, 4), **kwargs):
1818
return resnest14d(
1919
pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
2020
)
2121

2222

23-
def ice_resnest26d(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs):
23+
def resnest26d(pretrained=True, out_indices=(2, 3, 4), **kwargs):
2424
return resnest26d(
2525
pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
2626
)
2727

2828

29-
def ice_resnest50d(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs):
29+
def resnest50d(pretrained=True, out_indices=(2, 3, 4), **kwargs):
3030
return resnest50d(
3131
pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
3232
)
3333

3434

35-
def ice_resnest50d_1s4x24d(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs):
35+
def resnest50d_1s4x24d(pretrained=True, out_indices=(2, 3, 4), **kwargs):
3636
return resnest50d_1s4x24d(
3737
pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
3838
)
3939

4040

41-
def ice_resnest50d_4s2x40d(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs):
41+
def resnest50d_4s2x40d(pretrained=True, out_indices=(2, 3, 4), **kwargs):
4242
return resnest50d_4s2x40d(
4343
pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
4444
)
4545

4646

47-
def ice_resnest101e(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs):
47+
def resnest101e(pretrained=True, out_indices=(2, 3, 4), **kwargs):
4848
return resnest101e(
4949
pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
5050
)
5151

5252

53-
def ice_resnest200e(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs):
53+
def resnest200e(pretrained=True, out_indices=(2, 3, 4), **kwargs):
5454
return resnest200e(
5555
pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
5656
)
5757

5858

59-
def ice_resnest269e(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs):
59+
def resnest269e(pretrained=True, out_indices=(2, 3, 4), **kwargs):
6060
return resnest269e(
6161
pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs
6262
)

icevision/models/mmdet/backbones/timm/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
class MMDetTimmBase(nn.Module):
7-
def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs):
7+
def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs):
88
super().__init__()
99
self.pretrained = pretrained
1010
self.out_indices = out_indices

0 commit comments

Comments
 (0)