Skip to content

Commit 99a32ae

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

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

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

+3-7
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,9 @@ def process(self, input_data):
2929
else:
3030
texts = output["texts"]
3131
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])
32+
for result, text, conf in zip(input_data.infer_result, texts, confs):
33+
result.append(text)
34+
result.append(conf)
3935

4036
input_data.data = None
4137

0 commit comments

Comments
 (0)