Skip to content

Commit f4e7bd0

Browse files
author
Friedrich Knuth
committed
Add json db example
1 parent 5eced54 commit f4e7bd0

4 files changed

+101
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"FileInfo": {
3+
"FileURL": "/RS03ASHS/PN03B/06-CAMHDA301/2016/01/01/CAMHDA301-20160101T000000Z.mov",
4+
"Duration": 839.338562011719,
5+
"NumFrames": 25155,
6+
"FileSize": 13000,
7+
"FrameMetaFile": "/CAMHDA301-20160101T000000Z_frame_meta.json"
8+
},
9+
"Frames": [
10+
{
11+
"FrameNumer": 0,
12+
"AnnotationCount": 2,
13+
"Annotations": [
14+
{
15+
"ID": 0.0,
16+
"Text": "That tube worm looks suspicious."
17+
},
18+
{
19+
"ID": 0.1,
20+
"Text": "Riftia pachyptila"
21+
}
22+
]
23+
24+
},
25+
{
26+
"FrameNumer": 1,
27+
"AnnotationCount": 1,
28+
"Annotations": [
29+
{
30+
"ID": 1.0,
31+
"Text": "Oasisia alvinae"
32+
}
33+
]
34+
}
35+
]
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"FileInfo": {
3+
"FileURL": "/RS03ASHS/PN03B/06-CAMHDA301/2016/01/01/CAMHDA301-20160101T000000Z.mov",
4+
"Duration": 839.338562011719,
5+
"NumFrames": 25155,
6+
"FileSize": 13000,
7+
"AnnotationsFile": "/CAMHDA301-20160101T000000Z_annotations.json"
8+
},
9+
"Frames": [
10+
{
11+
"FrameNumer": 0,
12+
"TimeInToVideo": 0.01,
13+
"Hash": "000e0e1e7e7efe4f",
14+
"IntHash": 965
15+
16+
},
17+
{
18+
"FrameNumer": 1,
19+
"TimeInToVideo": 0.02,
20+
"Hash": "010f0f0f2ff7ffdb",
21+
"IntHash": 1805
22+
}
23+
]
24+
}
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"Files": [
3+
{
4+
"FileURL": "/RS03ASHS/PN03B/06-CAMHDA301/2016/01/01/CAMHDA301-20160101T000000Z.mov",
5+
"Duration": 839.338562011719,
6+
"NumFrames": 25155,
7+
"FileSize": 13000,
8+
"FrameMetaFile": "/CAMHDA301-20160101T000000Z_frame_meta.json",
9+
"AnnotationsFile": "/CAMHDA301-20160101T000000Z_annotations.json"
10+
},
11+
{
12+
"FileURL": "/RS03ASHS/PN03B/06-CAMHDA301/2016/01/01/CAMHDA301-20160101T000000Z.mov",
13+
"Duration": 839.338562011719,
14+
"NumFrames": 25155,
15+
"FileSize": 13000,
16+
"FrameMetaFile": "/CAMHDA301-20160101T000000Z_frame_meta.json",
17+
"AnnotationsFile": "/CAMHDA301-20160101T000000Z_annotations.json"
18+
}
19+
]
20+
}

friedrich/notes.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
### Gist of a JSON Database
2+
Example of how CAMHD metadata might be organized in a json database.
3+
4+
1 file that describes all video files in the archive
5+
1 file per video that describes all frames in that video
6+
1 file per video that describes every annotated frame in that video.
7+
8+
See examples in the repo and listed below.
9+
10+
#### archive_file_meta.json
11+
Contains a list of all video files on the archive and general metadata about each file.
12+
13+
#### CAMHDA301-20160101T000000Z_frame_meta.json
14+
File level list of all frames within a single video file, along with metadata for each frame.
15+
16+
#### CAMHDA301-20160101T000000Z_annotations.json
17+
File level list of all frames within a single video file, along with their annotations.
18+
19+
#### Example way to implement REST API to query JSON database
20+
https://medium.com/codingthesmartway-com-blog/create-a-rest-api-with-json-server-36da8680136d
21+

0 commit comments

Comments
 (0)