class_docstr: CenterNet network using Hourglass from https://arxiv.org/abs/1904.07850S.
class_docstr_tok: ["CenterNet","network","using","Hourglass","from","https",":","\/\/arxiv.org\/abs\/1904.07850S","."]
code: def __init__(
      self,
      network=hourglass.Hourglass,
      heads_losses=None,
      optimizer=None,
      get_k_predictions_test=3,
      score_threshold=0.0,
      pretrained_checkpoint_dir="",
      remove_pretrained_heads=False,
      input_shape=(None, 512, 512, 3),
      layers_to_train=None,
      clip_norm=None,
      shape_centers=None,
      shape_sdfs=None,
      beta=50,
      shape_pointclouds=None,
      dict_clusters=None,
      rotation_svd=True,
      **network_kwargs,
  ):
      self.k = get_k_predictions_test
      self.score_threshold = score_threshold
      self.sample_input_image = "image"
      self.sample_image_size = "original_image_spatial_shape"
      self.sample_num_boxes = "num_boxes"
      self.shape_centers = shape_centers
      self.shape_sdfs = shape_sdfs
      self.shape_pointclouds = shape_pointclouds
      self.dict_clusters = dict_clusters
      self.rotation_svd = rotation_svd
      self.softargmax_sdf = centernet_utils.SoftArgMax(beta, shape_sdfs)
      self.heads_losses = heads_losses
      self.optimizer = optimizer
      self.network = network(input_shape, **network_kwargs)
      print("Building the network...")
      self.network.build(input_shape)
      print("Network built!")
      if pretrained_checkpoint_dir:
          if remove_pretrained_heads:
              tmp_network_kwargs = network_kwargs.copy()
              tmp_network_kwargs["heads"] = None
              network_no_heads = network(
                  input_shape, **tmp_network_kwargs
              )
          else:
              network_no_heads = None
          self.load_ckpt(pretrained_checkpoint_dir, network_no_heads)
  
      if layers_to_train is not None:
          layers_to_train = (
              [layers_to_train]
              if isinstance(layers_to_train, str)
              else layers_to_train
          )
          for m in self.network.layers:
              if m.name in layers_to_train:
                  m.trainable = True
              else:
                  m.trainable = False
          self.network.summary()
  
      self.clip_norm = clip_norm
      self.beta = beta
      self.output_stride = self.network.output_stride
  
      # Parameters to set with the dataset
      self.batch_size = None
      self.window_size = None
  
imports: import collections
  import os
  import random
  import string
  import time
  from absl import logging
  import numpy
  import tensorflow
  from tensorflow_graphics.projects.points_to_3Dobjects.models import centernet_utils
  from tensorflow_graphics.projects.points_to_3Dobjects.networks import hourglass
  from tensorflow_graphics.projects.points_to_3Dobjects.transforms import transforms
  from tensorflow_graphics.projects.points_to_3Dobjects.utils import image
  from google3.pyglib import gfile
label_desc: Use image node_id 1 to create a new CenterNetVID object  with example: obj = CenterNetVID(network, heads_losses, optimizer, get_k_predictions_test, score_threshold, pretrained_checkpoint_dir, remove_pretrained_heads, input_shape, layers_to_train, clip_norm, shape_centers, shape_sdfs, beta, shape_pointclouds, dict_clusters, rotation_svd)