Skip to content

Commit 2b9b0a4

Browse files
committed
Cleanup python impl
1 parent 2304c38 commit 2b9b0a4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/python/model_api/models/segmentation.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,10 @@ def get_contours(
219219
continue
220220

221221
children = []
222-
if hierarchy[i][2] >= 0:
223-
child_next_idx = hierarchy[i][2]
224-
while child_next_idx >= 0:
225-
children.append(contours[child_next_idx])
226-
child_next_idx = hierarchy[child_next_idx][0]
222+
next_child_idx = hierarchy[i][2]
223+
while next_child_idx >= 0:
224+
children.append(contours[next_child_idx])
225+
next_child_idx = hierarchy[next_child_idx][0]
227226

228227
if not children:
229228
children = None

0 commit comments

Comments
 (0)