Skip to content

Commit 83dfa9e

Browse files
Bourn3zzhanzhan1
authored andcommitted
Merge pull request #10 from Bourn3z/dev-offlineinfer
Add the function of concatenating to crops after detection.
2 parents f5b05fa + 2621f14 commit 83dfa9e

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

deploy/py_infer/src/parallel/module/recognition/rec_post_node.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ def __init__(self, args, msg_queue):
77
super(RecPostNode, self).__init__(args, msg_queue)
88
self.text_recognizer = None
99
self.task_type = self.args.task_type
10-
self.is_concat = self.args.is_concat
1110

1211
def init_self_args(self):
1312
self.text_recognizer = TextRecognizer(self.args)
@@ -29,13 +28,9 @@ def process(self, input_data):
2928
else:
3029
texts = output["texts"]
3130
confs = output["confs"]
32-
for i, result in enumerate(input_data.infer_result):
33-
if self.is_concat:
34-
result.append(texts[0])
35-
result.append(confs[0])
36-
else:
37-
result.append(texts[i])
38-
result.append(confs[i])
31+
for result, text, conf in zip(input_data.infer_result, texts, confs):
32+
result.append(text)
33+
result.append(conf)
3934

4035
input_data.data = None
4136

0 commit comments

Comments
 (0)