From f87a0dd6a74f70a42d8cee8296b34bb03536c75e Mon Sep 17 00:00:00 2001 From: Dmitry Kurtaev Date: Wed, 28 Mar 2018 12:53:12 +0300 Subject: [PATCH] Fix minimal aspect ratio scale for SSDs from TensorFlow --- samples/dnn/tf_text_graph_ssd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/dnn/tf_text_graph_ssd.py b/samples/dnn/tf_text_graph_ssd.py index f4f10668a9..178e8de34b 100644 --- a/samples/dnn/tf_text_graph_ssd.py +++ b/samples/dnn/tf_text_graph_ssd.py @@ -196,8 +196,8 @@ for i in range(args.num_layers): text_format.Merge('b: false', priorBox.attr["clip"]) if i == 0: - widths = [args.min_scale * 0.5, args.min_scale * sqrt(2.0), args.min_scale * sqrt(0.5)] - heights = [args.min_scale * 0.5, args.min_scale / sqrt(2.0), args.min_scale / sqrt(0.5)] + widths = [0.1, args.min_scale * sqrt(2.0), args.min_scale * sqrt(0.5)] + heights = [0.1, args.min_scale / sqrt(2.0), args.min_scale / sqrt(0.5)] else: widths = [scales[i] * sqrt(ar) for ar in args.aspect_ratios] heights = [scales[i] / sqrt(ar) for ar in args.aspect_ratios]