Datasets:
add figure
Browse files- .gitattributes +2 -0
- README.md +60 -6
- croissant.json +2 -2
- figures/COCOTree_recursive_pipeline.pdf +3 -0
- figures/COCOTree_recursive_pipeline.png +3 -0
- figures/introduction_annotation.pdf +3 -0
- figures/introduction_annotation.png +3 -0
- manifest.json +2 -2
- scripts/verify_cocotree.py +54 -0
.gitattributes
CHANGED
|
@@ -2,3 +2,5 @@
|
|
| 2 |
*.json filter=lfs diff=lfs merge=lfs -text
|
| 3 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
| 4 |
*.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 2 |
*.json filter=lfs diff=lfs merge=lfs -text
|
| 3 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
| 4 |
*.png filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
figures/COCOTree_recursive_pipeline.pdf filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
figures/introduction_annotation.pdf filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -7,17 +7,71 @@ language:
|
|
| 7 |
pretty_name: COCOTree Annotation
|
| 8 |
---
|
| 9 |
|
| 10 |
-
# COCOTree
|
| 11 |
|
| 12 |
-
COCOTree
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
- Semantic nodes use source tree ids such as `n00014`.
|
| 15 |
- Instance nodes use image-local ids such as `n00014#1`.
|
| 16 |
- The synthetic roots are `n00000` and `n00000#1`.
|
|
|
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
Generated: `2026-05-07T03:36:54Z`
|
|
|
|
| 7 |
pretty_name: COCOTree Annotation
|
| 8 |
---
|
| 9 |
|
| 10 |
+
# COCOTree
|
| 11 |
|
| 12 |
+
[](figures/introduction_annotation.pdf)
|
| 13 |
+
|
| 14 |
+
COCOTree v4 is an annotation-only release for open tree decomposition over
|
| 15 |
+
COCO images. Each image has two linked views: a semantic-node tree for local
|
| 16 |
+
labels and merged masks, and an instance-node tree for image-local mask
|
| 17 |
+
instances and visual parent-child links.
|
| 18 |
+
|
| 19 |
+
The full original COCO images are not redistributed here. This repository
|
| 20 |
+
includes the released annotations, metadata, validation files, and a small
|
| 21 |
+
sample folder for inspection.
|
| 22 |
+
|
| 23 |
+
Click either figure to open the original PDF.
|
| 24 |
+
|
| 25 |
+
## Annotation Views
|
| 26 |
+
|
| 27 |
+
Every non-root semantic node has a merged mask, bbox, label, semantic parent,
|
| 28 |
+
semantic children, and links to its instance nodes. Every instance node has
|
| 29 |
+
its own mask, bbox, label, semantic-node id, semantic parent/children,
|
| 30 |
+
instance parent, and instance children.
|
| 31 |
|
| 32 |
- Semantic nodes use source tree ids such as `n00014`.
|
| 33 |
- Instance nodes use image-local ids such as `n00014#1`.
|
| 34 |
- The synthetic roots are `n00000` and `n00000#1`.
|
| 35 |
+
- Masks are encoded as COCO compressed RLE.
|
| 36 |
|
| 37 |
+
## Construction Pipeline
|
| 38 |
+
|
| 39 |
+
[](figures/COCOTree_recursive_pipeline.pdf)
|
| 40 |
+
|
| 41 |
+
The pipeline recursively proposes visible child labels, grounds them into
|
| 42 |
+
masks, filters invalid candidates, groups repeated masks into semantic nodes,
|
| 43 |
+
and materializes instance nodes with parent-child links.
|
| 44 |
+
|
| 45 |
+
## Dataset Scale
|
| 46 |
+
|
| 47 |
+
| Item | Count |
|
| 48 |
+
| --- | ---: |
|
| 49 |
+
| Images | 21,133 |
|
| 50 |
+
| Semantic nodes | 554,550 |
|
| 51 |
+
| Instance nodes | 1,816,065 |
|
| 52 |
+
| Unique labels | 3,508 |
|
| 53 |
+
| Max semantic depth | 8 |
|
| 54 |
+
| Max instance depth | 8 |
|
| 55 |
+
|
| 56 |
+
## Files
|
| 57 |
+
|
| 58 |
+
- `annotations/semantic_nodes.jsonl` and `annotations/semantic_edges.jsonl`:
|
| 59 |
+
semantic tree nodes and edges.
|
| 60 |
+
- `annotations/instance_nodes.jsonl` and `annotations/instance_edges.jsonl`:
|
| 61 |
+
instance tree nodes and edges.
|
| 62 |
+
- `annotations/image_dual_tree_summary.jsonl`: image-level counts and depth
|
| 63 |
+
summaries.
|
| 64 |
+
- `annotations/parent_assignment_warnings.jsonl`: parent-assignment warnings
|
| 65 |
+
from instance tree construction.
|
| 66 |
+
- `metadata/`: dataset stats, splits, label vocab, and evaluation protocol.
|
| 67 |
+
- `samples/`: small preview subset with images, annotations, overlay examples,
|
| 68 |
+
and `dual_tree_viewer.html`.
|
| 69 |
+
- `figures/`: README preview images and the original PDF figures.
|
| 70 |
+
|
| 71 |
+
## Quick Validation
|
| 72 |
+
|
| 73 |
+
```bash
|
| 74 |
+
python scripts/verify_cocotree_v4.py --release-root .
|
| 75 |
+
```
|
| 76 |
|
| 77 |
Generated: `2026-05-07T03:36:54Z`
|
croissant.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c244a853eee83982305121c2a4c6a06906dcf91c41725d9604a748cd271bfd60
|
| 3 |
+
size 47234
|
figures/COCOTree_recursive_pipeline.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7275763abc6a80d4af441a480806716236a3f78790ba75568769fbdfd599e0f1
|
| 3 |
+
size 374537
|
figures/COCOTree_recursive_pipeline.png
ADDED
|
Git LFS Details
|
figures/introduction_annotation.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2c37ba68c7372862b14cc0e0add75bed78b57db9ee9ef2be6b99a3551f91f3f1
|
| 3 |
+
size 390540
|
figures/introduction_annotation.png
ADDED
|
Git LFS Details
|
manifest.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dc7e1fcf93f6fa10cd8b6c4c3398a82d64fdd8008bc959a7f12215067b65efa3
|
| 3 |
+
size 6687
|
scripts/verify_cocotree.py
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import argparse
|
| 4 |
+
import json
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
|
| 7 |
+
SEMANTIC_ROOT_ID = "n00000"
|
| 8 |
+
INSTANCE_ROOT_ID = "n00000#1"
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
def iter_jsonl(path: Path):
|
| 12 |
+
with path.open("r", encoding="utf-8") as handle:
|
| 13 |
+
for line in handle:
|
| 14 |
+
if line.strip():
|
| 15 |
+
yield json.loads(line)
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
def count_jsonl(path: Path) -> int:
|
| 19 |
+
return sum(1 for _ in iter_jsonl(path))
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
def main() -> None:
|
| 23 |
+
parser = argparse.ArgumentParser(description="Verify COCOTree release.")
|
| 24 |
+
parser.add_argument("--release-root", type=Path, default=Path("."))
|
| 25 |
+
args = parser.parse_args()
|
| 26 |
+
root = args.release_root.resolve()
|
| 27 |
+
required = [
|
| 28 |
+
"annotations/semantic_nodes.jsonl",
|
| 29 |
+
"annotations/instance_nodes.jsonl",
|
| 30 |
+
"annotations/semantic_edges.jsonl",
|
| 31 |
+
"annotations/instance_edges.jsonl",
|
| 32 |
+
"annotations/image_dual_tree_summary.jsonl",
|
| 33 |
+
"metadata/dataset_stats.json",
|
| 34 |
+
"samples/dual_tree_viewer.html",
|
| 35 |
+
]
|
| 36 |
+
missing = [rel for rel in required if not (root / rel).is_file()]
|
| 37 |
+
if missing:
|
| 38 |
+
raise SystemExit(f"missing files: {missing}")
|
| 39 |
+
stats = json.loads((root / "metadata" / "dataset_stats.json").read_text(encoding="utf-8"))
|
| 40 |
+
checks = {
|
| 41 |
+
"semantic_node_count": count_jsonl(root / "annotations" / "semantic_nodes.jsonl"),
|
| 42 |
+
"instance_node_count": count_jsonl(root / "annotations" / "instance_nodes.jsonl"),
|
| 43 |
+
"semantic_edge_count_including_root": count_jsonl(root / "annotations" / "semantic_edges.jsonl"),
|
| 44 |
+
"instance_edge_count_including_root": count_jsonl(root / "annotations" / "instance_edges.jsonl"),
|
| 45 |
+
"image_count": count_jsonl(root / "annotations" / "image_dual_tree_summary.jsonl"),
|
| 46 |
+
}
|
| 47 |
+
for key, got in checks.items():
|
| 48 |
+
if got != int(stats[key]):
|
| 49 |
+
raise SystemExit(f"{key} mismatch: {got} != {stats[key]}")
|
| 50 |
+
print("COCOTree release OK")
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
if __name__ == "__main__":
|
| 54 |
+
main()
|