qq_40783082 2017-11-16 04:22 采纳率: 0%
浏览 1437

ssd跑ssd_pascal_webcam.py时候摄像头只有画面没有识别框

图片说明

如图所示,这样是什么问题啊,跑的是作者给的例子,

  • 写回答

1条回答 默认 最新

  • qq_40783082 2017-11-16 05:55
    关注

    from future import print_function
    import caffe
    from caffe.model_libs import *
    from google.protobuf import text_format

    import math
    import os
    import shutil
    import stat
    import subprocess
    import sys

    Add extra layers on top of a "base" network (e.g. VGGNet or Inception).

    def AddExtraLayers(net, use_batchnorm=True, lr_mult=1):
    use_relu = True

    # Add additional convolutional layers.
    # 19 x 19
    from_layer = net.keys()[-1]
    
    # TODO(weiliu89): Construct the name using the last layer to avoid duplication.
    # 10 x 10
    out_layer = "conv6_1"
    ConvBNLayer(net, from_layer, out_layer, use_batchnorm, use_relu, 256, 1, 0, 1,
        lr_mult=lr_mult)
    
    from_layer = out_layer
    out_layer = "conv6_2"
    ConvBNLayer(net, from_layer, out_layer, use_batchnorm, use_relu, 512, 3, 1, 2,
        lr_mult=lr_mult)
    
    # 5 x 5
    from_layer = out_layer
    out_layer = "conv7_1"
    ConvBNLayer(net, from_layer, out_layer, use_batchnorm, use_relu, 128, 1, 0, 1,
      lr_mult=lr_mult)
    
    from_layer = out_layer
    out_layer = "conv7_2"
    ConvBNLayer(net, from_layer, out_layer, use_batchnorm, use_relu, 256, 3, 1, 2,
      lr_mult=lr_mult)
    
    # 3 x 3
    from_layer = out_layer
    out_layer = "conv8_1"
    ConvBNLayer(net, from_layer, out_layer, use_batchnorm, use_relu, 128, 1, 0, 1,
      lr_mult=lr_mult)
    
    from_layer = out_layer
    out_layer = "conv8_2"
    ConvBNLayer(net, from_layer, out_layer, use_batchnorm, use_relu, 256, 3, 0, 1,
      lr_mult=lr_mult)
    
    # 1 x 1
    from_layer = out_layer
    out_layer = "conv9_1"
    ConvBNLayer(net, from_layer, out_layer, use_batchnorm, use_relu, 128, 1, 0, 1,
      lr_mult=lr_mult)
    
    from_layer = out_layer
    out_layer = "conv9_2"
    ConvBNLayer(net, from_layer, out_layer, use_batchnorm, use_relu, 256, 3, 0, 1,
      lr_mult=lr_mult)
    
    return net
    

    Modify the following parameters accordingly

    The directory which contains the caffe code.

    We assume you are running the script at the CAFFE_ROOT.

    caffe_root = os.getcwd()

    Set true if you want to start training right after generating all files.

    run_soon = True

    The device id for webcam

    webcam_id = 0

    Number of frames to be skipped.

    skip_frames = 0

    The parameters for the webcam demo

    Key parameters used in training

    If true, use batch norm for all newly added layers.

    Currently only the non batch norm version has been tested.

    use_batchnorm = False
    num_classes = 21
    share_location = True
    background_label_id=0
    conf_loss_type = P.MultiBoxLoss.SOFTMAX
    code_type = P.PriorBox.CENTER_SIZE

    评论

报告相同问题?

悬赏问题

  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?