From 28b2ee14ece5a3417523e3e646ff47ebb62f6408 Mon Sep 17 00:00:00 2001 From: ai-fast-track Date: Tue, 25 May 2021 16:50:46 -0400 Subject: [PATCH] remove ice and update out_indices --- icevision/backbones/timm/mobilenet.py | 72 ++++++++----------- icevision/backbones/timm/resnest.py | 32 ++++----- .../models/mmdet/backbones/timm/common.py | 2 +- .../models/mmdet/backbones/timm/mobilenet.py | 60 ++++++++-------- .../models/mmdet/backbones/timm/resnest.py | 32 ++++----- .../timm/mobilenet/timm_mobilenet_fpn.py | 28 ++++---- .../timm/resnest/timm_resnest_fpn.py | 16 ++--- 7 files changed, 115 insertions(+), 127 deletions(-) diff --git a/icevision/backbones/timm/mobilenet.py b/icevision/backbones/timm/mobilenet.py index d30758faa..5bd9c8aa6 100644 --- a/icevision/backbones/timm/mobilenet.py +++ b/icevision/backbones/timm/mobilenet.py @@ -1,19 +1,19 @@ __all__ = [ - # "ice_mobilenetv2_100", - # "ice_mobilenetv2_110d", - # "ice_mobilenetv2_120d", - # "ice_mobilenetv2_140", - "ice_mobilenetv3_large_075", - "ice_mobilenetv3_large_100", - "ice_mobilenetv3_rw", - "ice_mobilenetv3_small_075", - "ice_mobilenetv3_small_100", - "ice_tf_mobilenetv3_large_075", - "ice_tf_mobilenetv3_large_100", - "ice_tf_mobilenetv3_large_minimal_100", - "ice_tf_mobilenetv3_small_075", - "ice_tf_mobilenetv3_small_100", - "ice_tf_mobilenetv3_small_minimal_100", + # "mobilenetv2_100", + # "mobilenetv2_110d", + # "mobilenetv2_120d", + # "mobilenetv2_140", + "mobilenetv3_large_075", + "mobilenetv3_large_100", + "mobilenetv3_rw", + "mobilenetv3_small_075", + "mobilenetv3_small_100", + "tf_mobilenetv3_large_075", + "tf_mobilenetv3_large_100", + "tf_mobilenetv3_large_minimal_100", + "tf_mobilenetv3_small_075", + "tf_mobilenetv3_small_100", + "tf_mobilenetv3_small_minimal_100", ] from icevision.soft_dependencies import SoftDependencies @@ -21,103 +21,91 @@ from timm.models.mobilenetv3 import * -# def ice_mobilenetv2_100(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): +# def mobilenetv2_100(pretrained=True, out_indices=(2, 3, 4), **kwargs): # return mobilenetv2_100( # pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs # ) -# def ice_mobilenetv2_110d(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): +# def mobilenetv2_110d(pretrained=True, out_indices=(2, 3, 4), **kwargs): # return mobilenetv2_110d( # pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs # ) -# def ice_mobilenetv2_120d(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): +# def mobilenetv2_120d(pretrained=True, out_indices=(2, 3, 4), **kwargs): # return mobilenetv2_120d( # pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs # ) -# def ice_mobilenetv2_140(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): +# def mobilenetv2_140(pretrained=True, out_indices=(2, 3, 4), **kwargs): # return mobilenetv2_140( # pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs # ) -def ice_mobilenetv3_large_075(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): +def mobilenetv3_large_075(pretrained=True, out_indices=(2, 3, 4), **kwargs): return mobilenetv3_large_075( pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs ) -def ice_mobilenetv3_large_100(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): +def mobilenetv3_large_100(pretrained=True, out_indices=(2, 3, 4), **kwargs): return mobilenetv3_large_100( pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs ) -def ice_mobilenetv3_rw(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): +def mobilenetv3_rw(pretrained=True, out_indices=(2, 3, 4), **kwargs): return mobilenetv3_rw( pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs ) -def ice_mobilenetv3_small_075(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): +def mobilenetv3_small_075(pretrained=True, out_indices=(2, 3, 4), **kwargs): return mobilenetv3_small_075( pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs ) -def ice_mobilenetv3_small_100(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): +def mobilenetv3_small_100(pretrained=True, out_indices=(2, 3, 4), **kwargs): return mobilenetv3_small_100( pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs ) -def ice_tf_mobilenetv3_large_075( - pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs -): +def tf_mobilenetv3_large_075(pretrained=True, out_indices=(2, 3, 4), **kwargs): return tf_mobilenetv3_large_075( pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs ) -def ice_tf_mobilenetv3_large_100( - pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs -): +def tf_mobilenetv3_large_100(pretrained=True, out_indices=(2, 3, 4), **kwargs): return tf_mobilenetv3_large_100( pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs ) -def ice_tf_mobilenetv3_large_minimal_100( - pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs -): +def tf_mobilenetv3_large_minimal_100(pretrained=True, out_indices=(2, 3, 4), **kwargs): return tf_mobilenetv3_large_100( pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs ) -def ice_tf_mobilenetv3_small_075( - pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs -): +def tf_mobilenetv3_small_075(pretrained=True, out_indices=(2, 3, 4), **kwargs): return tf_mobilenetv3_small_075( pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs ) -def ice_tf_mobilenetv3_small_100( - pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs -): +def tf_mobilenetv3_small_100(pretrained=True, out_indices=(2, 3, 4), **kwargs): return tf_mobilenetv3_small_100( pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs ) -def ice_tf_mobilenetv3_small_minimal_100( - pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs -): +def tf_mobilenetv3_small_minimal_100(pretrained=True, out_indices=(2, 3, 4), **kwargs): return tf_mobilenetv3_small_100( pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs ) diff --git a/icevision/backbones/timm/resnest.py b/icevision/backbones/timm/resnest.py index 2e04885a2..bc0dba1d7 100644 --- a/icevision/backbones/timm/resnest.py +++ b/icevision/backbones/timm/resnest.py @@ -1,12 +1,12 @@ __all__ = [ - "ice_resnest14d", - "ice_resnest26d", - "ice_resnest50d", - "ice_resnest50d_1s4x24d", - "ice_resnest50d_4s2x40d", - "ice_resnest101e", - "ice_resnest200e", - "ice_resnest269e", + "resnest14d", + "resnest26d", + "resnest50d", + "resnest50d_1s4x24d", + "resnest50d_4s2x40d", + "resnest101e", + "resnest200e", + "resnest269e", ] from icevision.soft_dependencies import SoftDependencies @@ -14,49 +14,49 @@ from timm.models.resnest import * -def ice_resnest14d(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): +def resnest14d(pretrained=True, out_indices=(2, 3, 4), **kwargs): return resnest14d( pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs ) -def ice_resnest26d(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): +def resnest26d(pretrained=True, out_indices=(2, 3, 4), **kwargs): return resnest26d( pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs ) -def ice_resnest50d(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): +def resnest50d(pretrained=True, out_indices=(2, 3, 4), **kwargs): return resnest50d( pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs ) -def ice_resnest50d_1s4x24d(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): +def resnest50d_1s4x24d(pretrained=True, out_indices=(2, 3, 4), **kwargs): return resnest50d_1s4x24d( pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs ) -def ice_resnest50d_4s2x40d(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): +def resnest50d_4s2x40d(pretrained=True, out_indices=(2, 3, 4), **kwargs): return resnest50d_4s2x40d( pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs ) -def ice_resnest101e(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): +def resnest101e(pretrained=True, out_indices=(2, 3, 4), **kwargs): return resnest101e( pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs ) -def ice_resnest200e(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): +def resnest200e(pretrained=True, out_indices=(2, 3, 4), **kwargs): return resnest200e( pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs ) -def ice_resnest269e(pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): +def resnest269e(pretrained=True, out_indices=(2, 3, 4), **kwargs): return resnest269e( pretrained=pretrained, features_only=True, out_indices=out_indices, **kwargs ) diff --git a/icevision/models/mmdet/backbones/timm/common.py b/icevision/models/mmdet/backbones/timm/common.py index e85c440d9..f1cf564db 100644 --- a/icevision/models/mmdet/backbones/timm/common.py +++ b/icevision/models/mmdet/backbones/timm/common.py @@ -4,7 +4,7 @@ class MMDetTimmBase(nn.Module): - def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): + def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): super().__init__() self.pretrained = pretrained self.out_indices = out_indices diff --git a/icevision/models/mmdet/backbones/timm/mobilenet.py b/icevision/models/mmdet/backbones/timm/mobilenet.py index 4b8f6f95b..54f99f55a 100644 --- a/icevision/models/mmdet/backbones/timm/mobilenet.py +++ b/icevision/models/mmdet/backbones/timm/mobilenet.py @@ -5,9 +5,9 @@ # @BACKBONES.register_module(force=True) # class MobileNetV2_100(MMDetTimmBase): -# def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): +# def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): # super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) -# self.model = ice_mobilenetv2_100( +# self.model = mobilenetv2_100( # pretrained=pretrained, # out_indices=out_indices, # **kwargs, @@ -15,9 +15,9 @@ # @BACKBONES.register_module(force=True) # class MobileNetV2_110D(MMDetTimmBase): -# def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): +# def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): # super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) -# self.model = ice_mobilenetv2_110d( +# self.model = mobilenetv2_110d( # pretrained=pretrained, # out_indices=out_indices, # **kwargs, @@ -25,9 +25,9 @@ # @BACKBONES.register_module(force=True) # class MobileNetV2_120D(MMDetTimmBase): -# def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): +# def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): # super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) -# self.model = ice_mobilenetv2_120d( +# self.model = mobilenetv2_120d( # pretrained=pretrained, # out_indices=out_indices, # **kwargs, @@ -35,9 +35,9 @@ # @BACKBONES.register_module(force=True) # class MobileNetV2_140(MMDetTimmBase): -# def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): +# def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): # super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) -# self.model = ice_mobilenetv2_140( +# self.model = mobilenetv2_140( # pretrained=pretrained, # out_indices=out_indices, # **kwargs, @@ -46,9 +46,9 @@ @BACKBONES.register_module(force=True) class MobileNetV3_Large_075(MMDetTimmBase): - def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): + def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) - self.model = ice_mobilenetv3_large_075( + self.model = mobilenetv3_large_075( pretrained=pretrained, out_indices=out_indices, **kwargs, @@ -57,9 +57,9 @@ def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): @BACKBONES.register_module(force=True) class MobileNetV3_Large_100(MMDetTimmBase): - def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): + def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) - self.model = ice_mobilenetv3_large_100( + self.model = mobilenetv3_large_100( pretrained=pretrained, out_indices=out_indices, **kwargs, @@ -68,9 +68,9 @@ def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): @BACKBONES.register_module(force=True) class MobileNetV3_RW(MMDetTimmBase): - def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): + def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) - self.model = ice_mobilenetv3_rw( + self.model = mobilenetv3_rw( pretrained=pretrained, out_indices=out_indices, **kwargs, @@ -79,9 +79,9 @@ def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): @BACKBONES.register_module(force=True) class MobileNetV3_Small_075(MMDetTimmBase): - def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): + def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) - self.model = ice_mobilenetv3_small_075( + self.model = mobilenetv3_small_075( pretrained=pretrained, out_indices=out_indices, **kwargs, @@ -90,9 +90,9 @@ def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): @BACKBONES.register_module(force=True) class MobileNetV3_Small_100(MMDetTimmBase): - def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): + def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) - self.model = ice_mobilenetv3_small_100( + self.model = mobilenetv3_small_100( pretrained=pretrained, out_indices=out_indices, **kwargs, @@ -101,9 +101,9 @@ def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): @BACKBONES.register_module(force=True) class TF_MobileNetV3_Large_075(MMDetTimmBase): - def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): + def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) - self.model = ice_tf_mobilenetv3_large_075( + self.model = tf_mobilenetv3_large_075( pretrained=pretrained, out_indices=out_indices, **kwargs, @@ -112,9 +112,9 @@ def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): @BACKBONES.register_module(force=True) class TF_MobileNetV3_Large_100(MMDetTimmBase): - def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): + def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) - self.model = ice_tf_mobilenetv3_large_100( + self.model = tf_mobilenetv3_large_100( pretrained=pretrained, out_indices=out_indices, **kwargs, @@ -123,9 +123,9 @@ def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): @BACKBONES.register_module(force=True) class TF_MobileNetV3_Large_Minimal_100(MMDetTimmBase): - def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): + def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) - self.model = ice_tf_mobilenetv3_large_minimal_100( + self.model = tf_mobilenetv3_large_minimal_100( pretrained=pretrained, out_indices=out_indices, **kwargs, @@ -134,9 +134,9 @@ def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): @BACKBONES.register_module(force=True) class TF_MobileNetV3_Small_075(MMDetTimmBase): - def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): + def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) - self.model = ice_tf_mobilenetv3_small_075( + self.model = tf_mobilenetv3_small_075( pretrained=pretrained, out_indices=out_indices, **kwargs, @@ -145,9 +145,9 @@ def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): @BACKBONES.register_module(force=True) class TF_MobileNetV3_Small_100(MMDetTimmBase): - def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): + def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) - self.model = ice_tf_mobilenetv3_small_100( + self.model = tf_mobilenetv3_small_100( pretrained=pretrained, out_indices=out_indices, **kwargs, @@ -156,9 +156,9 @@ def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): @BACKBONES.register_module(force=True) class TF_MobileNetV3_Small_Minimal_100(MMDetTimmBase): - def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): + def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) - self.model = ice_tf_mobilenetv3_small_minimal_100( + self.model = tf_mobilenetv3_small_minimal_100( pretrained=pretrained, out_indices=out_indices, **kwargs, diff --git a/icevision/models/mmdet/backbones/timm/resnest.py b/icevision/models/mmdet/backbones/timm/resnest.py index a2371e7c0..322951ab9 100644 --- a/icevision/models/mmdet/backbones/timm/resnest.py +++ b/icevision/models/mmdet/backbones/timm/resnest.py @@ -5,9 +5,9 @@ @BACKBONES.register_module(force=True) class ResNest14D(MMDetTimmBase): - def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): + def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) - self.model = ice_resnest14d( + self.model = resnest14d( pretrained=pretrained, out_indices=out_indices, **kwargs, @@ -16,9 +16,9 @@ def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): @BACKBONES.register_module(force=True) class ResNest26D(MMDetTimmBase): - def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): + def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) - self.model = ice_resnest26d( + self.model = resnest26d( pretrained=pretrained, out_indices=out_indices, **kwargs, @@ -27,9 +27,9 @@ def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): @BACKBONES.register_module(force=True) class ResNest50D(MMDetTimmBase): - def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): + def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) - self.model = ice_resnest50d( + self.model = resnest50d( pretrained=pretrained, out_indices=out_indices, **kwargs, @@ -38,9 +38,9 @@ def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): @BACKBONES.register_module(force=True) class ResNest50D_1S4x24D(MMDetTimmBase): - def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): + def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) - self.model = ice_resnest50d_1s4x24d( + self.model = resnest50d_1s4x24d( pretrained=pretrained, out_indices=out_indices, **kwargs, @@ -49,9 +49,9 @@ def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): @BACKBONES.register_module(force=True) class ResNest50D_4S2x40D(MMDetTimmBase): - def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): + def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) - self.model = ice_resnest50d_4s2x40d( + self.model = resnest50d_4s2x40d( pretrained=pretrained, out_indices=out_indices, **kwargs, @@ -60,9 +60,9 @@ def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): @BACKBONES.register_module(force=True) class ResNest101E(MMDetTimmBase): - def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): + def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) - self.model = ice_resnest101e( + self.model = resnest101e( pretrained=pretrained, out_indices=out_indices, **kwargs, @@ -71,9 +71,9 @@ def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): @BACKBONES.register_module(force=True) class ResNest200E(MMDetTimmBase): - def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): + def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) - self.model = ice_resnest200e( + self.model = resnest200e( pretrained=pretrained, out_indices=out_indices, **kwargs, @@ -82,9 +82,9 @@ def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): @BACKBONES.register_module(force=True) class ResNest269E(MMDetTimmBase): - def __init__(self, pretrained=True, out_indices=(0, 1, 2, 3, 4), **kwargs): + def __init__(self, pretrained=True, out_indices=(2, 3, 4), **kwargs): super().__init__(pretrained=pretrained, out_indices=out_indices, **kwargs) - self.model = ice_resnest269e( + self.model = resnest269e( pretrained=pretrained, out_indices=out_indices, **kwargs, diff --git a/icevision/models/mmdet/models/retinanet/backbones/timm/mobilenet/timm_mobilenet_fpn.py b/icevision/models/mmdet/models/retinanet/backbones/timm/mobilenet/timm_mobilenet_fpn.py index 3ee297b8d..225ade920 100644 --- a/icevision/models/mmdet/models/retinanet/backbones/timm/mobilenet/timm_mobilenet_fpn.py +++ b/icevision/models/mmdet/models/retinanet/backbones/timm/mobilenet/timm_mobilenet_fpn.py @@ -26,7 +26,7 @@ # backbone_dict={ # "type": "MobileNetV2_100", # "pretrained": True, -# "out_indices": (0, 1, 2, 3, 4), +# "out_indices": (2, 3, 4), # }, # ) @@ -34,7 +34,7 @@ # backbone_dict={ # "type": "MobileNetV2_110D", # "pretrained": True, -# "out_indices": (0, 1, 2, 3, 4), +# "out_indices": (2, 3, 4), # }, # ) @@ -42,7 +42,7 @@ # backbone_dict={ # "type": "MobileNetV2_140", # "pretrained": True, -# "out_indices": (0, 1, 2, 3, 4), +# "out_indices": (2, 3, 4), # }, # ) @@ -50,7 +50,7 @@ backbone_dict={ "type": "MobileNetV3_Large_075", "pretrained": True, - "out_indices": (0, 1, 2, 3, 4), + "out_indices": (2, 3, 4), }, ) @@ -58,7 +58,7 @@ backbone_dict={ "type": "MobileNetV3_Large_100", "pretrained": True, - "out_indices": (0, 1, 2, 3, 4), + "out_indices": (2, 3, 4), }, ) @@ -66,7 +66,7 @@ backbone_dict={ "type": "MobileNetV3_RW", "pretrained": True, - "out_indices": (0, 1, 2, 3, 4), + "out_indices": (2, 3, 4), }, ) @@ -74,7 +74,7 @@ backbone_dict={ "type": "MobileNetV3_Small_075", "pretrained": True, - "out_indices": (0, 1, 2, 3, 4), + "out_indices": (2, 3, 4), }, ) @@ -82,7 +82,7 @@ backbone_dict={ "type": "MobileNetV3_Small_100", "pretrained": True, - "out_indices": (0, 1, 2, 3, 4), + "out_indices": (2, 3, 4), }, ) @@ -90,7 +90,7 @@ backbone_dict={ "type": "TF_MobileNetV3_Large_075", "pretrained": True, - "out_indices": (0, 1, 2, 3, 4), + "out_indices": (2, 3, 4), }, ) @@ -98,7 +98,7 @@ backbone_dict={ "type": "TF_MobileNetV3_Large_100", "pretrained": True, - "out_indices": (0, 1, 2, 3, 4), + "out_indices": (2, 3, 4), }, ) @@ -106,7 +106,7 @@ backbone_dict={ "type": "TF_MobileNetV3_Large_Minimal_100", "pretrained": True, - "out_indices": (0, 1, 2, 3, 4), + "out_indices": (2, 3, 4), }, ) @@ -114,7 +114,7 @@ backbone_dict={ "type": "TF_MobileNetV3_Small_075", "pretrained": True, - "out_indices": (0, 1, 2, 3, 4), + "out_indices": (2, 3, 4), }, ) @@ -122,7 +122,7 @@ backbone_dict={ "type": "TF_MobileNetV3_Small_100", "pretrained": True, - "out_indices": (0, 1, 2, 3, 4), + "out_indices": (2, 3, 4), }, ) @@ -130,6 +130,6 @@ backbone_dict={ "type": "TF_MobileNetV3_Small_Minimal_100", "pretrained": True, - "out_indices": (0, 1, 2, 3, 4), + "out_indices": (2, 3, 4), }, ) diff --git a/icevision/models/mmdet/models/retinanet/backbones/timm/resnest/timm_resnest_fpn.py b/icevision/models/mmdet/models/retinanet/backbones/timm/resnest/timm_resnest_fpn.py index ccdef0cbd..70a1e86df 100644 --- a/icevision/models/mmdet/models/retinanet/backbones/timm/resnest/timm_resnest_fpn.py +++ b/icevision/models/mmdet/models/retinanet/backbones/timm/resnest/timm_resnest_fpn.py @@ -19,7 +19,7 @@ backbone_dict={ "type": "ResNest14D", "pretrained": True, - "out_indices": (0, 1, 2, 3, 4), + "out_indices": (2, 3, 4), }, ) @@ -27,7 +27,7 @@ backbone_dict={ "type": "ResNest26D", "pretrained": True, - "out_indices": (0, 1, 2, 3, 4), + "out_indices": (2, 3, 4), }, ) @@ -35,7 +35,7 @@ backbone_dict={ "type": "ResNest50D", "pretrained": True, - "out_indices": (0, 1, 2, 3, 4), + "out_indices": (2, 3, 4), }, ) @@ -43,7 +43,7 @@ backbone_dict={ "type": "ResNest50D_1S4x24D", "pretrained": True, - "out_indices": (0, 1, 2, 3, 4), + "out_indices": (2, 3, 4), }, ) @@ -51,7 +51,7 @@ backbone_dict={ "type": "ResNest50D_4S2x40D", "pretrained": True, - "out_indices": (0, 1, 2, 3, 4), + "out_indices": (2, 3, 4), }, ) @@ -59,7 +59,7 @@ backbone_dict={ "type": "ResNest101E", "pretrained": True, - "out_indices": (0, 1, 2, 3, 4), + "out_indices": (2, 3, 4), }, ) @@ -67,7 +67,7 @@ backbone_dict={ "type": "ResNest200E", "pretrained": True, - "out_indices": (0, 1, 2, 3, 4), + "out_indices": (2, 3, 4), }, ) @@ -75,6 +75,6 @@ backbone_dict={ "type": "ResNest269E", "pretrained": True, - "out_indices": (0, 1, 2, 3, 4), + "out_indices": (2, 3, 4), }, )