projects
/
platform
/
upstream
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2464e3
)
Determine SSD input shape
author
Liubov Batanina
<piccione-mail@yandex.ru>
Wed, 13 May 2020 11:44:23 +0000
(14:44 +0300)
committer
Liubov Batanina
<piccione-mail@yandex.ru>
Thu, 14 May 2020 05:16:45 +0000
(08:16 +0300)
samples/dnn/tf_text_graph_ssd.py
patch
|
blob
|
history
diff --git
a/samples/dnn/tf_text_graph_ssd.py
b/samples/dnn/tf_text_graph_ssd.py
index
bf1d788
..
46a9064
100644
(file)
--- a/
samples/dnn/tf_text_graph_ssd.py
+++ b/
samples/dnn/tf_text_graph_ssd.py
@@
-234,6
+234,12
@@
def createSSDGraph(modelPath, configPath, outputPath):
# Connect input node to the first layer
assert(graph_def.node[0].op == 'Placeholder')
+ try:
+ input_shape = graph_def.node[0].attr['shape']['shape'][0]['dim']
+ input_shape[1]['size'] = image_height
+ input_shape[2]['size'] = image_width
+ except:
+ print("Input shapes are undefined")
# assert(graph_def.node[1].op == 'Conv2D')
weights = graph_def.node[1].input[-1]
for i in range(len(graph_def.node[1].input)):