def __init__(self, classes, num_layers=101, pretrained=False, class_agnostic=False): self.model_path = 'data/pretrained_model/resnet101_caffe.pth' self.dout_base_model = 1024 self.pretrained = pretrained self.class_agnostic = class_agnostic _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__(self, classes, pretrained=False, class_agnostic=False): self.model_path = 'data/pretrained_model/vgg16_caffe.pth' self.dout_base_model = 512 self.pretrained = pretrained self.class_agnostic = class_agnostic _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__(self, classes, num_layers=101, pretrained=False, class_agnostic=False): self.model_path = 'data/pretrained_model/resnet' + str( num_layers) + '_caffe.pth' self.dout_base_model = 1024 self.pretrained = pretrained self.class_agnostic = class_agnostic self.num_layers = num_layers _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__(self, classes, arch, pretrained=False, class_agnostic=False, imagenet_weight=None): self.dout_base_model = dout_base_model[arch] self.pretrained = pretrained self.class_agnostic = class_agnostic self.arch = arch self.imagenet_weight = imagenet_weight _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__(self, classes, pretrained=False, class_agnostic=False, teaching=False): self.model_path = 'data/pretrained_model/vgg16_caffe.pth' self.dout_base_model = 512 self.pretrained = pretrained self.class_agnostic = class_agnostic self.teaching = teaching pooling_size = 7 _fasterRCNN.__init__(self, classes, class_agnostic, pooling_size, teaching)
def __init__(self, classes, num_layers=101, pretrained=False, class_agnostic=False, K=-1): self.model_path = 'data/pretrained_model/resnet101_caffe.pth' self.dout_base_model = 1024 self.pretrained = pretrained self.class_agnostic = class_agnostic self.K = K # if K > 1, transform FasterRCNN to take a stack of K images as input _fasterRCNN.__init__(self, classes, class_agnostic, K=self.K)
def __init__(self, classes, num_layers=101, pretrained=False, freeze=False, set_bn_fix=False, embed_size=128): self.dout_base_model = 1024 self.pretrained = pretrained self.freeze, self.set_bn_fix = freeze, set_bn_fix self.embed_size = embed_size _fasterRCNN.__init__(self, classes, True)
def __init__(self, classes, num_layers=169, pretrained=False, class_agnostic=False, imagenet_weight=None): self.dout_base_model = dout_base_model[ num_layers] # depth of RCNN_base output. pattern1=1280 / pattern2=640 (in dense169) self.pretrained = pretrained self.class_agnostic = class_agnostic self.num_layers = num_layers self.imagenet_weight = imagenet_weight _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__(self, classes, num_layers=101, pretrained=False, class_agnostic=False, pretrained_model=""): self.model_path = pretrained_model self.dout_base_model = 1024 self.pretrained = pretrained self.class_agnostic = class_agnostic self.num_layers = num_layers _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__(self, classes, num_layers=101, pretrained=False, class_agnostic=False, rpn_type='normal'): self.model_path = 'data/pretrained_model/resnet101_caffe.pth' self.dout_base_model = 1024 self.pretrained = pretrained self.class_agnostic = class_agnostic self.rpn_type = rpn_type _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__(self, classes, num_layers=101, pretrained=False, class_agnostic=False, shrink=1, mimic=False): self.shrink = shrink self.pretrained = pretrained self.class_agnostic = class_agnostic self.dout_base_model = 768 // shrink _fasterRCNN.__init__(self, classes, class_agnostic, shrink, mimic)
def __init__(self, classes, num_layers=101, pretrained=False, class_agnostic=False, imagenet_weight=None): self.dout_base_model = dout_base_model[num_layers] self.pretrained = pretrained self.class_agnostic = class_agnostic self.num_layers = num_layers self.imagenet_weight = imagenet_weight _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__(self, action_classes, obj_classes, num_layers=101, pretrained=False, class_agnostic=False): self.model_path = 'data/pretrained_model/resnet101_caffe.pth' # self.model_path = 'data/pretrained_model/faster_rcnn_1_7_10021.pth' self.dout_base_model = 1024 self.pretrained = pretrained self.class_agnostic = class_agnostic _fasterRCNN.__init__(self, action_classes, obj_classes, class_agnostic)
def __init__(self, classes, num_layers=101, pretrained=False, class_agnostic=False, layer=101): self.layer = layer self.model_path = 'data/pretrained_model/resnet{}_caffe.pth'.format( self.layer) self.dout_base_model = 256 if self.layer in (18, 34) else 1024 self.pretrained = pretrained self.class_agnostic = class_agnostic _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__(self, classes, num_layers=101, pretrained=False, class_agnostic=False): self.model_path = os.path.join( 'data/pretrained_model/', 'resnet{:d}-caffe.pth'.format(num_layers)) self.dout_base_model = 1024 self.pretrained = pretrained self.class_agnostic = class_agnostic self.num_layers = num_layers _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__(self, classes, pretrained=False, class_agnostic=False, is_apn=False): self.model_path = 'data/pretrained_model/vgg16_caffe.pth' self.dout_base_model = 512 #self.mv_stride = 16 self.pretrained = pretrained self.class_agnostic = class_agnostic #self.is_apn = is_apn _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__(self, classes, num_layers, pretrained=False, class_agnostic=False, imagenet_weight=None): # self.model_path = 'data/pretrained_model/resnet101_caffe.pth' self.dout_base_model = dout_base_model[num_layers] self.pretrained = pretrained self.class_agnostic = class_agnostic self.num_layers = num_layers self.imagenet_weight = imagenet_weight _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__(self, classes, ver='10', pretrained=False, class_agnostic=False, imagenet_weight=None): # dim of output from RCNN_base block self.dout_base_model = dout_base_model[ver] self.ver = ver self.pretrained = pretrained self.class_agnostic = class_agnostic self.imagenet_weight = imagenet_weight _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__(self, classes, pretrained=False, class_agnostic=False, is_deconv=False, num_filters=32): self.model_path = 'data/pretrained_model/vgg16_caffe.pth' self.dout_base_model = 512 self.pretrained = pretrained self.class_agnostic = class_agnostic self.is_deconv = is_deconv self.num_filters = num_filters _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__(self, classes, num_layers=101, pretrained=False, class_agnostic=False, pair_prob=None, attr_prob=None): self.model_path = 'data/pretrained_model/resnet101_caffe.pth' self.dout_base_model = 1024 self.pretrained = pretrained self.class_agnostic = class_agnostic self.pair_prob = pair_prob self.attr_prob = attr_prob _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__(self, classes, pretrained=False, class_agnostic=False, modal="rgb", model_path="data/pretrained_model/vgg16_caffe.pth"): #model_path="data/pretrained_model/vgg16_caffe.pth"): self.model_path = model_path self.dout_base_model = 512 self.pretrained = pretrained self.class_agnostic = class_agnostic #单双通道模态 self.modal = modal _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__(self, classes, num_layers=16, pretrained=False, class_agnostic=False, imagenet_weight=None): # self.model_path = 'data/pretrained_model/vgg16_caffe.pth' self.dout_base_model = dout_base_model[ num_layers] # dim of output from RCNN_base block self.num_layers = num_layers self.pretrained = pretrained self.class_agnostic = class_agnostic self.imagenet_weight = imagenet_weight _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__(self, classes, pretrained=False, class_agnostic=False, lighthead=True): self.dout_base_model = 576 # Output channel at Stage4 self.dout_lh_base_model = 576 self.class_agnostic = class_agnostic self.pretrained = pretrained _fasterRCNN.__init__(self, classes, class_agnostic, lighthead, compact_mode=True)
def __init__(self, classes, num_layers=101, pretrained=False, class_agnostic=False): self.num_layers = num_layers self.pretrained = pretrained self.class_agnostic = class_agnostic self.classes = classes if num_layers >= 50: self.dout_base_model = 1024 else: self.dout_base_model = 256 _fasterRCNN.__init__(self, self.classes, self.class_agnostic)
def __init__(self, classes, pretrained=False, class_agnostic=False, teaching=False): self.dout_base_model = 256 self.model_path = 'data/pretrained_model/alexnet_torch.pth' self.pretrained = pretrained self.class_agnostic = class_agnostic self.teaching = teaching # todo parametrizzare self.n_frozen_layers = 10 print("N_Frozen_layers: " + str(self.n_frozen_layers)) pooling_size = 6 _fasterRCNN.__init__(self, classes, class_agnostic, pooling_size, teaching)
def __init__(self, classes, num_layers=101, pretrained=False, class_agnostic=False): self.model_path = 'data/pretrained_model/resnet101_caffe.pth' print("res101") #self.dout_base_model = 1024 #lhy self.dout_base_model = 1280 self.pretrained = pretrained self.class_agnostic = class_agnostic _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__(self, classes, num_layers=101, model_path=None, pretrained=False, class_agnostic=False): if model_path is None: self.model_path = 'data/pretrained_model/resnet101_caffe.pth' else: self.model_path = model_path self.dout_base_model = 1024 self.pretrained = pretrained self.class_agnostic = class_agnostic self.num_layers = num_layers _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__(self, classes, net, num_layers=101, pretrained=False, class_agnostic=False): self.model_path = 'data/pretrained_model/resnet101_caffe.pth' if net == 'res18_3d': self.dout_base_model = 256 else: self.dout_base_model = 1024 self.pretrained = pretrained self.class_agnostic = class_agnostic if net == 'res18_3d': _fasterRCNN3d.__init__(self, classes, class_agnostic) else: _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__(self, classes, num_layers=101, pretrained=False, class_agnostic=False, pretrained_path=''): self.model_path = 'data/pretrained_model/resnet101_caffe.pth' if num_layers != 18: self.dout_base_model = 1024 else: self.dout_base_model = 256 self.pretrained = pretrained self.class_agnostic = class_agnostic self.num_layers = num_layers self.pretrained_path = pretrained_path _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__(self, classes, num_layers=50, relation_module=False, pretrained=False, class_agnostic=False): self.dout_base_model = 1024 self.pretrained = pretrained, self.class_agnostic = class_agnostic self.relation_module = relation_module _fasterRCNN.__init__(self, classes, class_agnostic, relation_module=relation_module) self.fc_dim = 16 self.emb_ft_dim = 64 self.relation_output_dim = 2048
def __init__(self, classes, num_layers=101, pretrained=False, class_agnostic=False, **kwargs): self.model_path = cfg.RESNET_PATH self.dout_base_model = 1024 self.pretrained = pretrained self.layers = num_layers self.class_agnostic = class_agnostic if self.layers == 50: self.model_path = cfg.RESNET50_PATH if self.layers == 152: self.model_path = cfg.RESNET152_PATH _fasterRCNN.__init__(self, classes, class_agnostic)
def __init__( self, classes, layer, pretrained_path=None, class_agnostic=False, ): self.pretrained_path = pretrained_path self.class_agnostic = class_agnostic self.dout_base_model = 256 self.layer = layer self.dout_lh_base_model = 245 _fasterRCNN.__init__(self, classes, class_agnostic, compact_mode=True)