1 | initial version |
@tobix10, Thanks for pointing that issue!
The https://github.com/opencv/opencv/blob/3.4.6/samples/dnn/object_detection.cpp is a bit outdated due preprocessing parameters such scale and mean already in the graph:
node {
name: "image_tensor"
op: "Placeholder"
attr {
key: "dtype"
value {
type: DT_UINT8
}
}
node {
name: "Preprocessor/mul"
op: "Mul"
input: "image_tensor"
input: "Preprocessor/mul/x"
}
node {
name: "Preprocessor/sub"
op: "Sub"
input: "Preprocessor/mul"
input: "Preprocessor/sub/y"
}
node {
name: "FirstStageFeatureExtractor/InceptionV2/InceptionV2/Conv2d_1a_7x7/separable_conv2d/depthwise"
op: "DepthwiseConv2dNative"
input: "Preprocessor/sub"
...
So the right arguments are
./example_dnn_object_detection --model=frozen_inference_graph.pb --config=faster_rcnn_inception_v2_coco_2018_01_28.pbtxt --width=450 --height=258
Note: you may vary input's width and height to achieve better accuracy.