crowdkit.aggregation.image_segmentation.segmentation_majority_vote.SegmentationMajorityVote | Source code
SegmentationMajorityVote(self,on_missing_skill: str = 'error',default_skill: Optional[float] = None)
Segmentation Majority Vote - chooses a pixel if more than half of workers voted.
This method implements a straightforward approach to the image segmentations aggregation:
it assumes that if pixel is not inside in the worker's segmentation, this vote counts
as 0, otherwise, as 1. Next, the
SegmentationEM aggregates these categorical values
for each pixel by the Majority Vote.
The method also supports weighted majority voting if
skills were provided to
Doris Jung-Lin Lee. 2018. Quality Evaluation Methods for Crowdsourced Image Segmentation https://ilpubs.stanford.edu:8090/1161/1/main.pdf
A default skill value for missing skills.
Tasks' segmentations. A pandas.Series indexed by
How to handle assignments done by workers with unknown skill. Possible values:
import numpy as npimport pandas as pdfrom crowdkit.aggregation import SegmentationMajorityVotedf = pd.DataFrame([['t1', 'p1', np.array([[1, 0], [1, 1]])],['t1', 'p2', np.array([[0, 1], [1, 1]])],['t1', 'p3', np.array([[0, 1], [1, 1]])]],columns=['task', 'worker', 'segmentation'])result = SegmentationMajorityVote().fit_predict(df)
Last updated: March 31, 2023