Shortcuts

PSEPostprocessor

class mmocr.models.textdet.PSEPostprocessor(text_repr_type='poly', rescale_fields=['polygons'], min_kernel_confidence=0.5, score_threshold=0.3, min_kernel_area=0, min_text_area=16, downsample_ratio=0.25)[source]

Decoding predictions of PSENet to instances. This is partially adapted from https://github.com/whai362/PSENet.

Parameters
  • text_repr_type (str) – The boundary encoding type ‘poly’ or ‘quad’. Defaults to ‘poly’.

  • rescale_fields (list[str]) – The bbox/polygon field names to be rescaled. If None, no rescaling will be performed. Defaults to [‘polygons’].

  • min_kernel_confidence (float) – The minimal kernel confidence. Defaults to 0.5.

  • score_threshold (float) – The minimal text average confidence. Defaults to 0.3.

  • min_kernel_area (int) – The minimal text kernel area. Defaults to 0.

  • min_text_area (int) – The minimal text instance region area. Defaults to 16.

  • downsample_ratio (float) – Downsample ratio. Defaults to 0.25.

Return type

None

get_text_instances(pred_results, data_sample, **kwargs)[source]
Parameters
Returns

A new DataSample with predictions filled in. Polygons and results are saved in TextDetDataSample.pred_instances.polygons. The confidence scores are saved in TextDetDataSample.pred_instances.scores.

Return type

TextDetDataSample

Read the Docs v: dev-1.x
Versions
latest
stable
v1.0.1
v1.0.0
0.x
v0.6.3
v0.6.2
v0.6.1
v0.6.0
v0.5.0
v0.4.1
v0.4.0
v0.3.0
v0.2.1
v0.2.0
v0.1.0
dev-1.x
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.