Shortcuts

FCEHead

class mmocr.models.textdet.FCEHead(in_channels, fourier_degree=5, module_loss={'num_sample': 50, 'type': 'FCEModuleLoss'}, postprocessor={'alpha': 1.0, 'beta': 2.0, 'num_reconstr_points': 50, 'score_thr': 0.3, 'text_repr_type': 'poly', 'type': 'FCEPostprocessor'}, init_cfg={'mean': 0, 'override': [{'name': 'out_conv_cls'}, {'name': 'out_conv_reg'}], 'std': 0.01, 'type': 'Normal'})[源代码]

The class for implementing FCENet head.

FCENet(CVPR2021): Fourier Contour Embedding for Arbitrary-shaped Text Detection

参数
  • in_channels (int) – The number of input channels.

  • fourier_degree (int) – The maximum Fourier transform degree k. Defaults to 5.

  • module_loss (dict) – Config of loss for FCENet. Defaults to dict(type='FCEModuleLoss', num_sample=50).

  • postprocessor (dict) – Config of postprocessor for FCENet.

  • init_cfg (dict, optional) – Initialization configs.

返回类型

None

forward(inputs, data_samples=None)[源代码]
参数
  • inputs (List[Tensor]) – Each tensor has the shape of \((N, C_i, H_i, W_i)\).

  • data_samples (list[TextDetDataSample], optional) – A list of data samples. Defaults to None.

返回

A list of dict with keys of cls_res, reg_res corresponds to the classification result and regression result computed from the input tensor with the same index. They have the shapes of \((N, C_{cls,i}, H_i, W_i)\) and \((N, C_{out,i}, H_i, W_i)\).

返回类型

list[dict]

forward_single(x)[源代码]

Forward function for a single feature level.

参数

x (Tensor) – The input tensor with the shape of \((N, C_i, H_i, W_i)\).

返回

The classification and regression result with the shape of \((N, C_{cls,i}, H_i, W_i)\) and \((N, C_{out,i}, H_i, W_i)\).

返回类型

Tensor

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.