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.
- 返回类型
- 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)\).- 返回类型