COCO-2017 / docs /VERIFICATION.md
srishti-kaushik's picture
Rewrite card: minimal front page, sample grid, docs split out
a7739e9 verified
|
Raw History Blame Contribute Delete
2.36 kB
# Verification
This copy was checked against the official COCO 2017 release rather than assumed
correct. Every check below passed.
## Image and mask integrity
| Check | Result |
|---|---|
| JPEG bytes SHA-256 identical to the official files | 287,360 / 287,360 |
| Mask PNG bytes SHA-256 identical to the official files | 246,574 / 246,574 |
| JPEGs fully decoded (not header-checked) | 287,360, 0 corrupt |
| Decoded pixel dimensions vs. dimensions declared in the JSON | 0 mismatches |
| Row count per split vs. files on disk | exact for all splits |
Image counts match the official release: 118,287 train / 5,000 val / 40,670 test /
123,403 unlabeled.
## Annotation conversion is lossless
Every annotation was reconstructed from Parquet back into its original COCO JSON
shape and compared field by field against the source file.
| Family | Annotations compared | Mismatches |
|---|---|---|
| `instances` | 896,782 | 0 |
| `captions` | 616,767 | 0 |
| `person_keypoints` | 273,469 | 0 |
| `stuff` | 780,259 | 0 |
| `panoptic` | 1,386,712 segments | 0 |
This covers `bbox`, `area`, `category_id`, `iscrowd`, `keypoints`, `num_keypoints`,
`caption`, and every `segmentation` in all three of its formats, plus per-image
metadata (`file_name`, `width`, `height`, `license`, `coco_url`, `flickr_url`,
`date_captured`) and the category tables for all five families.
## Round-trip behaviour
- `image` and `mask` columns decode as PIL images through `datasets`.
- Reconstructed segmentations decode through `pycocotools` (2,000 sampled, 100%).
- Annotation `image_id`s and image `image_id`s cover each other exactly, in both
directions, for every split.
- Every `panoptic_file_name` resolves to a mask present in `panoptic_masks_*`.
## Reproducing
The scripts that built and checked this repo are in `scripts/`:
```bash
python scripts/build_annotations.py # JSONs -> annotation configs
python scripts/build_images.py # JPEGs -> image configs
python scripts/build_masks.py # PNGs -> mask configs
python scripts/verify_release.py # full verification (byte + round-trip)
python scripts/validate.py # counts, joins, feature decoding
```
`verify_release.py` accepts `images`, `masks`, `annotations`, `features` or `all`.
It compares against a local copy of the official release; paths are set at the top
of each script.