Skip to content

Commit

Permalink
Improve docstring for the updated crop_covered_segments ratio_tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiltsov-max committed Apr 3, 2024
1 parent 53ff9e1 commit b4788ac
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions datumaro/util/mask_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,11 @@ def crop_covered_segments(
iou_threshold: IoU threshold for objects to be counted as intersected
By default is set to 0 to process any intersected objects
ratio_tolerance: an IoU "handicap" value for a situation
when an object is (almost) fully covered by another one and we
don't want make a "hole" in the background object
when a foreground object is (almost) fully inside of another one,
and we don't want make a "hole" in the background object.
If the foreground object is fully or almost fully (iou - this ratio)
inside the background object, it will be kept.
The default is to keep tiny (0.1% of IoU) foreground objects.
area_threshold: minimal area of included segments
Returns:
Expand Down

0 comments on commit b4788ac

Please sign in to comment.