Skip to content

Commit

Permalink
fix: expansion crash when no structures have been detected #95
Browse files Browse the repository at this point in the history
  • Loading branch information
OBrink committed Oct 19, 2023
1 parent a8e8e52 commit 1242a67
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions decimer_segmentation/decimer_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ def get_expanded_masks(image: np.array) -> np.array:
"""
# Structure detection with MRCNN
masks, bboxes, _ = get_mrcnn_results(image)
if len(bboxes) == 0:
return masks
size = determine_depiction_size_with_buffer(bboxes)
# Mask expansion
expanded_masks = complete_structure_mask(
Expand Down

0 comments on commit 1242a67

Please sign in to comment.