stefanklut / laypa

Layout analysis to find layout elements in documents (similar to P2PaLA)
MIT License
17 stars 4 forks source link

Overlapping regions when training a region model #38

Closed fattynoparents closed 3 months ago

fattynoparents commented 3 months ago

When training a region model, how critical is it to have a certain overlapping of regions, like here f.e.x: image As far as I understand Laypa performs pixel-wise classification, and so each pixel in the image is classified into different regions. So having overlapping regions in the training data can create ambiguity because the same pixel might be assigned to multiple classes. Or am I wrong here?

stefanklut commented 3 months ago

Creation of ground truth makes one of the overlapping regions take priority over the other. This is not done in some special way. It merely loops over regions and the region that is last in the loop is the region to which the pixels are assigned. I would recommend keeping the regions separate, but this should not break on small overlaps. However, if you are assigning 2 regions with almost complete overlap. One of the regions will be ignored.