bonseyes / SFD

S³FD: Single Shot Scale-invariant Face Detector
MIT License
8 stars 3 forks source link

bug in deploy.prototxt #34

Closed ghimiredhikura closed 6 years ago

ghimiredhikura commented 6 years ago

There is small bug in deploy.prototxt of NVISOA6 and NVISOA7 model proided in the google drive link. NVISOA6 [https://drive.google.com/drive/folders/1bf4Y0zcjmjKcxZttd-atGl3ifJzUIgfD] NVISOA7[https://drive.google.com/drive/folders/1_tmrTB0HYzSq3gFPKUWlfKtHQn6WIWNM]

Please fix this.

BUG: Error parsing text-format opencv_caffe.NetParameter: 2173:13: Non-repeated field "min_size" is specified multiple times.

layer {
  name: "conv5_mbox_priorbox"
  type: "PriorBox"
  bottom: "conv5"
  bottom: "data"
  top: "conv5_mbox_priorbox"
  prior_box_param {
    min_size: 16.0
    min_size: 32.0
    flip: false
    clip: false
    variance: 0.1
    variance: 0.1
    variance: 0.2
    variance: 0.2
    step: 8.0
    offset: 0.5
  }
}

this should be

layer {
  name: "conv5_mbox_priorbox"
  type: "PriorBox"
  bottom: "conv5"
  bottom: "data"
  top: "conv5_mbox_priorbox"
  prior_box_param {
    min_size: 16.0
    max_size: 32.0
    flip: false
    clip: false
    variance: 0.1
    variance: 0.1
    variance: 0.2
    variance: 0.2
    step: 8.0
    offset: 0.5
  }
}
abdelrahman-gaber commented 6 years ago

Which version of Caffe did you use. I used this many times before with just "min_size" and it was working well. This is helpful as it allows to add more than two anchor boxes with different sizes to the same layer, so I used it to make the script that generates the model more generic.

ghimiredhikura commented 6 years ago

Yes, there is no problem with caffe, ncnn and tengine. but while I test with opencv dnn inference module, it showed above error. Well, I didn't knew it was intentionally kept both params as min_size. But yes with in opencv it worked after I changed as above.