Shortcuts

TextSpottingLocalVisualizer

class mmocr.visualization.TextSpottingLocalVisualizer(name='visualizer', font_families='sans-serif', font_properties=None, **kwargs)[源代码]
参数
  • name (str) –

  • font_families (Union[str, List[str]]) –

  • font_properties (Optional[Union[str, matplotlib.font_manager.FontProperties]]) –

返回类型

None

add_datasample(name, image, data_sample=None, draw_gt=True, draw_pred=True, show=False, wait_time=0, pred_score_thr=0.5, out_file=None, step=0)[源代码]

Draw datasample and save to all backends.

  • If GT and prediction are plotted at the same time, they are

displayed in a stitched image where the left image is the ground truth and the right image is the prediction. - If show is True, all storage backends are ignored, and the images will be displayed in a local window. - If out_file is specified, the drawn image will be saved to out_file. This is usually used when the display is not available.

参数
  • name (str) – The image identifier.

  • image (np.ndarray) – The image to draw.

  • data_sample (TextSpottingDataSample, optional) –

    TextDetDataSample which contains gt and prediction. Defaults

    to None.

  • draw_gt (bool) – Whether to draw GT TextDetDataSample. Defaults to True.

  • draw_pred (bool) – Whether to draw Predicted TextDetDataSample. Defaults to True.

  • show (bool) – Whether to display the drawn image. Default to False.

  • wait_time (float) – The interval of show (s). Defaults to 0.

  • out_file (str) – Path to output file. Defaults to None.

  • pred_score_thr (float) – The threshold to visualize the bboxes and masks. Defaults to 0.3.

  • step (int) – Global step value to record. Defaults to 0.

返回类型

None

Read the Docs v: dev-1.x
Versions
latest
stable
0.x
dev-1.x
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.