Skip to content

Commit

Permalink
submodule removed
Browse files Browse the repository at this point in the history
  • Loading branch information
qubvel committed Dec 21, 2018
1 parent df3a539 commit 6e48f13
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 37 deletions.
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
[submodule "segmentation_models/backbones/classification_models"]
path = segmentation_models/backbones/classification_models
url = git://github.com/qubvel/classification_models.git
branch = segmentation_models
1 change: 0 additions & 1 deletion segmentation_models/backbones/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from .classification_models.classification_models import *
from .inception_resnet_v2 import InceptionResNetV2
from .inception_v3 import InceptionV3

Expand Down
33 changes: 14 additions & 19 deletions segmentation_models/backbones/backbones.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@

from .classification_models.classification_models import ResNet18, ResNet34, ResNet50, ResNet101, ResNet152
from .classification_models.classification_models import ResNeXt50, ResNeXt101
import keras.applications as ka
import classification_models as cm

from .inception_resnet_v2 import InceptionResNetV2
from .inception_v3 import InceptionV3

from keras.applications import DenseNet121, DenseNet169, DenseNet201
from keras.applications import VGG16
from keras.applications import VGG19


backbones = {
"vgg16": VGG16,
"vgg19": VGG19,
"resnet18": ResNet18,
"resnet34": ResNet34,
"resnet50": ResNet50,
"resnet101": ResNet101,
"resnet152": ResNet152,
"resnext50": ResNeXt50,
"resnext101": ResNeXt101,
"vgg16": ka.VGG16,
"vgg19": ka.VGG19,
"resnet18": cm.ResNet18,
"resnet34": cm.ResNet34,
"resnet50": cm.ResNet50,
"resnet101": cm.ResNet101,
"resnet152": cm.ResNet152,
"resnext50": cm.ResNeXt50,
"resnext101": cm.ResNeXt101,
"inceptionresnetv2": InceptionResNetV2,
"inceptionv3": InceptionV3,
"densenet121": DenseNet121,
"densenet169": DenseNet169,
"densenet201": DenseNet201,
"densenet121": ka.DenseNet121,
"densenet169": ka.DenseNet169,
"densenet201": ka.DenseNet201,

}

Expand Down
1 change: 0 additions & 1 deletion segmentation_models/backbones/classification_models
Submodule classification_models deleted from 9e438e
20 changes: 8 additions & 12 deletions segmentation_models/backbones/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,26 @@
Images are assumed to be read in uint8 format (range 0-255).
"""

from keras.applications import vgg16
from keras.applications import vgg19
from keras.applications import densenet
from keras.applications import inception_v3
from keras.applications import inception_resnet_v2
import keras.applications as ka

identical = lambda x: x
bgr_transpose = lambda x: x[..., ::-1]

models_preprocessing = {
'vgg16': vgg16.preprocess_input,
'vgg19': vgg19.preprocess_input,
'vgg16': ka.vgg16.preprocess_input,
'vgg19': ka.vgg19.preprocess_input,
'resnet18': bgr_transpose,
'resnet34': bgr_transpose,
'resnet50': bgr_transpose,
'resnet101': bgr_transpose,
'resnet152': bgr_transpose,
'resnext50': identical,
'resnext101': identical,
'densenet121': densenet.preprocess_input,
'densenet169': densenet.preprocess_input,
'densenet201': densenet.preprocess_input,
'inceptionv3': inception_v3.preprocess_input,
'inceptionresnetv2': inception_resnet_v2.preprocess_input,
'densenet121': ka.densenet.preprocess_input,
'densenet169': ka.densenet.preprocess_input,
'densenet201': ka.densenet.preprocess_input,
'inceptionv3': ka.inception_v3.preprocess_input,
'inceptionresnetv2': ka.inception_resnet_v2.preprocess_input,
}


Expand Down

0 comments on commit 6e48f13

Please sign in to comment.