Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Natalia committed Apr 27, 2023
1 parent 0240cc3 commit a6ba08f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crowdkit/aggregation/image_segmentation/segmentation_rasa.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class SegmentationRASA(BaseImageSegmentationAggregator):
r"""The **Segmentation RASA** (Reliability Aware Sequence Aggregation) algorithm chooses a pixel if the sum of the weighted votes of each worker is more than 0.5.
The Segmentation RASA algorithm consists of three steps:
1. performs the weighted Majority Vote algorithm;
2. calculates weights for each worker from the current Majority Vote estimation;
3. performs the Segmentation RASA algorithm for a single image.
1. Performs the weighted Majority Vote algorithm.
2. Calculates weights for each worker from the current Majority Vote estimation.
3. Performs the Segmentation RASA algorithm for a single image.
The algorithm works iteratively. At each step, the workers are reweighted in proportion to their distances
from the current answer estimation. The distance is calculated as $1 - IOU$, where `IOU` (Intersection over Union) is an extent of overlap of two boxes.
Expand Down Expand Up @@ -80,7 +80,7 @@ def _segmentation_weighted(segmentations: pd.Series, weights: npt.NDArray[Any])
@staticmethod
def _calculate_weights(segmentations: pd.Series, mv: npt.NDArray[Any]) -> npt.NDArray[Any]:
"""
Calculates weights for each workers from the current Majority Vote estimation.
Calculates weights for each worker from the current Majority Vote estimation.
"""
intersection = (segmentations & mv).astype(float)
union = (segmentations | mv).astype(float)
Expand Down

0 comments on commit a6ba08f

Please sign in to comment.