refactoring empty array creation
This commit is contained in:
parent
4e79b53ffd
commit
51ae3893a7
BIN
mediapipe/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
mediapipe/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
mediapipe/python/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
mediapipe/python/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
|
@ -367,8 +367,7 @@ class SolutionBase:
|
||||||
# output stream names.
|
# output stream names.
|
||||||
solution_outputs = collections.namedtuple(
|
solution_outputs = collections.namedtuple(
|
||||||
'SolutionOutputs', self._output_stream_type_info.keys())
|
'SolutionOutputs', self._output_stream_type_info.keys())
|
||||||
empty_list = [[] for _ in range(len(solution_outputs._fields))]
|
results = solution_outputs(*([""] * len(solution_outputs._fields)))
|
||||||
results = solution_outputs(*(empty_list))
|
|
||||||
for stream_name in self._output_stream_type_info.keys():
|
for stream_name in self._output_stream_type_info.keys():
|
||||||
if stream_name in self._graph_outputs:
|
if stream_name in self._graph_outputs:
|
||||||
results = results._replace(**{stream_name: self._get_packet_content(
|
results = results._replace(**{stream_name: self._get_packet_content(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user