Esempio n. 1
0
 def __init__(self):
     super(Pose, self).__init__({
         'R':
         features.Tensor(shape=(3, 3), dtype=tf.float32),
         't':
         features.Tensor(shape=(3, ), dtype=tf.float32),
     })
Esempio n. 2
0
 def __init__(self):
     super(TriangleMesh, self).__init__({
         'vertices':
         features.Tensor(shape=(None, 3), dtype=tf.float32),
         'faces':
         features.Tensor(shape=(None, 3), dtype=tf.uint64),
     })
Esempio n. 3
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,
     )
Esempio n. 4
0
 def __init__(self):
   super(Camera, self).__init__({
       'pose': pose_feature.Pose(),
       'intrinsics': features.Tensor(shape=(3, 3), dtype=tf.float32),
   })