A Relationship is an Object-type annotation that allows you to connect two separate annotations.

Import

🚧

Not supported yet

Export

When you export your annotation Relationships from Labelbox, the export file will contain the following information for each Relationship.

Python SDK

Learn more about exporting annotations using the SDK here

JSON

You will receive a JSON file when you generate an export from the app.

ParameterAsset typeDescription
featureIdText, ImageID of the annotation relationship in the ontology.
schemaIdText, ImageSchema ID of the annotation relationship in the ontology.
titleTextText that appears as the relationship name.
valueTextName of the relationship in the Labelbox database.
data.labelTextDefinition of the relationship. If there is no definition, this field will be blank.
data.endFeatureIdTextDefinition of the relationship. If there is no definition, this field will be blank.
data.startFeatureIdTextID that indicates where the relationship starts.
formatTextValue should be unidirectional. Indicates that the arrow on the relationship is pointing in one direction.
versionText, ImageValue is 1, which means this export is using the latest Labelbox export format.
instanceURITextURL where you can access the annotation relationship stored in the Labelbox database.
data.sourceImageFeature ID of the annotation where the relationship starts.
data.targetImageFeature ID of the annotation where the relationship ends.
data.labelTextOptional field that will only be returned for text relationships with a label.
relationshipTypeImageIndicates whether the relationship is unidirectional or bidirectional.

Format

"relationships": [
     {
        "featureId":"cl12o1opb000g3g6acccvuqui",
        "schemaId":"cl12nq1ik004g0z4lf84q58rm",
        "data":
            {
                "source":"cl12nurbd00013g6an63jifsv",
                "target":"cl12nv4ab00073g6as6jkwcj3",
                "label": "verb"
                },
        "relationshipType":"unidirectional",
        "version": 1
    }
]
"relationships": [
     {
        "featureId":"cl12o1opb000g3g6acccvuqui",
        "schemaId":"cl12nq1ik004g0z4lf84q58rm",
        "data":
            {
            "source":"cl12nurbd00013g6an63jifsv",
            "target":"cl12nv4ab00073g6as6jkwcj3"
        },
        "relationshipType":"unidirectional",
        "version": 1
    }
]
"relationships":[
   {
      "featureId":"cl2zjivad00203g6ck8nk7jrt",
      "schemaId":"ckrdp1ln400003h6jq23cbjfl",
      "data":
         {
            "source":"cl2zji82m00043g6cunt8telp",
            "target":"cl2zjihh600053g6cztv2bblb",
            "label":"Person"
         },
      "relationshipType":"unidirectional",
      "version":1
   }
]
"relationships":[
   {
      "featureId":"cl3uaz2kn000p3f6crzl3qqww",
      "schemaId":"cl3n8b4oz51sc087jdrgl17q2",
      "data":
             {
            "source":"cl3uay4qj000i3f6c9jtvu2ab",
            "target":"cl3uaxxo2000f3f6cbselj2z3"
         },
      "relationshipType":"unidirectional",
      "version":1
   }
]