Skip to content

Commit d744b94

Browse files
authored
Merge pull request #6 from biigle/patch-1
Include provenance and annotation files locally
2 parents 328b829 + 6a3c339 commit d744b94

5 files changed

+240
-12
lines changed

assets/annotation-v2.0.0.json

+122
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://marine-imaging.com/fair/schemas/annotation-v2.0.0.json",
4+
"title": "Annotations of images",
5+
"description": "A schema to establish a format for annotations within images (photos and videos) of different shape and by different annotators",
6+
"type": "object",
7+
"properties": {
8+
"image-annotation-labels": {
9+
"description": "All the labels used in the image-annotations. Specified by an id (e.g. AphiaID), a human-readable name and an optional description.",
10+
"type": "array",
11+
"items": {
12+
"$ref": "#/$defs/label"
13+
}
14+
},
15+
"image-annotation-creators": {
16+
"description": "All the annotators that created image-annotations. Specified by an id (e.g. ORCID), a human-readable name and an optional type specifying the annotator's expertise.",
17+
"type": "array",
18+
"items": {
19+
"$ref": "#/$defs/annotator"
20+
}
21+
},
22+
"image-annotations": {
23+
"description": "This field stores all annotations as a list of dictionaries of 3-4 fields: shape, coordinates, labels and (optional) frames. See further explanations below. The list of labels specifies the IDs or names of objects and annotators and their confidence. These should be specified in an `image-annotation-labels` and `image-annotation-creators` field (see above) to provide more information on the values used in these fields.",
24+
"type": "array",
25+
"items": {
26+
"type": "object",
27+
"properties": {
28+
"shape": {
29+
"description": "The annotation shape is specified by a keyword (allowed values: see enum).",
30+
"type": "string",
31+
"enum": [
32+
"single-pixel",
33+
"polyline",
34+
"polygon",
35+
"circle",
36+
"rectangle",
37+
"ellipse",
38+
"whole-image"
39+
]
40+
},
41+
"coordinates": {
42+
"description": "The pixel coordinates of one annotation. The top-left corner of an image is the (0,0) coordinate. The x-axis is the horizontal axis. Pixel coordinates may be fractional. Coordinates are to be given as a list of lists (only one element for photos, optionally multiple elements for videos). The required number of pixel coordinates is defined by the shape (0 for whole-image, 2 for single-pixel, 3 for circle, 8 for ellipse/rectangle, 4 or more for polyline, 8 or more for polygon). The third coordinate value of a circle defines the radius. The first and last coordinates of a polygon must be equal. Format: [[p1.x,p1.y,p2x,p2.y,...]..]",
43+
"type": "array",
44+
"items": {
45+
"type": "array",
46+
"items": {
47+
"type": "number"
48+
}
49+
}
50+
},
51+
"labels": {
52+
"description": "The list of labels assigned to annotations by annotators",
53+
"type": "array",
54+
"items": {
55+
"$ref": "#/$defs/annotation-label"
56+
}
57+
},
58+
"frames": {
59+
"description": "(only required for video annotations) Frame times (in seconds from the beginning of a video) of a video annotation. Each frame time is linked to one entry in `image-annotations:coordinates` at the same position in the list, which specifies the current coordinates of the annotation at that frame.\nFormat: [f1,...]"
60+
}
61+
}
62+
}
63+
}
64+
},
65+
"$defs": {
66+
"annotation-label": {
67+
"type": "object",
68+
"required": ["label","annotator","created-at"],
69+
"properties": {
70+
"label": {
71+
"description": "A unique identifier to a semantic label",
72+
"type": "string"
73+
},
74+
"annotator": {
75+
"description": "A unique identifier to an annotation creator, e.g. orcid URL or handle to ML model",
76+
"type": "string"
77+
},
78+
"created-at": {
79+
"description": "The date-time stamp of label creation",
80+
"type": "string",
81+
"format": "date-time"
82+
},
83+
"confidence": {
84+
"description": "A numerical confidence estimate of the validity of the label between 0 (untrustworthy) and 1 (100% certainty)",
85+
"type": "number"
86+
}
87+
}
88+
},
89+
"label": {
90+
"type": "object",
91+
"required": ["id","name"],
92+
"properties": {
93+
"id": {
94+
"description": "A unique identifier to a semantic label",
95+
"type": "string"
96+
},
97+
"name": {
98+
"description": "A human-readable name for the semantic label",
99+
"type": "string"
100+
},
101+
"info": {
102+
"description": "A description on what this semantic label represents",
103+
"type": "string"
104+
}
105+
}
106+
},
107+
"annotator": {
108+
"type": "object",
109+
"required": ["id","name"],
110+
"properties": {
111+
"id": {
112+
"description": "A unique identifier to an annotation creator, e.g. orcid URL or handle to ML model",
113+
"type": "string"
114+
},
115+
"name": {
116+
"description": "A human-readable name for the annotator (identifying the specific human or machine)",
117+
"type": "string"
118+
}
119+
}
120+
}
121+
}
122+
}

assets/ifdo-v2.0.0.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -285,13 +285,13 @@
285285
}
286286
},
287287
"image-annotation-labels": {
288-
"$ref": "https://marine-imaging.com/fair/schemas/annotation-v2.0.0.json#/properties/image-annotation-labels"
288+
"$ref": "annotation-v2.0.0.json#/properties/image-annotation-labels"
289289
},
290290
"image-annotation-creators": {
291-
"$ref": "https://marine-imaging.com/fair/schemas/annotation-v2.0.0.json#/properties/image-annotation-creators"
291+
"$ref": "annotation-v2.0.0.json#/properties/image-annotation-creators"
292292
},
293293
"image-annotations": {
294-
"$ref": "https://marine-imaging.com/fair/schemas/annotation-v2.0.0.json#/properties/image-annotations"
294+
"$ref": "annotation-v2.0.0.json#/properties/image-annotations"
295295
},
296296
"image-acquisition": {
297297
"description": "photo: still images, video: moving images, slide: microscopy images / slide scans",
@@ -717,7 +717,7 @@
717717
}
718718
},
719719
"image-set-provenance": {
720-
"$ref": "https://marine-imaging.com/fair/schemas/provenance-v0.1.0.json"
720+
"$ref": "provenance-v0.1.0.json"
721721
}
722722
}
723723
},

assets/ifdo-v2.0.1.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -287,13 +287,13 @@
287287
}
288288
},
289289
"image-annotation-labels": {
290-
"$ref": "https://marine-imaging.com/fair/schemas/annotation-v2.0.0.json#/properties/image-annotation-labels"
290+
"$ref": "annotation-v2.0.0.json#/properties/image-annotation-labels"
291291
},
292292
"image-annotation-creators": {
293-
"$ref": "https://marine-imaging.com/fair/schemas/annotation-v2.0.0.json#/properties/image-annotation-creators"
293+
"$ref": "annotation-v2.0.0.json#/properties/image-annotation-creators"
294294
},
295295
"image-annotations": {
296-
"$ref": "https://marine-imaging.com/fair/schemas/annotation-v2.0.0.json#/properties/image-annotations"
296+
"$ref": "annotation-v2.0.0.json#/properties/image-annotations"
297297
},
298298
"image-acquisition": {
299299
"description": "photo: still images, video: moving images, slide: microscopy images / slide scans",
@@ -719,7 +719,7 @@
719719
}
720720
},
721721
"image-set-provenance": {
722-
"$ref": "https://marine-imaging.com/fair/schemas/provenance-v0.1.0.json"
722+
"$ref": "provenance-v0.1.0.json"
723723
}
724724
}
725725
},

assets/ifdo-v2.1.0.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -287,13 +287,13 @@
287287
}
288288
},
289289
"image-annotation-labels": {
290-
"$ref": "https://marine-imaging.com/fair/schemas/annotation-v2.0.0.json#/properties/image-annotation-labels"
290+
"$ref": "annotation-v2.0.0.json#/properties/image-annotation-labels"
291291
},
292292
"image-annotation-creators": {
293-
"$ref": "https://marine-imaging.com/fair/schemas/annotation-v2.0.0.json#/properties/image-annotation-creators"
293+
"$ref": "annotation-v2.0.0.json#/properties/image-annotation-creators"
294294
},
295295
"image-annotations": {
296-
"$ref": "https://marine-imaging.com/fair/schemas/annotation-v2.0.0.json#/properties/image-annotations"
296+
"$ref": "annotation-v2.0.0.json#/properties/image-annotations"
297297
},
298298
"image-acquisition": {
299299
"description": "photo: still images, video: moving images, slide: microscopy images / slide scans",
@@ -719,7 +719,7 @@
719719
}
720720
},
721721
"image-set-provenance": {
722-
"$ref": "https://marine-imaging.com/fair/schemas/provenance-v0.1.0.json"
722+
"$ref": "provenance-v0.1.0.json"
723723
}
724724
}
725725
},

assets/provenance-v0.1.0.json

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://marine-imaging.com/fair/schemas/provenance-v0.1.0.json",
4+
"title": "Documenting a processing workflow",
5+
"description": "A schema to document the agents, activities and entities that led to an image set entity",
6+
"type": "object",
7+
"properties": {
8+
"provenance-agents": {
9+
"type": "array",
10+
"description": "A list of all the agents in this provenance documentation",
11+
"items": {
12+
"$ref": "#/$defs/agent"
13+
}
14+
},
15+
"provenance-entities": {
16+
"type": "array",
17+
"description": "A list of all the entities in this provenance documentation",
18+
"items": {
19+
"$ref": "#/$defs/entity"
20+
}
21+
},
22+
"provenance-activities": {
23+
"type": "array",
24+
"description": "A list of all the activities in this provenance documentation",
25+
"items": {
26+
"$ref": "#/$defs/activity"
27+
}
28+
}
29+
},
30+
"$defs": {
31+
"agent": {
32+
"type": "object",
33+
"description": "Someone or something that operates, takes responsibility, conducts, etc.",
34+
"properties": {
35+
"name": {
36+
"type": "string",
37+
"description": "A human-readable identifier of the agent"
38+
},
39+
"id": {
40+
"type": "string",
41+
"description": "A unique identifier for the agent. Could be a uri."
42+
}
43+
}
44+
},
45+
"entity": {
46+
"type": "object",
47+
"description": "A static instance of a virtual thing",
48+
"properties": {
49+
"name": {
50+
"type": "string",
51+
"description": "A human-readable identifier of the entity"
52+
},
53+
"id": {
54+
"type": "string",
55+
"description": "A unique identifier for the entity. Could be a uri."
56+
},
57+
"created-at": {
58+
"type": "string",
59+
"format": "date-time",
60+
"description": "The time at which this entity was created in its entirety"
61+
},
62+
"attributed-to": {
63+
"type": "array",
64+
"description": "A list of agents that relate to this entity",
65+
"items": {
66+
"$ref": "#/$defs/agent"
67+
}
68+
},
69+
"generated-by": {
70+
"type": "array",
71+
"description": "A list of activities that created this entity"
72+
}
73+
}
74+
},
75+
"activity": {
76+
"type": "object",
77+
"description": "A process that works with entities and is operated by agents",
78+
"properties": {
79+
"start-time": {
80+
"type": "string",
81+
"format": "date-time",
82+
"description": "The time at which the activity began"
83+
},
84+
"end-time": {
85+
"type": "string",
86+
"format": "date-time",
87+
"description": "The time at which the activity ended"
88+
},
89+
"associated-agents": {
90+
"type": "array",
91+
"description": "The agents that are associated to this activity",
92+
"items": {
93+
"$ref": "#/$defs/agent"
94+
}
95+
},
96+
"used-entities": {
97+
"type": "array",
98+
"description": "The entities that are associated to this activity",
99+
"items": {
100+
"$ref": "#/$defs/entity"
101+
}
102+
}
103+
}
104+
}
105+
}
106+
}

0 commit comments

Comments
 (0)