-
Notifications
You must be signed in to change notification settings - Fork 41
Asset metadata format
Assets need to be registered.
To register an asset group, you need to prepare a metadata json file with information about the asset group.
Next, you need to specify the list of asset ids. This can be specified as a csv file or as a solr index url.
Each asset will have a set of various data associated with it (different views of the given asset). For instance, a model can have associated with it the following types of data:
mesh: 3D surface mesh representing the geometry and material of the model
segment: A segmentation of the 3D mesh geometry into parts or regions
voxel: Voxelization of the 3D mesh geometry into little voxels
image: screenshots/renderings of the model
video: recorded videos of the model
To accommodate the different types of data, the metadata format support specifying the data associated with each type in one of the following ways:
- A flat array with the
dataType
specified for each element
"data": [{
"name": "ply",
"format": "ply",
"dataType": "mesh",
"path": ...
},
{
"name": "surfaces",
"dataType": "segment",
"path": ...
}]
- A object keyed by the type
This allows for data of the same type to be grouped together and for
defaultOptions
to be specified for each type. If there are nodefaultOptions
for the type, thedata
field can be directly specified as an array.
"dataTypes": {
// Specifying default mesh options (used when loading the mesh)
"mesh": {
"defaultOptions": {
...
},
"data": [{
"name": "ply",
"format": "ply",
"path": ...
}]
},
// Specifying "data" array directly
"segment": [{
"name": "surfaces",
"path": ...
}]
}
The older asset metadata format (used for the ScanNet annotation tools) assumed that the primary assets data was a mesh, and used names of the field to identify the type of the data. This limited the different versions for a particular data type (for instance, the set of voxels that were associated with an asset).
Example metadata v0.1 json file
{
"source": "xxx",
"assetType": "model",
"rootPath": "${baseUrl}/data/xxx/",
"defaultImageCount": 14,
"screenShotPath": "${rootPath}/object_screenshots/${id}/${id}-${index}.png",
"hasThumbnails": true,
"originalScreenShotPath": "${rootPath}/objects/${baseVariantId}/${id}.png",
"texturePath": "${rootPath}/texture/",
"prefetchModelInfo": { "source": "xxx", "query": "*:*", "limit": 4000 },
"voxels-solid": "${rootPath}/object_vox/object_vox_data/${baseVariantId}/${id}.binvox",
"assetFields": ["parts"],
"surfaces": {
"file": "${rootPath}/object_segmentations/${id}/${id}-segments.json",
"format": "indexedSegmentation"
},
"parts": {
"file": "${rootPath}/object_part_annotations/${id}/${id}.json",
"format": "indexedSegmentation"
},
"part-annotations": {
"name": "parts",
"format": "indexedSegmentation",
"files": {
"annIds": "${baseUrl}/part-annotations/list?itemId=${fullId}&$columns=id,workerId,data&format=json",
"annotation": "${baseUrl}/query?qt=parts&annId=${annId}&modelId=${fullId}",
"segmentation": "${rootPath}/object_segmentations/${id}/${id}-segments.json"
}
},
"formats": [
{
"name": "kmz",
"format": "kmz",
"path": "${rootPath}/objects/${baseVariantId}/${id}.kmz",
"defaultUp": [ 0, 1, 0 ], "defaultFront": [ 0, 0, 1], "defaultUnit": 1,
"voxelsAligned": true,
"voxelsToModelTransform": [1, 0, 0, 0, 0, 1, 0, 1, 0]
},
]
}
- Home
- Main
- Annotators
- Assets
- Batch processing
- Development
- File formats
- Rendering
- Scene Tools
- Voxels