当前位置: 首页>>代码示例>>Python>>正文


Python data.voc方法代码示例

本文整理汇总了Python中data.voc方法的典型用法代码示例。如果您正苦于以下问题:Python data.voc方法的具体用法?Python data.voc怎么用?Python data.voc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在data的用法示例。


在下文中一共展示了data.voc方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import data [as 别名]
# 或者: from data import voc [as 别名]
def __init__(self, phase,model, size, base, extras, head, num_classes):
        super(SSD, self).__init__()
        self.phase = phase
        self.num_classes = num_classes
        self.cfg = (coco, voc)[num_classes == 21]
        self.priorbox = PriorBox(self.cfg)
        self.priors = Variable(self.priorbox.forward(), requires_grad=True)
        self.size = size
        self.model=model
        # SSD network
        self.base = nn.ModuleList(base)
        # Layer learns to scale the l2 normalized features from conv4_3
        self.L2Norm = L2Norm( 512, 20)
        self.extras = nn.ModuleList(extras)

        self.loc = nn.ModuleList(head[0])
        self.conf = nn.ModuleList(head[1])

        if phase == 'test':
            self.softmax = nn.Softmax(dim=-1)
            self.detect = Detect(num_classes, 0, 200, 0.01, 0.45) 
开发者ID:yczhang1017,项目名称:SSD_resnet_pytorch,代码行数:23,代码来源:ssd.py

示例2: __init__

# 需要导入模块: import data [as 别名]
# 或者: from data import voc [as 别名]
def __init__(self, phase, size, base, extras, head, num_classes):
        super(SSD, self).__init__()
        self.phase = phase
        self.num_classes = num_classes
        self.cfg = (coco, voc)[num_classes == 21]
        self.priorbox = PriorBox(self.cfg)
        self.priors = Variable(self.priorbox.forward(), volatile=True)
        self.size = size

        # SSD network
        self.vgg = nn.ModuleList(base)
        # Layer learns to scale the l2 normalized features from conv4_3
        self.L2Norm = L2Norm(512, 20)
        self.extras = nn.ModuleList(extras)

        self.loc = nn.ModuleList(head[0])
        self.conf = nn.ModuleList(head[1])

        if phase == 'test':
            self.softmax = nn.Softmax(dim=-1)
            self.detect = Detect(num_classes, 0, 200, 0.01, 0.45) 
开发者ID:bailvwangzi,项目名称:repulsion_loss_ssd,代码行数:23,代码来源:ssd.py

示例3: __init__

# 需要导入模块: import data [as 别名]
# 或者: from data import voc [as 别名]
def __init__(self, num_classes, bkg_label, top_k, conf_thresh, nms_thresh):
        self.num_classes = num_classes
        self.background_label = bkg_label
        self.top_k = top_k
        # Parameters used in nms.
        self.nms_thresh = nms_thresh
        if nms_thresh <= 0:
            raise ValueError('nms_threshold must be non negative.')
        self.conf_thresh = conf_thresh
        self.variance = cfg['variance'] 
开发者ID:lijiannuist,项目名称:lightDSFD,代码行数:12,代码来源:detection.py

示例4: __init__

# 需要导入模块: import data [as 别名]
# 或者: from data import voc [as 别名]
def __init__(self, num_classes, size, bkg_label, top_k, conf_thresh, nms_thresh):
        self.num_classes = num_classes
        self.background_label = bkg_label
        self.top_k = top_k
        # Parameters used in nms.
        self.nms_thresh = nms_thresh
        if nms_thresh <= 0:
            raise ValueError('nms_threshold must be non negative.')
        self.conf_thresh = conf_thresh
        self.variance = cfg[str(size)]['variance'] 
开发者ID:luuuyi,项目名称:RefineDet.PyTorch,代码行数:12,代码来源:detection.py


注:本文中的data.voc方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。