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'})[source]

The class for implementing FCENet head.

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

Parameters
  • 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.

Return type

None

forward(inputs, data_samples=None)[source]
Parameters
  • 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.

Returns

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)\).

Return type

list[dict]

forward_single(x)[source]

Forward function for a single feature level.

Parameters

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

Returns

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)\).

Return type

Tensor

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.