-fl: the tool will perform full layout analysis including detection of marginalia and drop capitals
-ae: the tool will resize and enhance the image. The rescaled and enhanced image is saved to the output directory
-as: the tool will check whether the document needs rescaling or not
-cl: the tool will extract contours of curved textlines instead of rectangle bounding boxes
-si <directory>: when a directory is given here, the tool will save image regions detected in documents to this directory
-sd <directory>: when a directory is given, deskewed image will be saved to this directory
-sa <directory>: when a directory is given, plots of layout detection are saved to this directory
-tab: the tool will try to detect tables
-ib: the tool will binarize the input image
-ho: the tool will ignore headers in reading order detection
-sl <directory>: when a directory is given, plots of layout detection are saved to this directory
-ep: the tool will save a plot. This should be used alongside with `-sl`, `-sd`, `-sa`, `-si` or `-ae` options
-light: the tool will apply a faster method for main region detection and deskewing
-di <directory>: the tool will process all images in the directory in batch mode
```
```
The tool performs better with RGB images than greyscale/binarized images.
The tool performs better with RGB images as input than with greyscale or binarized images.
## Documentation
## Documentation
@ -126,7 +127,9 @@ Some heuristic methods are also employed to further improve the model prediction
<details>
<details>
<summary>click to expand/collapse</summary><br/>
<summary>click to expand/collapse</summary><br/>
The tool makes use of a combination of several models. For model training, please see [Training](https://github.com/qurator-spk/eynollah/blob/eynollah_light/README.md#training).
#### Enhancement model:
#### Enhancement model:
The image enhancement model is again an image-to-image model, trained on document images with low quality and GT of corresponding images with higher quality. For training the image enhancement model, a total of 1127 document images underwent 11 different downscaling processes and consequently 11 different qualities for each image were derived. The resulting images were cropped into patches of 672*672 pixels. Adam is used as an optimizer and the learning rate is 1e-4. Scaling is the only augmentation applied for training. The model is trained with a batch size of 2 and for 5 epochs.
The image enhancement model is again an image-to-image model, trained on document images with low quality and GT of corresponding images with higher quality. For training the image enhancement model, a total of 1127 document images underwent 11 different downscaling processes and consequently 11 different qualities for each image were derived. The resulting images were cropped into patches of 672*672 pixels. Adam is used as an optimizer and the learning rate is 1e-4. Scaling is the only augmentation applied for training. The model is trained with a batch size of 2 and for 5 epochs.