class_docstr: DBNet as described in `"Real-time Scene Text Detection with Differentiable Binarization"
  <https://arxiv.org/pdf/1911.08947.pdf>`_.
  
  Args:
  ----
      feature extractor: the backbone serving as feature extractor
      fpn_channels: number of channels each extracted feature maps is mapped to
      assume_straight_pages: if True, fit straight bounding boxes only
      exportable: onnx exportable returns only logits
      cfg: the configuration dict of the model
      class_names: list of class names
code: def __init__(
      self,
      feature_extractor: IntermediateLayerGetter,
      fpn_channels: int = 128,  # to be set to 256 to represent the author's initial idea
      bin_thresh: float = 0.3,
      assume_straight_pages: bool = True,
      exportable: bool = False,
      cfg: Optional[Dict[str, Any]] = None,
      class_names: List[str] = [CLASS_NAME],
  ) -> None:
      super().__init__()
      self.class_names = class_names
      num_classes: int = len(self.class_names)
      self.cfg = cfg
  
      self.feat_extractor = feature_extractor
      self.exportable = exportable
      self.assume_straight_pages = assume_straight_pages
  
      self.fpn = FeaturePyramidNetwork(channels=fpn_channels)
      # Initialize kernels
      _inputs = [
          layers.Input(shape=in_shape[1:])
          for in_shape in self.feat_extractor.output_shape
      ]
      output_shape = tuple(self.fpn(_inputs).shape)
  
      self.probability_head = keras.Sequential(
          [
              *conv_sequence(
                  64,
                  "relu",
                  True,
                  kernel_size=3,
                  input_shape=output_shape[1:],
              ),
              layers.Conv2DTranspose(
                  64,
                  2,
                  strides=2,
                  use_bias=False,
                  kernel_initializer="he_normal",
              ),
              layers.BatchNormalization(),
              layers.Activation("relu"),
              layers.Conv2DTranspose(
                  num_classes,
                  2,
                  strides=2,
                  kernel_initializer="he_normal",
              ),
          ]
      )
      self.threshold_head = keras.Sequential(
          [
              *conv_sequence(
                  64,
                  "relu",
                  True,
                  kernel_size=3,
                  input_shape=output_shape[1:],
              ),
              layers.Conv2DTranspose(
                  64,
                  2,
                  strides=2,
                  use_bias=False,
                  kernel_initializer="he_normal",
              ),
              layers.BatchNormalization(),
              layers.Activation("relu"),
              layers.Conv2DTranspose(
                  num_classes,
                  2,
                  strides=2,
                  kernel_initializer="he_normal",
              ),
          ]
      )
  
      self.postprocessor = DBPostProcessor(
          assume_straight_pages=assume_straight_pages,
          bin_thresh=bin_thresh,
      )
  
imports: from copy import deepcopy
  from typing import Any, Dict, List, Optional, Tuple
  import numpy
  import tensorflow
  from tensorflow import keras
  from tensorflow.keras import layers
  from tensorflow.keras.applications import ResNet50
  from doctr.file_utils import CLASS_NAME
  from doctr.models.utils import IntermediateLayerGetter, _bf16_to_float32, conv_sequence, load_pretrained_params
  from doctr.utils.repr import NestedObject
  from ...classification import mobilenet_v3_large
  from .base import DBPostProcessor, _DBNet
label_desc: Use image node_id 1 to create a new DBNet object from inherited base classes: _DBNet, keras, NestedObject with example: obj = DBNet(feature_extractor, fpn_channels, bin_thresh, assume_straight_pages, exportable, cfg, class_names)