docstr: the Princeton 3DMatch dataset from the
  `"3DMatch: Learning Local Geometric Descriptors from RGB-D Reconstructions"
  <https://arxiv.org/pdf/1603.08182.pdf>`_
  paper, containing rgbd frames of the following dataset:
  `" SUN3D: A Database of Big Spaces Reconstructed using SfM and Object Labels
  "<http://sun3d.cs.princeton.edu/>`
  `"Scene Coordinate Regression Forests for Camera Relocalization in RGB-D Images
  "<https://www.microsoft.com/en-us/research/publication/scene-coordinate-regression-forests-for-camera-relocalization-in-rgb-d-images/>`
  `"Unsupervised Feature Learning for 3D Scene Labeling
  "<http://rgbd-dataset.cs.washington.edu/dataset/rgbd-scenes-v2/>`
  `"BundleFusion: Real-time Globally Consistent 3D Reconstruction using Online Surface Re-integration
  "<http://graphics.stanford.edu/projects/bundlefusion/>`
  `"Learning to Navigate the Energy Landscape
  "<http://graphics.stanford.edu/projects/reloc/>`
  
  Args:
      root (string): Root directory where the dataset should be saved
  
      num_frame_per_fragment (int, optional): indicate the number of frames
          we use to build fragments. If it is equal to 0, then we don't
          build fragments and use the raw frames.
  
      mode (string, optional): If :obj:`True`, loads the training dataset,
      otherwise the test dataset. (default: :obj:`True`)
  
      transform (callable, optional): A function/transform that takes in
          an :obj:`torch_geometric.data.Data` object and returns a
          transformed version. The data object will be transformed before
          every access. (default: :obj:`None`)
  
      pre_transform (callable, optional): A function/transform that takes in
          an :obj:`torch_geometric.data.Data` object and returns a
          transformed version. The data object will be transformed before
          being saved to disk. (default: :obj:`None`)
      pre_filter (callable, optional): A function that takes in an
          :obj:`torch_geometric.data.Data` object and returns a boolean
          value, indicating whether the data object should be included in the
          final dataset. (default: :obj:`None`)
docstr_tok: ["the","Princeton","3DMatch","dataset","from","the","`","``","3DMatch",":","Learning","Local","Geometric","Descriptors","from","RGB-D","Reconstructions","''","<","https",":","\/\/arxiv.org\/pdf\/1603.08182.pdf",">","`","_","paper",",","containing","rgbd","frames","of","the","following","dataset",":","`","``","SUN3D",":","A","Database","of","Big","Spaces","Reconstructed","using","SfM","and","Object","Labels","''","<","http",":","\/\/sun3d.cs.princeton.edu\/",">","`","`","``","Scene","Coordinate","Regression","Forests","for","Camera","Relocalization","in","RGB-D","Images","''","<","https",":","\/\/www.microsoft.com\/en-us\/research\/publication\/scene-coordinate-regression-forests-for-camera-relocalization-in-rgb-d-images\/",">","`","`","``","Unsupervised","Feature","Learning","for","3D","Scene","Labeling","''","<","http",":","\/\/rgbd-dataset.cs.washington.edu\/dataset\/rgbd-scenes-v2\/",">","`","`","``","BundleFusion",":","Real-time","Globally","Consistent","3D","Reconstruction","using","Online","Surface","Re-integration","''","<","http",":","\/\/graphics.stanford.edu\/projects\/bundlefusion\/",">","`","`","``","Learning","to","Navigate","the","Energy","Landscape","''","<","http",":","\/\/graphics.stanford.edu\/projects\/reloc\/",">","`","Args",":","root","(","string",")",":","Root","directory","where","the","dataset","should","be","saved","num_frame_per_fragment","(","int",",","optional",")",":","indicate","the","number","of","frames","we","use","to","build","fragments",".","If","it","is","equal","to","0",",","then","we","don't","build","fragments","and","use","the","raw","frames",".","mode","(","string",",","optional",")",":","If",":","obj",":","`","True","`",",","loads","the","training","dataset",",","otherwise","the","test","dataset",".","(","default",":",":","obj",":","`","True","`",")","transform","(","callable",",","optional",")",":","A","function\/transform","that","takes","in","an",":","obj",":","`","torch_geometric.data.Data","`","object","and","returns","a","transformed","version",".","The","data","object","will","be","transformed","before","every","access",".","(","default",":",":","obj",":","`","None","`",")","pre_transform","(","callable",",","optional",")",":","A","function\/transform","that","takes","in","an",":","obj",":","`","torch_geometric.data.Data","`","object","and","returns","a","transformed","version",".","The","data","object","will","be","transformed","before","being","saved","to","disk",".","(","default",":",":","obj",":","`","None","`",")","pre_filter","(","callable",",","optional",")",":","A","function","that","takes","in","an",":","obj",":","`","torch_geometric.data.Data","`","object","and","returns","a","boolean","value",",","indicating","whether","the","data","object","should","be","included","in","the","final","dataset",".","(","default",":",":","obj",":","`","None","`",")"]
code: def __init__(
      self,
      root,
      num_frame_per_fragment=50,
      mode="train_small",
      min_overlap_ratio=0.3,
      max_overlap_ratio=1.0,
      max_dist_overlap=0.01,
      tsdf_voxel_size=0.01,
      limit_size=700,
      depth_thresh=6,
      is_fine=True,
      transform=None,
      pre_transform=None,
      pre_filter=None,
      verbose=False,
      debug=False,
      num_random_pt=5000,
      is_offline=False,
      radius_patch=None,
      pre_transform_patch=None,
  ):
      r"""
      the Princeton 3DMatch dataset from the
      `"3DMatch: Learning Local Geometric Descriptors from RGB-D Reconstructions"
      <https://arxiv.org/pdf/1603.08182.pdf>`_
      paper, containing rgbd frames of the following dataset:
      `" SUN3D: A Database of Big Spaces Reconstructed using SfM and Object Labels
      "<http://sun3d.cs.princeton.edu/>`
      `"Scene Coordinate Regression Forests for Camera Relocalization in RGB-D Images
      "<https://www.microsoft.com/en-us/research/publication/scene-coordinate-regression-forests-for-camera-relocalization-in-rgb-d-images/>`
      `"Unsupervised Feature Learning for 3D Scene Labeling
      "<http://rgbd-dataset.cs.washington.edu/dataset/rgbd-scenes-v2/>`
      `"BundleFusion: Real-time Globally Consistent 3D Reconstruction using Online Surface Re-integration
      "<http://graphics.stanford.edu/projects/bundlefusion/>`
      `"Learning to Navigate the Energy Landscape
      "<http://graphics.stanford.edu/projects/reloc/>`
  
      Args:
          root (string): Root directory where the dataset should be saved
  
          num_frame_per_fragment (int, optional): indicate the number of frames
              we use to build fragments. If it is equal to 0, then we don't
              build fragments and use the raw frames.
  
          mode (string, optional): If :obj:`True`, loads the training dataset,
          otherwise the test dataset. (default: :obj:`True`)
  
          transform (callable, optional): A function/transform that takes in
              an :obj:`torch_geometric.data.Data` object and returns a
              transformed version. The data object will be transformed before
              every access. (default: :obj:`None`)
  
          pre_transform (callable, optional): A function/transform that takes in
              an :obj:`torch_geometric.data.Data` object and returns a
              transformed version. The data object will be transformed before
              being saved to disk. (default: :obj:`None`)
          pre_filter (callable, optional): A function that takes in an
              :obj:`torch_geometric.data.Data` object and returns a boolean
              value, indicating whether the data object should be included in the
              final dataset. (default: :obj:`None`)
      """
  
      self.verbose = verbose
      self.debug = debug
      self.is_fine = is_fine
      self.num_frame_per_fragment = num_frame_per_fragment
      self.tsdf_voxel_size = tsdf_voxel_size
      self.limit_size = limit_size
      self.depth_thresh = depth_thresh
      self.mode = mode
      self.num_random_pt = num_random_pt
      # select points for testing
      self.detector = RandomDetector(num_points=self.num_random_pt)
      # constant to compute overlap
      self.min_overlap_ratio = min_overlap_ratio
      self.max_overlap_ratio = max_overlap_ratio
      self.max_dist_overlap = max_dist_overlap
  
      self.is_offline = is_offline
      self.num_random_pt = num_random_pt
      self.radius_patch = radius_patch
      self.pre_transform_patch = pre_transform_patch
      if mode not in self.dict_urls.keys():
          raise RuntimeError(
              "this mode {} does "
              "not exist"
              "(train_small|train_tiny|train|val|test)".format(mode)
          )
      super(Base3DMatch, self).__init__(
          root, transform, pre_transform, pre_filter
      )
  
imports: import json
  import logging
  import numpy
  import os
  import os.path
  from plyfile import PlyData
  import shutil
  import torch
  from torch_geometric.data import Dataset, download_url, extract_zip
  from torch_geometric.data import Data
  from torch_points3d.datasets.registration.detector import RandomDetector
  from torch_points3d.datasets.registration.utils import rgbd2fragment_rough
  from torch_points3d.datasets.registration.utils import rgbd2fragment_fine
  from torch_points3d.datasets.registration.utils import compute_overlap_and_matches
  from torch_points3d.datasets.registration.utils import to_list
  from torch_points3d.datasets.registration.utils import files_exist
  from torch_points3d.datasets.registration.utils import makedirs
  from torch_points3d.datasets.registration.utils import get_urls
  from torch_points3d.datasets.registration.utils import PatchExtractor
label_desc: Use image node_id 1 to create a new Base3DMatch object from inherited base classes: Dataset with example: obj = Base3DMatch(root, num_frame_per_fragment, mode, min_overlap_ratio, max_overlap_ratio, max_dist_overlap, tsdf_voxel_size, limit_size, depth_thresh, is_fine, transform, pre_transform, pre_filter, verbose, debug, num_random_pt, is_offline, radius_patch, pre_transform_patch)