Esempio n. 1
0
 def _info(self):
   return tfds.core.DatasetInfo(
       builder=self,
       description=_DESCRIPTION,
       features=tfds_features.FeaturesDict({
           'trimesh': tfg_features.TriangleMesh(),
           'label': tfds_features.ClassLabel(num_classes=353),
           'model_id': tfds_features.Text(),
       }),
       supervised_keys=('trimesh', 'label'),
       # Homepage of the dataset for documentation
       homepage='https://shapenet.org/',
       citation=_CITATION,
   )
Esempio n. 2
0
 def _info(self):
     return tfds.core.DatasetInfo(
         builder=self,
         # This is the description that will appear on the datasets page.
         description=_DESCRIPTION,
         # tfds.features.FeatureConnectors
         features=tfds.features.FeaturesDict({
             'image':
             tfds_features.Image(shape=(None, None, 3), dtype=tf.uint8),
             'image/filename':
             tfds_features.Text(),
             'image/source':
             tfds_features.Text(),
             '2d_keypoints':
             tfds_features.FeaturesDict({
                 'num_annotators':
                 tf.uint8,
                 'num_keypoints':
                 tf.uint8,
                 'keypoints':
                 tfds_features.Tensor(shape=(None, ), dtype=tf.float32),
             }),
             'mask':
             tfds_features.Image(shape=(None, None, 1), dtype=tf.uint8),
             'model':
             tfg_features.TriangleMesh(),
             'model/source':
             tfds_features.Text(),
             '3d_keypoints':
             tfds_features.Tensor(shape=(None, 3), dtype=tf.float32),
             'voxel':
             tfg_features.VoxelGrid(shape=(128, 128, 128)),
             'pose':
             tfg_features.Pose(),  # pose of object w.r.t to world.
             'camera':
             tfds_features.FeaturesDict({
                 'parameters':
                 tfg_features.Camera(),
                 'position_with_respect_to_object':
                 tfds_features.Tensor(shape=(3, ), dtype=tf.float32),
                 'inplane_rotation':
                 tf.float32,
             }),
             'category':
             tfds_features.ClassLabel(num_classes=len(self.CLASS_INDEX)),
             'bbox':
             tfds_features.BBoxFeature(),
             'truncated':
             tf.bool,
             'occluded':
             tf.bool,
             'slightly_occluded':
             tf.bool,
         }),
         # If there's a common (input, target) tuple from the features,
         # specify them here. They'll be used if as_supervised=True in
         # builder.as_dataset.
         supervised_keys=None,
         # Homepage of the dataset for documentation
         homepage='http://pix3d.csail.mit.edu/',
         citation=_CITATION,
     )