szq0214/DSOD

DSOD Visualization Problem on Video Test

Closed this issue · 0 comments

I have download the DSOD_voc+coco model and modify the corresponding prototxt according to the video test in SSD project. While it works well in SSD project, the test failed when setting up the DSOD network, throwing the following error:

F0922 17:37:27.110465 13992 bbox_util.cpp:2197] Check failed: label < colors.size() (2 vs. 0)
*** Check failure stack trace: ***
    @     0x7f6b48c805cd  google::LogMessage::Fail()
    @     0x7f6b48c82433  google::LogMessage::SendToLog()
    @     0x7f6b48c8015b  google::LogMessage::Flush()
    @     0x7f6b48c82e1e  google::LogMessageFatal::~LogMessageFatal()
    @     0x7f6b493cb414  caffe::VisualizeBBox<>()
    @     0x7f6b49765844  caffe::DetectionOutputLayer<>::Forward_gpu()
    @     0x7f6b494689e1  caffe::Net<>::ForwardFromTo()
    @     0x7f6b49468ad7  caffe::Net<>::Forward()
    @           0x4199a3  test()
    @           0x415aa5  main
    @     0x7f6b47688830  __libc_start_main
    @           0x416679  _start
    @              (nil)  (unknown)

And here is the modified part in DSOD prototxt: (I mainly modify the input layer and detection output layer according to the SSD settings)
The input layer is:

layer {
  name: "data"
  type: "VideoData"
  top: "data"
  transform_param {
    mean_value: 104
    mean_value: 117
    mean_value: 123
    resize_param {
      prob: 1
      resize_mode: WARP
      height: 300
      width: 300
      interp_mode: LINEAR
    }
  }
  data_param {
    batch_size: 1
  }
  video_data_param {
    video_type: VIDEO
    video_file: "examples/videos/ILSVRC2015_train_00755001.mp4"
    skip_frames: 1
  }
}

And the detection layer is:

layer {
  name: "detection_out"
  type: "DetectionOutput"
  bottom: "mbox_loc"
  bottom: "mbox_conf_flatten"
  bottom: "mbox_priorbox"
  bottom: "data"
  top: "detection_out"
  include {
    phase: TEST
  }
  transform_param {
    mean_value: 104
    mean_value: 117
    mean_value: 123
    resize_param {
      prob: 1
      resize_mode: WARP
      height: 576
      width: 1024
      interp_mode: LINEAR
    }
  }
  detection_output_param {
    num_classes: 21
    share_location: true
    background_label_id: 0
    nms_param {
      nms_threshold: 0.449999988079
      top_k: 400
    }
    save_output_param {
      output_directory: "data/VOC0712/dsod_labelmap_voc.prototxt"
}
    code_type: CENTER_SIZE
    keep_top_k: 200
    confidence_threshold: 0.00999999977648
    visualize: true
    visualize_threshold: 0.3
  }
}

interestingly, when I close the visualize process by setting visualize: false, the network could work well but I can't tell if the result is right without visualize video. I wonder if anyone met the same problem like this and how do you deal with it?