def build_base_network(self, input_img_batch): if self.base_network_name.startswith('resnet_v1'): return resnet.resnet_base(input_img_batch, scope_name=self.base_network_name, is_training=self.is_training) elif self.base_network_name in [ 'resnet152_v1d', 'resnet101_v1d', 'resnet50_v1d' ] or 'efficientnet' in cfgs.NET_NAME: return resnet_gluoncv_r3det.resnet_base( input_img_batch, scope_name=self.base_network_name, is_training=self.is_training) elif self.base_network_name.startswith('MobilenetV2'): return mobilenet_v2.mobilenetv2_base(input_img_batch, is_training=self.is_training) elif self.base_network_name.startswith('xception'): return xception.xception_base(input_img_batch, is_training=self.is_training) else: raise ValueError( 'Sry, we only support resnet, mobilenet_v2 and xception')
def build_base_network(self, input_img_batch): if self.base_network_name.startswith('resnet_v1'): return resnet.resnet_base(input_img_batch, scope_name=self.base_network_name, is_training=self.is_training) elif self.base_network_name in ['resnet152_v1d', 'resnet101_v1d', 'resnet50_v1d']: return resnet_gluoncv_r3det.resnet_base(input_img_batch, scope_name=self.base_network_name, is_training=self.is_training) elif self.base_network_name.startswith('MobilenetV2'): return mobilenet_v2.mobilenetv2_base(input_img_batch, is_training=self.is_training) else: raise ValueError('Sry, we only support resnet, mobilenet_v2')
def build_base_network(self, input_img_batch): if self.base_network_name.startswith('resnet_v1'): return resnet.resnet_base(input_img_batch, scope_name=self.base_network_name, is_training=self.is_training) elif self.base_network_name in ['resnet152_v1d', 'resnet101_v1d', 'resnet50_v1d']: return resnet_gluoncv_r3det.resnet_base(input_img_batch, scope_name=self.base_network_name, is_training=self.is_training) elif self.base_network_name.startswith('MobilenetV2'): return mobilenet_v2.mobilenetv2_base(input_img_batch, is_training=self.is_training) elif 'efficientnet-lite' in self.base_network_name: return efficientnet_lite_builder.build_model_fpn_base(input_img_batch, model_name=self.base_network_name, training=True) elif 'efficientnet' in self.base_network_name: return efficientnet_builder.build_model_fpn_base(input_img_batch, model_name=self.base_network_name, training=True) else: raise ValueError('Sry, we only support resnet, mobilenet_v2')