code: def __init__(
      self,
      num_classes: int = 1,
      bbox_coder: ConfigType = dict(
          type="mmdet.DistancePointBBoxCoder"
      ),
      regress_ranges: RangeType = (
          (-1, 64),
          (64, 128),
          (128, 256),
          (256, 512),
          (512, INF),
      ),
      strides: List[int] = (8, 16, 32, 64, 128),
      center_sampling: bool = True,
      center_sample_radius: float = 1.5,
      norm_on_bbox: bool = True,
      loss_cls: ConfigType = dict(
          type="mmdet.FocalLoss",
          use_sigmoid=True,
          gamma=2.0,
          alpha=0.25,
          loss_weight=1.0,
      ),
      loss_bbox: ConfigType = dict(
          type="mmdet.GIoULoss", loss_weight=1.0
      ),
      loss_centerness: ConfigType = dict(
          type="mmdet.CrossEntropyLoss",
          use_sigmoid=True,
          loss_weight=1.0,
      ),
      loss_bezier: ConfigType = dict(
          type="mmdet.SmoothL1Loss", reduction="mean", loss_weight=1.0
      ),
  ) -> None:
      super().__init__()
      self.num_classes = num_classes
      self.strides = strides
      self.prior_generator = MlvlPointGenerator(strides)
      self.regress_ranges = regress_ranges
      self.center_sampling = center_sampling
      self.center_sample_radius = center_sample_radius
      self.norm_on_bbox = norm_on_bbox
      self.loss_centerness = MODELS.build(loss_centerness)
      self.loss_cls = MODELS.build(loss_cls)
      self.loss_bbox = MODELS.build(loss_bbox)
      self.loss_bezier = MODELS.build(loss_bezier)
      self.bbox_coder = TASK_UTILS.build(bbox_coder)
      use_sigmoid_cls = loss_cls.get("use_sigmoid", False)
      if use_sigmoid_cls:
          self.cls_out_channels = num_classes
      else:
          self.cls_out_channels = num_classes + 1
  
file_path: mmocr/projects/ABCNet/abcnet/model/abcnet_det_module_loss.py
imports: from typing import Dict, List, Tuple
  import torch
  from mmdet.models.task_modules.prior_generators import MlvlPointGenerator
  from mmdet.models.utils import multi_apply
  from mmdet.utils import reduce_mean
  from torch import Tensor
  from mmocr.models.textdet.module_losses.base import BaseTextDetModuleLoss
  from mmocr.registry import MODELS, TASK_UTILS
  from mmocr.structures import TextDetDataSample
  from mmocr.utils import ConfigType, DetSampleList, RangeType
  from ..utils import poly2bezier
label_desc: Use image node_id 1 to create a new ABCNetDetModuleLoss object from inherited base classes: BaseTextDetModuleLoss with example: obj = ABCNetDetModuleLoss(num_classes, bbox_coder, regress_ranges, strides, center_sampling, center_sample_radius, norm_on_bbox, loss_cls, loss_bbox, loss_centerness, loss_bezier)