Skip to content

Commit

Permalink
replaced deprecated boxType and frameType props from example MMIFs
Browse files Browse the repository at this point in the history
  • Loading branch information
keighrim committed Feb 29, 2024
1 parent 1fdb4d5 commit a21e221
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 36 deletions.
8 changes: 4 additions & 4 deletions specifications/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,12 @@ The value of the `annotations` property on a view is a list of annotation object
"id": "f1",
"start": 0,
"end": 5,
"frameType": "bars-and-tones"
"label": "bars-and-tones"
}
}
```

The two required keys are `@type` and `properties`. As mentioned before, the `@type` key in JSON-LD is used to define the type of data structure. The `properties` dictionary typically contains the features defined for the annotation category as defined in the vocabularies at [CLAMS vocabulary ](vocabulary) or [LAPPS vocabulary](http://vocab.lappsgrid.org/). For example, for the *TimeFrame* annotation type the vocabulary includes the feature `frameType` as well as the inherited features `id`, `start` and `end`. Values should be as specified in the vocabulary, values typically are strings, identifiers and integers, or lists of strings, identifiers and integers.
The two required keys are `@type` and `properties`. As mentioned before, the `@type` key in JSON-LD is used to define the type of data structure. The `properties` dictionary typically contains the features defined for the annotation category as defined in the vocabularies at [CLAMS vocabulary ](vocabulary) or [LAPPS vocabulary](http://vocab.lappsgrid.org/). For example, for the *TimeFrame* annotation type the vocabulary includes the feature `label` as well as the inherited features `id`, `start` and `end`. Values should be as specified in the vocabulary, values typically are strings, identifiers and integers, or lists of strings, identifiers and integers, but can be more complex.

The `id` key should have a value that is unique relative to all annotation elements in the view. Other annotations can refer to this identifier either with just the identifier (for example “s1”), or the identifier with a view identifier prefix (for example “v1:s1”). If there is no prefix, the current view is assumed.

Expand Down Expand Up @@ -282,7 +282,7 @@ Let's use an example of an image of a barking dog where a region of the image ha

<img alt="yelp" src="pi78oGjdT-annotated.jpg" style="border: 1px;" height="200"/>

The result of this processing is a MMIF document with an image document and a view that contains a *BoundingBox* annotation where the bounding box has the `boxType` property set to "text":
The result of this processing is a MMIF document with an image document and a view that contains a *BoundingBox* annotation where the bounding box has the `label` property set to "text":

```json
{
Expand Down Expand Up @@ -310,7 +310,7 @@ The result of this processing is a MMIF document with an image document and a vi
"properties": {
"id": "bb1",
"coordinates": [[10,20], [40,20], [10,30], [40,30]],
"boxType": "text" }
"label": "text" }
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions specifications/samples/east-tesseract-typing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ And here is the annotations list:
"properties": {
"id": "bb1",
"coordinates": [[10,20], [40,20], [10,30], [40,30]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb2",
"coordinates": [[210,220], [240,220], [210,230], [240,230]],
"boxType": "text" }
"label": "text" }
}
]
```
Expand Down
4 changes: 2 additions & 2 deletions specifications/samples/east-tesseract-typing/raw.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
"properties": {
"id": "bb1",
"coordinates": [ [10, 20], [40, 20], [10, 30], [40, 30] ],
"boxType": "text"
"label": "text"
}
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb2",
"coordinates": [ [210, 220], [240, 220], [210, 230], [240, 230] ],
"boxType": "text"
"label": "text"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion specifications/samples/everything/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Let's assume that EAST runs on frames sampled from the video at 1 second interva
"id": "bb9",
"timePoint": 4000,
"coordinates": [[180, 110], [460, 110], [180, 170], [460, 170]],
"boxType": "text" }
"label": "text" }
}
```

Expand Down
50 changes: 25 additions & 25 deletions specifications/samples/everything/raw.json
Original file line number Diff line number Diff line change
Expand Up @@ -756,199 +756,199 @@
"id": "bb1",
"timePoint": 3000,
"coordinates": [[180, 110], [460, 110], [180, 170], [460, 170]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb2",
"timePoint": 3000,
"coordinates": [[660, 110], [1250, 110], [660, 170], [1250, 170]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb3",
"timePoint": 3000,
"coordinates": [[180, 320], [460, 320], [180, 380], [460, 380]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb4",
"timePoint": 3000,
"coordinates": [[660, 320], [1210, 320], [660, 380], [1210, 380]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb5",
"timePoint": 3000,
"coordinates": [[180, 520], [460, 520], [180, 580], [460, 580]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb6",
"timePoint": 3000,
"coordinates": [[660, 520], [1200, 520], [660, 580], [1200, 580]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb7",
"timePoint": 3000,
"coordinates": [[180, 750], [470, 750], [180, 810], [470, 810]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb8",
"timePoint": 3000,
"coordinates": [[660, 750], [1180, 750], [660, 810], [1180, 810]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb9",
"timePoint": 4000,
"coordinates": [[180, 110], [460, 110], [180, 170], [460, 170]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb10",
"timePoint": 4000,
"coordinates": [[660, 110], [1250, 110], [660, 170], [1250, 170]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb11",
"timePoint": 4000,
"coordinates": [[180, 320], [460, 320], [180, 380], [460, 380]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb12",
"timePoint": 4000,
"coordinates": [[660, 320], [1210, 320], [660, 380], [1210, 380]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb13",
"timePoint": 4000,
"coordinates": [[180, 520], [460, 520], [180, 580], [460, 580]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb14",
"timePoint": 4000,
"coordinates": [[660, 520], [1200, 520], [660, 580], [1200, 580]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb15",
"timePoint": 4000,
"coordinates": [[180, 750], [470, 750], [180, 810], [470, 810]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb16",
"timePoint": 4000,
"coordinates": [[660, 750], [1180, 750], [660, 810], [1180, 810]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb17",
"timePoint": 5000,
"coordinates": [[180, 110], [460, 110], [180, 170], [460, 170]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb18",
"timePoint": 5000,
"coordinates": [[660, 110], [1250, 110], [660, 170], [1250, 170]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb19",
"timePoint": 5000,
"coordinates": [[180, 320], [460, 320], [180, 380], [460, 380]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb20",
"timePoint": 5000,
"coordinates": [[660, 320], [1210, 320], [660, 380], [1210, 380]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb21",
"timePoint": 5000,
"coordinates": [[180, 520], [460, 520], [180, 580], [460, 580]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb22",
"timePoint": 5000,
"coordinates": [[660, 520], [1200, 520], [660, 580], [1200, 580]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb23",
"timePoint": 5000,
"coordinates": [[180, 750], [470, 750], [180, 810], [470, 810]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb24",
"timePoint": 5000,
"coordinates": [[660, 750], [1180, 750], [660, 810], [1180, 810]],
"boxType": "text" }
"label": "text" }
},
{
"@type": "http://mmif.clams.ai/vocabulary/BoundingBox/$BoundingBox_VER",
"properties": {
"id": "bb25",
"timePoint": 21000,
"coordinates": [[150, 810], [1120, 810], [150, 870], [1120, 870]],
"boxType": "text" }
"label": "text" }
}
]
},
Expand Down
4 changes: 2 additions & 2 deletions specifications/samples/everything/scripts/east.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
[('id', box_id),
('timePoint', time_offset),
('coordinates', coordinates),
('boxType', 'text')])
('label', 'text')])

count += 1
box_id = 'bb%s' % count
Expand All @@ -50,4 +50,4 @@
[('id', box_id),
('timePoint', 21000),
('coordinates', fido_box_coordinates),
('boxType', 'text')])
('label', 'text')])

0 comments on commit a21e221

Please sign in to comment.