Skip to content

Scan OBB Aligner

Angel Chang edited this page Sep 23, 2024 · 1 revision

The Scan OBB Aligner take a mesh that has been annotated with object information, and allows the user to select and refine the orientation of the bounding boxes by specifying the semantic up and front of the object.

See https://3dlg-hcvc.github.io/multiscan/read-the-docs/annotation/obb.html for more details on the Scan OBB Aligner.

Entry points

There are two main entry point for the Scan OBB Aligner

url code
/multiscan/scan-obb-aligner multiscan/views/scan-obb-aligner.pug
/scans/scan-obb-aligner scannet/views/scan-obb-aligner.pug

URL parameters to the entry points include:

field description example value
modelId Full id of asset to annotate [assetName].[assetId]
format Mesh format to load textured-v1.1
partType Initial part type to use articulation-parts
obbAlignPartType Part type for orienting bounding boxes articulation-parts
obbAlignTask Name of task multiscan-annotate-obb

Other URL parameters (should not be changed)

field description value
allowAllSupportedParts Load custom part segmentation true
includeDefaultLabelRemaps Load remapping of labels (to existing label sets) false

Storing and retrieving annotations

OBB annotations are stored in the main annotations table with type=obb-align.

Annotated records can be retrieved using /annotations/list/latest/ids?type=obb-align

Use /annotations/latest?itemId=[fullAssetId]&type=obb-align to fetch annotation for the given asset.

Use /annotations/get/[annotationId] to fetch annotation for a specific annotation id (useful for looking at earlier annotation records).

Example of OBB annotation

{
    "id":  ...,                                              # Unique id for this annotation 
    "appId": "MultiscanObbAligner.v1-YYYYMMDD",              # App name, version, and date  
    "itemId": "multiscan.xxxx",                              # Full asset id
    "task": "multiscan-annotate-obb",                        # task name
    "taskMode": "manual",                                    # task mode 
    "type": "obb-align",                                     # annotation type
    "workerId": "...",                                       # worker name
    "condition": "test",
    "data": {
        "metadata": {.                                       # metadata about this annotation
            "partType": "articulation-parts",
            "includeLabelInfo": true,
            "partsAnnId": ...                                # Numeric annotation of parts 
        },
        "annotations": {
            "Label": [                                       # array of part annotations (element 0 is typically reserved for unknown) 
                 ..., 
                {
                    "partId": 2,
                    "objectId": 2,
                    "label": "bag.1",
                    "obb": {
                        "centroid": [...]                    # vector3 indicating obb centroid
                        "axesLengths": [...]                 # vector3 indicating size of obb
                        "normalizedAxes": [...]              # 3x3 matrix (as column order vector) indicating basis of obb
                        "min": [...]                         # vector3 indicating minimum of obb 
                        "max": [...]                         # vector3 indicating maximum of obb
                    },
                    "dominantNormal": [...]                  # vector3 indicating direction of dominant normal
                },
                ...  
            ],
            "Object": [                                      # array of object annotations (element 0 is typically reserved for unknown) 
                ...
                {
                    "index": 2,
                    "objectId": "2",
                    "label": "bag.1",
                    "parts": [ 2 ],                          # indices of parts
                    "obb": {                                 # semantically oriented OBB
                        "centroid": [...]                    # vector3 indicating obb centroid
                        "axesLengths": [...]                 # vector3 indicating size of obb
                        "normalizedAxes": [...]              # 3x3 matrix (as column order vector) indicating basis of obb
                        "min": [...]                         # vector3 indicating minimum of obb 
                        "max": [...]                         # vector3 indicating maximum of obb
                        "metadata": {             
                            "constrainVertical": true,
                            "isAABB": false  
                        },
                        "front": [...],                      # semantic front
                        "up": [...]                          # semantic up
                    },
                    "labelIndex": 2
                }
               ...
            ]
        }
    }
}
Clone this wiki locally