code: def __init__(self, option, model_type, dataset, modules):
      super(PointGroup, self).__init__(option)
      backbone_options = option.get(
          "backbone", {"architecture": "unet"}
      )
      self.Backbone = Minkowski(
          backbone_options.get("architecture", "unet"),
          input_nc=dataset.feature_dimension,
          num_layers=4,
          config=backbone_options.get("config", {}),
      )
  
      self._scorer_type = option.get("scorer_type", "encoder")
      cluster_voxel_size = option.get("cluster_voxel_size", 0.05)
      if cluster_voxel_size:
          self._voxelizer = GridSampling3D(
              cluster_voxel_size, quantize_coords=True, mode="mean"
          )
      else:
          self._voxelizer = None
      self.ScorerUnet = Minkowski(
          "unet",
          input_nc=self.Backbone.output_nc,
          num_layers=4,
          config=option.scorer_unet,
      )
      self.ScorerEncoder = Minkowski(
          "encoder",
          input_nc=self.Backbone.output_nc,
          num_layers=4,
          config=option.scorer_encoder,
      )
      self.ScorerMLP = MLP(
          [
              self.Backbone.output_nc,
              self.Backbone.output_nc,
              self.ScorerUnet.output_nc,
          ]
      )
      self.ScorerHead = (
          Seq()
          .append(torch.nn.Linear(self.ScorerUnet.output_nc, 1))
          .append(torch.nn.Sigmoid())
      )
  
      self.Offset = Seq().append(
          MLP(
              [self.Backbone.output_nc, self.Backbone.output_nc],
              bias=False,
          )
      )
      self.Offset.append(torch.nn.Linear(self.Backbone.output_nc, 3))
  
      self.Semantic = (
          Seq()
          .append(
              MLP(
                  [self.Backbone.output_nc, self.Backbone.output_nc],
                  bias=False,
              )
          )
          .append(
              torch.nn.Linear(
                  self.Backbone.output_nc, dataset.num_classes
              )
          )
          .append(torch.nn.LogSoftmax(dim=-1))
      )
      self.loss_names = [
          "loss",
          "offset_norm_loss",
          "offset_dir_loss",
          "semantic_loss",
          "score_loss",
      ]
      stuff_classes = dataset.stuff_classes
      if is_list(stuff_classes):
          stuff_classes = torch.Tensor(stuff_classes).long()
      self._stuff_classes = torch.cat(
          [torch.tensor([IGNORE_LABEL]), stuff_classes]
      )
  
imports: import torch
  import os
  from torch_points_kernels import region_grow
  from torch_geometric.data import Data
  from torch_scatter import scatter
  import random
  from torch_points3d.datasets.segmentation import IGNORE_LABEL
  from torch_points3d.models.base_model import BaseModel
  from torch_points3d.applications.minkowski import Minkowski
  from torch_points3d.core.common_modules import Seq, MLP, FastBatchNorm1d
  from torch_points3d.core.losses import offset_loss, instance_iou_loss
  from torch_points3d.core.data_transform import GridSampling3D
  from .structures import PanopticLabels, PanopticResults
  from torch_points3d.utils import is_list
label_desc: Use image node_id 1 to create a new PointGroup object from inherited base classes: BaseModel with example: obj = PointGroup(option, model_type, dataset, modules)