def FeatureMap(self): return { 'image/source_id': tf.FixedLenFeature((), tf.string, ''), 'object/image/bbox/xmin': tf.VarLenFeature(tf.float32), 'object/image/bbox/xmax': tf.VarLenFeature(tf.float32), 'object/image/bbox/ymin': tf.VarLenFeature(tf.float32), 'object/image/bbox/ymax': tf.VarLenFeature(tf.float32), 'object/label': tf.VarLenFeature(tf.string), 'object/has_3d_info': tf.VarLenFeature(dtype=tf.int64), 'object/occlusion': tf.VarLenFeature(dtype=tf.int64), 'object/truncation': tf.VarLenFeature(dtype=tf.float32), 'object/velo/bbox/xyz': tf.VarLenFeature(dtype=tf.float32), 'object/velo/bbox/dim_xyz': tf.VarLenFeature(dtype=tf.float32), 'object/velo/bbox/phi': tf.VarLenFeature(dtype=tf.float32), 'transform/velo_to_image_plane': tf.FixedLenFeature(shape=(3, 4), dtype=tf.float32), }
def FeatureMap(self): """Return a dictionary from tf.Example feature names to Features.""" p = self.params features = {} features['pose'] = tf.VarLenFeature(dtype=tf.float32) for camera_name in p.camera_names: features['image_%s' % camera_name] = tf.VarLenFeature(dtype=tf.string) features['image_%s_shape' % camera_name] = ( tf.VarLenFeature(dtype=tf.int64)) features['camera_%s_intrinsics' % camera_name] = tf.VarLenFeature(dtype=tf.float32) features['camera_%s_extrinsics' % camera_name] = tf.VarLenFeature(dtype=tf.float32) features['camera_%s_rolling_shutter_direction' % camera_name] = tf.FixedLenFeature( dtype=tf.int64, shape=()) features['image_%s_pose' % camera_name] = tf.VarLenFeature(dtype=tf.float32) features['image_%s_velocity' % camera_name] = tf.VarLenFeature(dtype=tf.float32) for feat in [ 'pose_timestamp', 'shutter', 'camera_trigger_time', 'camera_readout_done_time' ]: features['image_%s_%s' % (camera_name, feat)] = tf.FixedLenFeature( dtype=tf.float32, shape=()) return features
def FeatureMap(self): """Return a dictionary from tf.Example feature names to Features.""" feature_map = {} feature_map['pose'] = tf.VarLenFeature(dtype=tf.float32) feature_map['run_segment'] = tf.FixedLenFeature((), tf.string, '') feature_map['run_start_offset'] = tf.FixedLenFeature((), tf.int64, 0) feature_map['time_of_day'] = tf.FixedLenFeature((), tf.string, '') feature_map['location'] = tf.FixedLenFeature((), tf.string, '') feature_map['weather'] = tf.FixedLenFeature((), tf.string, '') return feature_map
def FeatureMap(self): p = self.params feature_map = { 'image/format': tf.FixedLenFeature((), tf.string, default_value='png'), 'image/height': tf.FixedLenFeature((), tf.int64, default_value=1), 'image/width': tf.FixedLenFeature((), tf.int64, default_value=1), 'image/source_id': tf.FixedLenFeature((), tf.string, default_value=''), # The camera calibration matrices can be used later with width/height # to perform out of camera frustum point dropping. 'transform/velo_to_image_plane': tf.FixedLenFeature(shape=(3, 4), dtype=tf.float32), 'transform/velo_to_camera': tf.FixedLenFeature(shape=(4, 4), dtype=tf.float32), 'transform/camera_to_velo': tf.FixedLenFeature(shape=(4, 4), dtype=tf.float32), } if p.decode_image: feature_map['image/encoded'] = tf.FixedLenFeature((), tf.string, default_value='') return feature_map
def GetFeatureSpec(self): return {'audio': tf.FixedLenFeature([48000], tf.float32)}