class_docstr: The class for implementing FCENet head.
  
  FCENet(CVPR2021): `Fourier Contour Embedding for Arbitrary-shaped Text
  Detection <https://arxiv.org/abs/2104.10442>`_
  
  Args:
      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.
code: def __init__(
      self,
      in_channels: int,
      fourier_degree: int = 5,
      module_loss: Dict = dict(type="FCEModuleLoss", num_sample=50),
      postprocessor: Dict = dict(
          type="FCEPostprocessor",
          text_repr_type="poly",
          num_reconstr_points=50,
          alpha=1.0,
          beta=2.0,
          score_thr=0.3,
      ),
      init_cfg: Optional[Dict] = dict(
          type="Normal",
          mean=0,
          std=0.01,
          override=[
              dict(name="out_conv_cls"),
              dict(name="out_conv_reg"),
          ],
      ),
  ) -> None:
      module_loss["fourier_degree"] = fourier_degree
      postprocessor["fourier_degree"] = fourier_degree
      super().__init__(
          module_loss=module_loss,
          postprocessor=postprocessor,
          init_cfg=init_cfg,
      )
  
      assert isinstance(in_channels, int)
      assert isinstance(fourier_degree, int)
  
      self.in_channels = in_channels
      self.fourier_degree = fourier_degree
      self.out_channels_cls = 4
      self.out_channels_reg = (2 * self.fourier_degree + 1) * 2
  
      self.out_conv_cls = nn.Conv2d(
          self.in_channels,
          self.out_channels_cls,
          kernel_size=3,
          stride=1,
          padding=1,
      )
      self.out_conv_reg = nn.Conv2d(
          self.in_channels,
          self.out_channels_reg,
          kernel_size=3,
          stride=1,
          padding=1,
      )
  
file_path: mmocr/mmocr/models/textdet/heads/fce_head.py
imports: from typing import Dict, List, Optional
  import torch
  import torch.nn
  from mmdet.models.utils import multi_apply
  from mmocr.models.textdet.heads import BaseTextDetHead
  from mmocr.registry import MODELS
  from mmocr.structures import TextDetDataSample
label_desc: Use image node_id 1 to create a new FCEHead object from inherited base classes: BaseTextDetHead with example: obj = FCEHead(in_channels, fourier_degree, module_loss, postprocessor, init_cfg)