class_docstr: This is the Detection Model training class, which allows you to train object detection models
  on image datasets that are in Pascal VOC annotation format, using the YOLOv3.
code: def __init__(self):
      self.__model_type = ""
      self.__training_mode = True
  
      self.__model_min_input_size = 288
      self.__model_max_input_size = 448
      self.__model_anchors = []
      self.__inference_anchors = []
      self.__json_directory = ""
      self.__model_labels = []
      self.__num_objects = 0
      self.__pre_trained_model = ""
  
      self.__train_images_folder = ""
      self.__train_annotations_folder = ""
      self.__train_cache_file = ""
      self.__train_times = 8
      self.__train_batch_size = 4
      self.__train_learning_rate = 1e-4
      self.__train_epochs = 100
      self.__train_warmup_epochs = 3
      self.__train_ignore_treshold = 0.5
      self.__train_gpus = "0"
      self.__train_grid_scales = [1, 1, 1]
      self.__train_obj_scale = 5
      self.__train_noobj_scale = 1
      self.__train_xywh_scale = 1
      self.__train_class_scale = 1
      self.__model_directory = ""
      self.__train_weights_name = ""
      self.__train_debug = True
      self.__logs_directory = ""
  
      self.__validation_images_folder = ""
      self.__validation_annotations_folder = ""
      self.__validation_cache_file = ""
      self.__validation_times = 1
  
imports: import os
  import re
  import numpy
  import json
  from imageai.Detection.Custom.voc import parse_voc_annotation
  from imageai.Detection.YOLO.yolov3 import yolov3_main, yolov3_train, dummy_loss
  from imageai.Detection.Custom.generator import BatchGenerator
  from imageai.Detection.Custom.utils.utils import normalize, evaluate, makedirs
  from tensorflow.keras.callbacks import ReduceLROnPlateau
  from tensorflow.keras.optimizers import Adam
  from imageai.Detection.Custom.callbacks import CustomModelCheckpoint
  from imageai.Detection.Custom.utils.multi_gpu_model import multi_gpu_model
  from imageai.Detection.Custom.gen_anchors import generateAnchors
  import tensorflow
  from tensorflow.keras.models import load_model
  from tensorflow.keras import Input
  from tensorflow.keras.callbacks import TensorBoard
  import tensorflow.keras.backend
  import cv2
label_desc: Use image node_id 1 to create a new DetectionModelTrainer object  with example: obj = DetectionModelTrainer()