qurator-spk / sbb_pixelwise_segmentation

Pixelwise segmentation for document images
Apache License 2.0
10 stars 10 forks source link

binarization augmentation: binarize channels together #9

Open bertsky opened 3 years ago

bertsky commented 3 years ago

IMO this is incorrect and can create bad results which could then deteriorate training:

https://github.com/qurator-spk/sbb_pixelwise_segmentation/blob/63fcb961898540f95cb347d43f8965ae65b8be3f/utils.py#L95-L106

Thresholding must not apply to each color channel separately, but all combined – e.g. by doing grayscale reduction first.