code: def __init__(self, dataset_opt):
      super().__init__(dataset_opt)
  
      pre_transform = self.pre_transform
      ss_transform = getattr(self, "ss_transform", None)
      train_transform = self.train_transform
      val_transform = self.val_transform
      test_transform = self.test_transform
      pre_filter = self.pre_filter
      test_pre_filter = getattr(self, "test_pre_filter", None)
      self.is_patch = dataset_opt.is_patch
  
      if dataset_opt.is_patch:
          self.train_dataset = Patch3DMatch(
              root=self._data_path,
              mode="train",
              radius_patch=dataset_opt.radius_patch,
              num_frame_per_fragment=dataset_opt.num_frame_per_fragment,
              max_dist_overlap=dataset_opt.max_dist_overlap,
              min_overlap_ratio=dataset_opt.min_overlap_ratio,
              tsdf_voxel_size=dataset_opt.tsdf_voxel_size,
              limit_size=dataset_opt.limit_size,
              depth_thresh=dataset_opt.depth_thresh,
              pre_transform=pre_transform,
              transform=train_transform,
              num_random_pt=dataset_opt.num_random_pt,
              is_offline=dataset_opt.is_offline,
              pre_filter=pre_filter,
          )
  
          self.val_dataset = Patch3DMatch(
              root=self._data_path,
              mode="val",
              radius_patch=dataset_opt.radius_patch,
              num_frame_per_fragment=dataset_opt.num_frame_per_fragment,
              max_dist_overlap=dataset_opt.max_dist_overlap,
              min_overlap_ratio=dataset_opt.min_overlap_ratio,
              tsdf_voxel_size=dataset_opt.tsdf_voxel_size,
              limit_size=dataset_opt.limit_size,
              depth_thresh=dataset_opt.depth_thresh,
              pre_transform=pre_transform,
              transform=val_transform,
              num_random_pt=dataset_opt.num_random_pt,
              is_offline=dataset_opt.is_offline,
              pre_filter=test_pre_filter,
          )
      else:
          self.train_dataset = Fragment3DMatch(
              root=self._data_path,
              mode="train",
              num_frame_per_fragment=dataset_opt.num_frame_per_fragment,
              max_dist_overlap=dataset_opt.max_dist_overlap,
              min_overlap_ratio=dataset_opt.min_overlap_ratio,
              tsdf_voxel_size=dataset_opt.tsdf_voxel_size,
              limit_size=dataset_opt.limit_size,
              depth_thresh=dataset_opt.depth_thresh,
              pre_transform=pre_transform,
              transform=train_transform,
              pre_filter=pre_filter,
              is_online_matching=dataset_opt.is_online_matching,
              num_pos_pairs=dataset_opt.num_pos_pairs,
              self_supervised=dataset_opt.self_supervised,
              min_size_block=dataset_opt.min_size_block,
              max_size_block=dataset_opt.max_size_block,
              ss_transform=ss_transform,
              min_points=dataset_opt.min_points,
              use_fps=dataset_opt.use_fps,
          )
  
          self.val_dataset = Fragment3DMatch(
              root=self._data_path,
              mode="val",
              num_frame_per_fragment=dataset_opt.num_frame_per_fragment,
              max_dist_overlap=dataset_opt.max_dist_overlap,
              min_overlap_ratio=dataset_opt.min_overlap_ratio,
              tsdf_voxel_size=dataset_opt.tsdf_voxel_size,
              limit_size=dataset_opt.limit_size,
              depth_thresh=dataset_opt.depth_thresh,
              pre_transform=pre_transform,
              transform=val_transform,
              is_online_matching=False,
              num_pos_pairs=dataset_opt.num_pos_pairs,
              self_supervised=False,
          )
          self.test_dataset = TestPair3DMatch(
              root=self._data_path,
              pre_transform=pre_transform,
              transform=test_transform,
              num_pos_pairs=50,
              max_dist_overlap=dataset_opt.max_dist_overlap,
              self_supervised=False,
          )
  
imports: import numpy
  import os
  import os.path
  import torch
  from torch_geometric.data import Data
  from torch_points3d.datasets.registration.base3dmatch import Base3DMatch
  from torch_points3d.datasets.registration.utils import PatchExtractor
  from torch_points3d.datasets.registration.utils import tracked_matches
  from torch_points3d.datasets.registration.pair import Pair, MultiScalePair
  from torch_points3d.metrics.registration_tracker import PatchRegistrationTracker
  from torch_points3d.metrics.registration_tracker import FragmentRegistrationTracker
  from torch_points3d.datasets.registration.base_siamese_dataset import BaseSiameseDataset
  from torch_points3d.datasets.registration.base_siamese_dataset import GeneralFragment
  from torch_points3d.datasets.registration.utils import compute_overlap_and_matches
  from torch_points3d.datasets.registration.test3dmatch import TestPair3DMatch
label_desc: Use image node_id 1 to create a new General3DMatchDataset object from inherited base classes: BaseSiameseDataset with example: obj = General3DMatchDataset(dataset_opt)