mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -122,7 +122,6 @@ def createSSDGraph(modelPath, configPath, outputPath):
|
||||
print('Input image size: %dx%d' % (image_width, image_height))
|
||||
|
||||
# Read the graph.
|
||||
_inpNames = ['image_tensor']
|
||||
outNames = ['num_detections', 'detection_scores', 'detection_boxes', 'detection_classes']
|
||||
|
||||
writeTextGraph(modelPath, outputPath, outNames)
|
||||
@@ -247,6 +246,15 @@ def createSSDGraph(modelPath, configPath, outputPath):
|
||||
graph_def.node[1].input.append(graph_def.node[0].name)
|
||||
graph_def.node[1].input.append(weights)
|
||||
|
||||
# check and correct the case when preprocessing block is after input
|
||||
preproc_id = "Preprocessor/"
|
||||
if graph_def.node[2].name.startswith(preproc_id) and \
|
||||
graph_def.node[2].input[0].startswith(preproc_id):
|
||||
|
||||
if not any(preproc_id in inp for inp in graph_def.node[3].input):
|
||||
graph_def.node[3].input.insert(0, graph_def.node[2].name)
|
||||
|
||||
|
||||
# Create SSD postprocessing head ###############################################
|
||||
|
||||
# Concatenate predictions of classes, predictions of bounding boxes and proposals.
|
||||
|
||||
@@ -76,7 +76,7 @@ def main():
|
||||
a - show histogram for color image in curve mode \n
|
||||
b - show histogram in bin mode \n
|
||||
c - show equalized histogram (always in bin mode) \n
|
||||
d - show histogram for color image in curve mode \n
|
||||
d - show histogram for gray image in curve mode \n
|
||||
e - show histogram for a normalized image in curve mode \n
|
||||
Esc - exit \n
|
||||
''')
|
||||
|
||||
Reference in New Issue
Block a user