Closed mikegerber closed 4 years ago
Actually, this tool takes raw image and then models are fed with binarized format . So the image to be grayscale or not is not matter, the most important thing is how good binarization of input :)
The question is: Can ocrd-sbb-textline-detector
take grayscale input, currently, not hypothetically?
models are fed with binarized format
@vahidrezanezhad So the model was trained with binarized images, correct? In this case, feeding "raw" greyscale/colour images to the tool will not error, but simply produce worse results?
If this is currently the case (which I assume), then the documentation should rather state that a binarized image is required for the input.
models are fed with binarized format
@vahidrezanezhad So the model was trained with binarized images, correct? In this case, feeding "raw" greyscale/colour images to the tool will not error, but simply produce worse results?
If this is currently the case (which I assume), then the documentation should rather state that a binarized image is required for the input.
Dear @cneud , as you remember this model (for layout) was trained with only 30 images and both original and binarized form fed into model. But those images where actually much more like binarized ones. So, I decided to first do binarization on input image and then feed it into the model which helped us to get much better results. For binarization I have used otsu method and since otsu binarization works on gray scale images better I said that this model can also work on gray scale images too and even better.
@cneud I forget to cover this part (he documentation should rather state that a binarized image is required for the input.), actually not a binarized image is needed but as I said by the way I do binarization at first step in our tool. so since our binarization works better, so if you provide for this tool a binarized image, then clearly you will get better result.
So can we agree on this then?
"The tool does accept raw (RGB/grayscale) images as input, but results will be much improved when a properly binarized images is used instead."
Yep, this is correct .
Does it work on grayscale images?