COT5415_Computer_Vision / docs /data /DATASET_CARD.md
iiCEMAN's picture
Add PACO-LVIS (v2 unified release, annotations only; images from COCO 2017)
b0d869f verified
|
Raw History Blame Contribute Delete
7.64 kB

Unified part-whole dataset card

Version: 2.0, local course release, 2026-11-18 (v2 adds PACO-LVIS; v1 of 2026-11-01 covered the first two sources).

Contents and intended use

The release standardizes PartImageNet OOD, the supplied Compositor-style Pascal-Part processed subset and PACO-LVIS v1 into one image-record format with compressed RLE masks and explicit parent references. It supports inspecting source annotations, shared loading, conversion checks and hierarchical-model evaluation. It does not supply a trained Seq2Seq tree model, an instance annotation for semantic-only regions, or a task-specific training target.

Source / split Images Whole nodes Part nodes Invalid part geometry
PartImageNet train 16,540 16,523 76,483 121
PartImageNet val 2,957 2,954 13,371 17
PartImageNet test 4,598 4,590 22,106 30
Pascal-Part train 4,653 10,740 28,953 0
Pascal-Part val 4,772 10,942 29,584 0
PACO-LVIS train 45,790 217,117 395,071 0
PACO-LVIS val 2,410 10,974 20,945 0
PACO-LVIS test 9,443 45,861 86,038 0
Total 91,163 319,701 672,551 168

Source: datasets/unified/conversion_summary.json. Node counts include preserved source background/empty regions where applicable; they are not object instance counts. The original Pascal-Part dataset has 10,103 train/val images; this supplied processed subset contains 9,425 and must not be presented as the full original dataset.

Schema and semantic scope

Each JSONL line stores dataset/split/image ID, relative image/source paths, dimensions and nodes. Each node has an image-local ID, parent_id, whole/part kind, level, dataset-namespaced category, original label ID, provenance, area and compressed COCO RLE. PartImageNet also retains raw segmentation geometry and annotation ID. Paths resolve from the project/package root; numeric IDs never cross dataset namespaces implicitly.

PACO-LVIS is the only source with instance-level links: each LVIS object annotation is a whole node and each part annotation is attached to it through the source obj_ann_id. It covers 75 object categories and 456 object-specific part categories (200 generic part names), with per-instance color, pattern, material and transparency attributes. People are not among PACO's object categories. PACO object outlines and part masks were drawn independently: 79% of parts extend at least one pixel beyond their object mask. These pixels are kept and counted per part in outside_parent_area.

PartImageNet whole nodes are unions of decodable part regions sharing a supercategory, not inferred object instances. Pascal whole/part nodes preserve numerical PNG values through pixel intersections, allowing exact reconstruction of both processed rasters. This is a common two-level semantic representation, not a complete anatomical hierarchy.

PartImageNet has 11 whole supercategories and 40 part categories. Pascal metadata adds source-backed display names for 16 foreground whole categories and 54 foreground part groups, plus background. Display names were reconstructed from verified original named MATs using all 9,425 current image IDs. Original numeric category keys remain unchanged. See PASCAL_LABELS.md and datasets/unified/Pascal-Part/label_metadata.json for exact evidence and ambiguous components.

Quality and consumer policy

All 33,520 records passed conversion integrity checks with zero conversion issues and no split filename duplication. The 168 original malformed polygons remain represented and flagged. A valid-but-empty test annotation is counted separately. Default loader masks omit non-valid mask_status, while record() exposes all original geometry and flags. See QUALITY_POLICY.md.

A subsequent source-backed semantic audit found foreground-part/whole class conflicts in the supplied Pascal PNGs: 512/4,653 train images (871,870 pixels; 0.4016% of foreground-part pixels), 547/4,772 val images (706,599 pixels; 0.3143%). There are also part-unlabelled pixels within foreground objects. These are properties of the supplied processed labels, not raster loss introduced by conversion. Preserve the source rasters and consult results/preparation/pascal_semantic_quality.json before defining semantic supervision. Filtering must be explicit; do not treat every preserved intersection as a semantically verified parent link.

For PartImageNet val evaluation, all 2,957 images remain, 17 invalid masks affecting 16 images are excluded, and uncovered pixels remain background. This policy is specific to that recorded experiment, not an automatic training rule for every consumer.

Loading and visualization

From the project root with the project venv:

& .\venv\Scripts\python.exe .\code\examples\read_unified.py --dataset Pascal-Part --split val --index 0
& .\venv\Scripts\python.exe .\code\examples\read_unified.py --dataset PartImageNet --split val --index 0 --output .\results\data_delivery\partimagenet_example.png

The example reads metadata without source images unless --output is requested. For full loading use UnifiedDataset[index]; for DataLoader use collate_fn=list because image shapes and node counts vary. Category names come from categories.json; is_background is explicit for Pascal. The example also prints foreground_candidate_node_ids after explicit background, invalid/empty-mask and semantic-parent filtering, plus semantic_conflict_node_ids. These are consumer candidates, not rewritten dataset nodes. The optional preview still shows all preserved source groups.

Source images are not included in the annotation-only review ZIP. Obtain the original sources, retain their prescribed splits and place them at datasets/PartImageNet/images/// and datasets/Pascal-Part/JPEGImages//. The original project loader's required libraries are NumPy, Pillow, pycocotools and tqdm; conversion/validation additionally uses the installed project dependencies. A mask or record can be inspected without a model checkpoint.

Provenance, packaging and remaining scope

SOURCES_AND_LICENSES.md records original URLs, revisions, archive hashes and source-specific terms. This local annotation-only ZIP includes converted JSONL, schema, category metadata, quality reports, examples and a SHA256 manifest. It excludes images, model weights, raw archives and venv. It does not assign a new project-wide license.

PACO-LVIS images are COCO 2017 images and are not redistributed with this dataset. Download them from COCO: python code/tools/fetch_coco_images.py fetches only the 57,643 referenced files (about 9 GB; --splits val for a 2,410-image subset) using the coco_url stored in every record, and checks each image's size against the annotation. Alternatively extract the official train2017.zip and val2017.zip from https://cocodataset.org/#download into datasets/COCO/. 2,183 PACO test images come from val2017, all others from train2017. The original PACO annotations (paco_lvis_v1.zip, from https://dl.fbaipublicfiles.com/paco/annotations/paco_lvis_v1.zip) go in datasets/PACO-LVIS/annotations/. Rebuild with code/partwhole.py convert --datasets PACO-LVIS and check with code/partwhole.py validate --datasets PACO-LVIS, which writes results/preparation/validation_report_PACO-LVIS.json.

The v2 annotation bundle, datasets/release/unified_partwhole_v2.zip, holds all three sources and is published on the project Hugging Face dataset. It exceeds GitHub's file size limit and is not committed to Git; v1 (two sources) remains unchanged in both places.