Skip to content

Commit 3c81011

Browse files
added mobilenetv3 implementation
qubvel/segmentation_models#390
1 parent 1340e6f commit 3c81011

File tree

3 files changed

+641
-1
lines changed

3 files changed

+641
-1
lines changed

orthophoto-segmentation-benchmark-toolkit/model_backends/model_backend.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
class ModelBackend(ABC):
1010

1111
def __init__(self):
12-
self.available_backbones = ["resnet50", "efficientnetb3", "mobilenetv3_large", "mobilenetv3_small", "mobilenet_v3_minimal"]
12+
self.available_backbones = ["resnet50", "efficientnetb3", "mobilenetv3", "mobilenetv3small"]
1313
self.chip_size = 512
1414
self.metrics = [
1515
metrics.Precision(top_k=1, name='precision'),

orthophoto-segmentation-benchmark-toolkit/model_backends/segmentation_models/backbones/backbones_factory.py

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from . import inception_resnet_v2 as irv2
66
from . import inception_v3 as iv3
7+
from . import mobilenet_v3 as mbnv3
78

89

910
class BackbonesFactory(ModelsFactory):
@@ -51,6 +52,8 @@ class BackbonesFactory(ModelsFactory):
5152
'mobilenet': ('conv_pw_11_relu', 'conv_pw_5_relu', 'conv_pw_3_relu', 'conv_pw_1_relu'),
5253
'mobilenetv2': ('block_13_expand_relu', 'block_6_expand_relu', 'block_3_expand_relu',
5354
'block_1_expand_relu'),
55+
'mobilenetv3': ('Conv_1', 'activation_29', 'activation_15', 'activation_6'),
56+
'mobilenetv3small': ('activation_31', 'activation_22', 'activation_7', 'activation_3'),
5457

5558
# EfficientNets
5659
'efficientnetb0': ('block6a_expand_activation', 'block4a_expand_activation',
@@ -84,6 +87,9 @@ class BackbonesFactory(ModelsFactory):
8487
'efficientnetb5': [eff.EfficientNetB5, eff.preprocess_input],
8588
'efficientnetb6': [eff.EfficientNetB6, eff.preprocess_input],
8689
'efficientnetb7': [eff.EfficientNetB7, eff.preprocess_input],
90+
91+
'mobilenetv3': [mbnv3.MobileNetV3Large, mbnv3.preprocess_input],
92+
'mobilenetv3small': [mbnv3.MobileNetV3Small, mbnv3.preprocess_input],
8793
}
8894

8995
# currently not supported

0 commit comments

Comments
 (0)