本文整理汇总了Python中nets.vgg16.vgg16方法的典型用法代码示例。如果您正苦于以下问题:Python vgg16.vgg16方法的具体用法?Python vgg16.vgg16怎么用?Python vgg16.vgg16使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nets.vgg16
的用法示例。
在下文中一共展示了vgg16.vgg16方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: parse_args
# 需要导入模块: from nets import vgg16 [as 别名]
# 或者: from nets.vgg16 import vgg16 [as 别名]
def parse_args():
"""Parse input arguments."""
parser = argparse.ArgumentParser(description='Tensorflow CTPN demo')
parser.add_argument('--net', dest='net', choices=['vgg16', 'squeeze', 'mobile'], default='vgg16')
parser.add_argument('--img_dir', default='/home/cwq/data/ICDAR13/123')
parser.add_argument('--dataset', dest='dataset', help='model tag', default='voc_2007_trainval')
parser.add_argument('--tag', dest='tag', help='model tag', default='vgg_latin_chn_newdata')
parser.add_argument('--viz', action='store_true', default=False, help='show result')
parser.add_argument('-o', '--oriented', action='store_true', default=False, help='output rotated detect box')
args = parser.parse_args()
if not os.path.exists(args.img_dir):
print("img dir not exists.")
exit(-1)
args.result_dir = os.path.join('./data/result', args.tag)
if not os.path.exists(args.result_dir):
os.makedirs(args.result_dir)
return args
示例2: parse_args
# 需要导入模块: from nets import vgg16 [as 别名]
# 或者: from nets.vgg16 import vgg16 [as 别名]
def parse_args():
"""Parse input arguments."""
parser = argparse.ArgumentParser(description='Test images, and save result as ICDAR challenge format')
parser.add_argument('--net', dest='net', choices=['vgg16', 'res101'], default='vgg16')
parser.add_argument('--img_dir', default='./data/demo')
parser.add_argument('--dataset', dest='dataset', help='model tag', default='voc_2007_trainval')
parser.add_argument('--tag', dest='tag', help='model tag', default='default')
parser.add_argument('-o', '--oriented', action='store_true', default=False, help='output rotated detect box')
parser.add_argument('-c', '--challenge', type=str, help='Which challenge to run',
choices=[
'ICDAR13', # ICDAR13 - Focused Scene Text
'ICDAR15', # ICDAR15 - Challenge 4 - Incidental Scene Text
'MLT17' # Multi-lingual scene text detection
])
args = parser.parse_args()
if not os.path.exists(args.img_dir):
print("img dir not exists.")
exit(-1)
args.result_dir = os.path.join('./data/result', args.tag)
if not os.path.exists(args.result_dir):
os.makedirs(args.result_dir)
return args
示例3: parse_args
# 需要导入模块: from nets import vgg16 [as 别名]
# 或者: from nets.vgg16 import vgg16 [as 别名]
def parse_args():
"""Parse input arguments."""
parser = argparse.ArgumentParser(description='Tensorflow Faster R-CNN demo')
parser.add_argument('--net', dest='demo_net', help='Network to use [vgg16 res101]',
choices=NETS.keys(), default='res101')
parser.add_argument('--dataset', dest='dataset', help='Trained dataset [pascal_voc pascal_voc_0712]',
choices=DATASETS.keys(), default='pascal_voc_0712')
args = parser.parse_args()
return args
开发者ID:Sunarker,项目名称:Collaborative-Learning-for-Weakly-Supervised-Object-Detection,代码行数:12,代码来源:demo.py
示例4: parse_args
# 需要导入模块: from nets import vgg16 [as 别名]
# 或者: from nets.vgg16 import vgg16 [as 别名]
def parse_args():
"""
Parse input arguments
"""
parser = argparse.ArgumentParser(description='Test a Fast R-CNN network')
parser.add_argument('--cfg', dest='cfg_file',
help='optional config file', default=None, type=str)
parser.add_argument('--model', dest='model',
help='model to test',
default=None, type=str)
parser.add_argument('--imdb', dest='imdb_name',
help='dataset to test',
default='voc_2007_test', type=str)
parser.add_argument('--comp', dest='comp_mode', help='competition mode',
action='store_true')
parser.add_argument('--num_dets', dest='max_per_image',
help='max number of detections per image',
default=100, type=int)
parser.add_argument('--tag', dest='tag',
help='tag of the model',
default='', type=str)
parser.add_argument('--net', dest='net',
help='vgg16, res50, res101, res152, mobile',
default='res50', type=str)
parser.add_argument('--set', dest='set_cfgs',
help='set config keys', default=None,
nargs=argparse.REMAINDER)
if len(sys.argv) == 1:
parser.print_help()
sys.exit(1)
args = parser.parse_args()
return args
开发者ID:Sunarker,项目名称:Collaborative-Learning-for-Weakly-Supervised-Object-Detection,代码行数:36,代码来源:test_net.py
示例5: parse_args
# 需要导入模块: from nets import vgg16 [as 别名]
# 或者: from nets.vgg16 import vgg16 [as 别名]
def parse_args():
"""
Parse input arguments
"""
parser = argparse.ArgumentParser(description='Train a faster-rcnn in wealy supervised situation with wsddn modules')
parser.add_argument('--cfg', dest='cfg_file',
help='optional config file',
default=None, type=str)
parser.add_argument('--weight', dest='weight',
help='initialize with pretrained model weights',
type=str)
parser.add_argument('--wsddn', dest='wsddn',
help='initialize with pretrained wsddn model weights',
type=str)
parser.add_argument('--imdb', dest='imdb_name',
help='dataset to train on',
default='voc_2007_trainval', type=str)
parser.add_argument('--imdbval', dest='imdbval_name',
help='dataset to validate on',
default='voc_2007_test', type=str)
parser.add_argument('--iters', dest='max_iters',
help='number of iterations to train',
default=70000, type=int)
parser.add_argument('--tag', dest='tag',
help='tag of the model',
default=None, type=str)
parser.add_argument('--net', dest='net',
help='vgg16, res50, res101, res152, mobile',
default='res50', type=str)
parser.add_argument('--set', dest='set_cfgs',
help='set config keys', default=None,
nargs=argparse.REMAINDER)
if len(sys.argv) == 1:
parser.print_help()
sys.exit(1)
args = parser.parse_args()
return args
开发者ID:Sunarker,项目名称:Collaborative-Learning-for-Weakly-Supervised-Object-Detection,代码行数:41,代码来源:trainval_net.py
示例6: parse_args
# 需要导入模块: from nets import vgg16 [as 别名]
# 或者: from nets.vgg16 import vgg16 [as 别名]
def parse_args():
"""
Parse input arguments
"""
parser = argparse.ArgumentParser(description='Train a Fast R-CNN network')
parser.add_argument('--cfg', dest='cfg_file',
help='optional config file',
default=None, type=str)
parser.add_argument('--weight', dest='weight',
help='initialize with pretrained model weights',
type=str)
parser.add_argument('--imdb', dest='imdb_name',
help='dataset to train on',
default='voc_2007_trainval', type=str)
parser.add_argument('--imdbval', dest='imdbval_name',
help='dataset to validate on',
default='voc_2007_test', type=str)
parser.add_argument('--iters', dest='max_iters',
help='number of iterations to train',
default=70000, type=int)
parser.add_argument('--tag', dest='tag',
help='tag of the model',
default=None, type=str)
parser.add_argument('--net', dest='net',
help='vgg16, res50, res101, res152, mobile',
default='res50', type=str)
parser.add_argument('--set', dest='set_cfgs',
help='set config keys', default=None,
nargs=argparse.REMAINDER)
if len(sys.argv) == 1:
parser.print_help()
sys.exit(1)
args = parser.parse_args()
return args
示例7: parse_args
# 需要导入模块: from nets import vgg16 [as 别名]
# 或者: from nets.vgg16 import vgg16 [as 别名]
def parse_args():
"""
Parse input arguments
"""
parser = argparse.ArgumentParser(description='Train a CTPN network')
parser.add_argument('--cfg', dest='cfg_file',
help='optional config file',
default='./data/cfgs/vgg16.yml', type=str)
parser.add_argument('--pretrained_model',
default=None,
help='path to pretrained model, initialize with pretrained model weights',
type=str)
parser.add_argument('--imdb', dest='imdb_name',
help='dataset to train on',
default='voc_2007_trainval', type=str)
parser.add_argument('--imdbval', dest='imdbval_name',
help='dataset to validate on',
default='voc_2007_test', type=str)
parser.add_argument('--iters', dest='max_iters',
help='number of iterations to train',
default=50000, type=int)
parser.add_argument('--tag', dest='tag',
help='tag of the model',
default=None, type=str)
parser.add_argument('--net', dest='net',
help='vgg16, res50, res101, res152, mobile, squeeze',
choices=['vgg16', 'res50', 'res101', 'res152', 'mobile', 'squeeze'],
default='vgg16', type=str)
parser.add_argument('--set', dest='set_cfgs',
help='set config keys', default=None,
nargs=argparse.REMAINDER)
args = parser.parse_args()
return args
示例8: parse_args
# 需要导入模块: from nets import vgg16 [as 别名]
# 或者: from nets.vgg16 import vgg16 [as 别名]
def parse_args():
"""
Parse input arguments
"""
parser = argparse.ArgumentParser(description='Test a Fast R-CNN network')
parser.add_argument('--cfg', dest='cfg_file',
help='optional config file', default=None, type=str)
parser.add_argument('--model', dest='model',
help='model to test',
default=None, type=str)
parser.add_argument('--imdb', dest='imdb_name',
help='dataset to test',
default='voc_2007_test', type=str)
parser.add_argument('--comp', dest='comp_mode', help='competition mode',
action='store_true')
parser.add_argument('--num_dets', dest='max_per_image',
help='max number of detections per image',
default=100, type=int)
parser.add_argument('--tag', dest='tag',
help='tag of the model',
default='', type=str)
parser.add_argument('--net', dest='net',
help='vgg16, res50, res101, res152',
default='res50', type=str)
parser.add_argument('--set', dest='set_cfgs',
help='set config keys', default=None,
nargs=argparse.REMAINDER)
if len(sys.argv) == 1:
parser.print_help()
sys.exit(1)
args = parser.parse_args()
return args
示例9: parse_args
# 需要导入模块: from nets import vgg16 [as 别名]
# 或者: from nets.vgg16 import vgg16 [as 别名]
def parse_args():
"""
Parse input arguments
"""
parser = argparse.ArgumentParser(description='Train a Fast R-CNN network')
parser.add_argument('--cfg', dest='cfg_file',
help='optional config file',
default=None, type=str)
parser.add_argument('--weight', dest='weight',
help='initialize with pretrained model weights',
default=None,type=str)
parser.add_argument('--imdb', dest='imdb_name',
help='dataset to train on',
default='voc_2007_trainval', type=str)
parser.add_argument('--imdbval', dest='imdbval_name',
help='dataset to validate on',
default='voc_2007_test', type=str)
parser.add_argument('--iters', dest='max_iters',
help='number of iterations to train',
default=70000, type=int)
parser.add_argument('--tag', dest='tag',
help='tag of the model',
default=None, type=str)
parser.add_argument('--net', dest='net',
help='vgg16, res50, res101, res152',
default='res50', type=str)
parser.add_argument('--set', dest='set_cfgs',
help='set config keys', default=None,
nargs=argparse.REMAINDER)
if len(sys.argv) == 1:
parser.print_help()
sys.exit(1)
args = parser.parse_args()
return args
示例10: parse_args
# 需要导入模块: from nets import vgg16 [as 别名]
# 或者: from nets.vgg16 import vgg16 [as 别名]
def parse_args():
"""Parse input arguments."""
parser = argparse.ArgumentParser(description='MSDS-RCNN demo')
parser.add_argument('--net', dest='demo_net', help='Currently only support vgg16',
choices=NETS.keys(), default='vgg16')
parser.add_argument('--dataset', dest='dataset', help='Trained dataset',
choices=DATASETS.keys(), default='original')
args = parser.parse_args()
return args
示例11: parse_args
# 需要导入模块: from nets import vgg16 [as 别名]
# 或者: from nets.vgg16 import vgg16 [as 别名]
def parse_args():
"""
Parse input arguments
"""
parser = argparse.ArgumentParser(description='Test a region classification network')
parser.add_argument('--cfg', dest='cfg_file',
help='optional config file', default=None, type=str)
parser.add_argument('--model', dest='model',
help='model to test',
default=None, type=str)
parser.add_argument('--imdb', dest='imdb_name',
help='dataset to test',
default='voc_2007_test', type=str)
parser.add_argument('--visualize', dest='visualize', help='whether to show results',
action='store_true')
parser.add_argument('--tag', dest='tag',
help='tag of the model',
default='', type=str)
parser.add_argument('--net', dest='net',
help='vgg16, res50, res101, res152, mobile',
default='res50', type=str)
parser.add_argument('--set', dest='set_cfgs',
help='set config keys', default=None,
nargs=argparse.REMAINDER)
if len(sys.argv) == 1:
parser.print_help()
sys.exit(1)
args = parser.parse_args()
return args
示例12: parse_args
# 需要导入模块: from nets import vgg16 [as 别名]
# 或者: from nets.vgg16 import vgg16 [as 别名]
def parse_args():
"""
Parse input arguments
"""
parser = argparse.ArgumentParser(description='Train a region classification network')
parser.add_argument('--cfg', dest='cfg_file',
help='optional config file',
default=None, type=str)
parser.add_argument('--weight', dest='weight',
help='initialize with pretrained model weights',
type=str)
parser.add_argument('--imdb', dest='imdb_name',
help='dataset to train on',
default='voc_2007_trainval', type=str)
parser.add_argument('--imdbval', dest='imdbval_name',
help='dataset to validate on',
default='voc_2007_test', type=str)
parser.add_argument('--iters', dest='max_iters',
help='number of iterations to train',
default=70000, type=int)
parser.add_argument('--tag', dest='tag',
help='tag of the model',
default=None, type=str)
parser.add_argument('--net', dest='net',
help='vgg16, res50, res101, res152, mobile',
default='res50', type=str)
parser.add_argument('--set', dest='set_cfgs',
help='set config keys', default=None,
nargs=argparse.REMAINDER)
if len(sys.argv) == 1:
parser.print_help()
sys.exit(1)
args = parser.parse_args()
return args