More comprehensive representation of predictors
For those who play around with the predictor's component, you might value your understanding of their composition. In order to get a cleaner interface, we improved the representation of all predictors component.
The following snippet:
python
from doctr.models import ocr_predictor
print(ocr_predictor())
now yields a much cleaner representation of the predictor composition
OCRPredictor(
(det_predictor): DetectionPredictor(
(pre_processor): PreProcessor(
(resize): Resize(output_size=(1024, 1024), method='bilinear')
(normalize): Compose(
(transforms): [
LambdaTransformation(),
Normalize(mean=[0.7979999780654907, 0.7850000262260437, 0.7720000147819519], std=[0.2639999985694885, 0.27489998936653137, 0.28700000047683716]),
]
)
)
(model): DBNet(
(feat_extractor): IntermediateLayerGetter()
(fpn): FeaturePyramidNetwork(channels=128)
(probability_head): <tensorflow.python.keras.engine.sequential.Sequential object at 0x7f6f645f58e0>
(threshold_head): <tensorflow.python.keras.engine.sequential.Sequential object at 0x7f6f7ce15310>
(postprocessor): DBPostProcessor(box_thresh=0.1, max_candidates=1000)
)
)
(reco_predictor): RecognitionPredictor(
(pre_processor): PreProcessor(
(resize): Resize(output_size=(32, 128), method='bilinear', preserve_aspect_ratio=True, symmetric_pad=False)
(normalize): Compose(
(transforms): [
LambdaTransformation(),
Normalize(mean=[0.5, 0.5, 0.5], std=[1.0, 1.0, 1.0]),
]
)
)
(model): CRNN(
(feat_extractor): <doctr.models.backbones.vgg.VGG object at 0x7f6f7d866040>
(decoder): <tensorflow.python.keras.engine.sequential.Sequential object at 0x7f6f7cce2430>
(postprocessor): CTCPostProcessor(vocab_size=118)
)
)
(doc_builder): DocumentBuilder(resolve_lines=False, resolve_blocks=False, paragraph_break=0.035)
)
Breaking changes
Metrics' granularity
Renamed `ExactMatch` to `TextMatch` since the metric now produces different levels of flexibility for the evaluation. Additionally, the constructor flags have been deprecated since the summary will provide all different types of evaluation.