Skip to content

Commit 42b3338

Browse files
rename output layer to text_features, restore the test
1 parent 1a7539a commit 42b3338

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

demos/tests/cases.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,20 +1285,19 @@ def single_option_cases(key, *args):
12851285
single_option_cases('-m', ModelArg('wav2vec2-base'))
12861286
)),
12871287

1288-
# TODO: Demo supports only topologies with the following input tensor name: image
1289-
# PythonDemo(name='text_spotting_demo', device_keys=['-d'],
1290-
# model_keys=['-m_m', '-m_te', '-m_td'], test_cases=combine_cases(
1291-
# TestCase(options={'--no_show': None, '--delay': '1', **MONITORS,
1292-
# '-i': DataPatternArg('text-detection')}),
1293-
# [
1294-
# TestCase(options={
1295-
# '-m_m': ModelArg('text-spotting-0005-detector'),
1296-
# '-m_te': ModelArg('text-spotting-0005-recognizer-encoder'),
1297-
# '-m_td': ModelArg('text-spotting-0005-recognizer-decoder'),
1298-
# '--no_track': None
1299-
# }),
1300-
# ]
1301-
# )),
1288+
PythonDemo(name='text_spotting_demo', device_keys=['-d'],
1289+
model_keys=['-m_m', '-m_te', '-m_td'], test_cases=combine_cases(
1290+
TestCase(options={'--no_show': None, '--delay': '1', **MONITORS,
1291+
'-i': DataPatternArg('text-detection')}),
1292+
[
1293+
TestCase(options={
1294+
'-m_m': ModelArg('text-spotting-0005-detector'),
1295+
'-m_te': ModelArg('text-spotting-0005-recognizer-encoder'),
1296+
'-m_td': ModelArg('text-spotting-0005-recognizer-decoder'),
1297+
'--no_track': None
1298+
}),
1299+
]
1300+
)),
13021301

13031302
PythonDemo(name='text_to_speech_demo', device_keys=['-d'],
13041303
model_keys=['-m_duration', '-m_forward', '-m_upsample', '-m_rnn', '-m_melgan'], test_cases=combine_cases(

demos/text_spotting_demo/python/text_spotting_demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def main():
184184
except RuntimeError:
185185
raise RuntimeError('Demo supports only topologies with the following input tensor name: {}'.format(input_tensor_name))
186186

187-
required_output_names = {'boxes', 'labels', 'masks', 'text_features.0'}
187+
required_output_names = {'boxes', 'labels', 'masks', 'text_features'}
188188
for output_tensor_name in required_output_names:
189189
try:
190190
mask_rcnn_model.output(output_tensor_name)
@@ -269,7 +269,7 @@ def main():
269269
scores = outputs['boxes'][:, 4]
270270
classes = outputs['labels'].astype(np.uint32)
271271
raw_masks = outputs['masks']
272-
text_features = outputs['text_features.0']
272+
text_features = outputs['text_features']
273273

274274
# Filter out detections with low confidence.
275275
detections_filter = scores > args.prob_threshold

0 commit comments

Comments
 (0)