Datasets:

Modalities:
Image
Text
Formats:
text
Libraries:
Datasets
License:
hilaus-arm commited on
Commit
e3be3cc
·
verified ·
1 Parent(s): e58b502

Replace images without current BY/SA licenses (part 2)

Browse files

Replace nine images whose live Flickr pages no longer show CC BY or CC BY-SA, preserve the 89/39 license balance, and clarify immediate-source provenance for the Ultralytics coco128 files.

Files changed (2) hide show
  1. selection.json +12 -0
  2. verify_attribution.py +23 -7
selection.json CHANGED
@@ -12,5 +12,17 @@
12
  "CC-BY-2.0": 89,
13
  "CC-BY-SA-2.0": 39,
14
  "CC0-1.0": 0
 
 
 
 
 
 
 
 
 
 
 
 
15
  }
16
  }
 
12
  "CC-BY-2.0": 89,
13
  "CC-BY-SA-2.0": 39,
14
  "CC0-1.0": 0
15
+ },
16
+ "license_reverification_date": "2026-10-22",
17
+ "license_replacements": {
18
+ "112988": 248730,
19
+ "133650": 437710,
20
+ "212646": 26376,
21
+ "216772": 426083,
22
+ "272034": 66995,
23
+ "410261": 311428,
24
+ "415420": 284732,
25
+ "452121": 248009,
26
+ "577033": 194448
27
  }
28
  }
verify_attribution.py CHANGED
@@ -13,15 +13,23 @@ from pathlib import Path
13
  ROOT = Path(__file__).resolve().parent
14
  MANIFEST = ROOT / "LICENSE_MANIFEST.csv"
15
  ANNOTATIONS = ROOT / "annotations" / "instances_train2017.json"
 
 
 
16
 
17
  EXPECTED_LICENSES = {
18
  "CC-BY-2.0": ("2.0", "https://creativecommons.org/licenses/by/2.0/", 4),
19
  "CC-BY-SA-2.0": ("2.0", "https://creativecommons.org/licenses/by-sa/2.0/", 5),
20
  }
21
  EXPECTED_COUNTS = Counter({"CC-BY-2.0": 89, "CC-BY-SA-2.0": 39})
22
- EXACT = "None; byte-for-byte copy of the COCO train2017 image."
23
- RECOMPRESSED = (
24
- "JPEG recompressed relative to the COCO train2017 image; dimensions unchanged."
 
 
 
 
 
25
  )
26
 
27
 
@@ -46,10 +54,14 @@ def main() -> None:
46
 
47
  require(len(rows) == 128, f"expected 128 manifest rows, received {len(rows)}")
48
  require(len(annotation_images) == 128, "annotation image count is not 128")
49
- require(len(document["annotations"]) == 1050, "annotation count is not 1,050")
50
  require(len({row["image_id"] for row in rows}) == 128, "duplicate image ID")
51
  require(len({row["file_name"] for row in rows}) == 128, "duplicate file name")
52
  require(Counter(row["license"] for row in rows) == EXPECTED_COUNTS, "wrong license counts")
 
 
 
 
53
 
54
  modified = 0
55
  modified_sharealike = 0
@@ -79,6 +91,10 @@ def main() -> None:
79
  row["license_evidence"] == ANNOTATIONS.relative_to(ROOT).as_posix(),
80
  f"image {image_id}: wrong evidence path",
81
  )
 
 
 
 
82
 
83
  coco_image = annotation_images[image_id]
84
  require(coco_image["license"] == license_id, f"image {image_id}: COCO license mismatch")
@@ -107,7 +123,7 @@ def main() -> None:
107
  )
108
 
109
  exact = row["distributed_sha256"] == row["coco_source_sha256"]
110
- expected_modification = EXACT if exact else RECOMPRESSED
111
  require(
112
  row["image_modifications"] == expected_modification,
113
  f"image {image_id}: wrong modification statement",
@@ -130,9 +146,9 @@ def main() -> None:
130
  require(modified == 23, f"expected 23 recompressed images, received {modified}")
131
  require(modified_sharealike == 8, "expected 8 recompressed CC BY-SA images")
132
 
133
- print("Verified 128 image records, 128 checksums, 1,050 annotations, and 128 labels.")
134
  print("Licenses: 89 CC BY 2.0; 39 CC BY-SA 2.0.")
135
- print("Modifications: 105 byte-for-byte copies; 23 JPEG-recompressed (8 CC BY-SA).")
136
 
137
 
138
  if __name__ == "__main__":
 
13
  ROOT = Path(__file__).resolve().parent
14
  MANIFEST = ROOT / "LICENSE_MANIFEST.csv"
15
  ANNOTATIONS = ROOT / "annotations" / "instances_train2017.json"
16
+ COCO_ANNOTATIONS_URL = (
17
+ "http://images.cocodataset.org/annotations/annotations_trainval2017.zip"
18
+ )
19
 
20
  EXPECTED_LICENSES = {
21
  "CC-BY-2.0": ("2.0", "https://creativecommons.org/licenses/by/2.0/", 4),
22
  "CC-BY-SA-2.0": ("2.0", "https://creativecommons.org/licenses/by-sa/2.0/", 5),
23
  }
24
  EXPECTED_COUNTS = Counter({"CC-BY-2.0": 89, "CC-BY-SA-2.0": 39})
25
+ EXPECTED_CURRENT_LICENSES = Counter(
26
+ {"CC-BY-2.0": 89, "CC-BY-SA-2.0": 37, "CC-BY-SA-4.0": 2}
27
+ )
28
+ EXACT = "None by Arm; byte-for-byte copy of the official COCO train2017 image."
29
+ COCO128 = (
30
+ "None by Arm; byte-for-byte copy of the Ultralytics coco128 image. "
31
+ "That source is JPEG-recompressed relative to the official COCO train2017 image; "
32
+ "dimensions unchanged."
33
  )
34
 
35
 
 
54
 
55
  require(len(rows) == 128, f"expected 128 manifest rows, received {len(rows)}")
56
  require(len(annotation_images) == 128, "annotation image count is not 128")
57
+ require(len(document["annotations"]) == 1025, "annotation count is not 1,025")
58
  require(len({row["image_id"] for row in rows}) == 128, "duplicate image ID")
59
  require(len({row["file_name"] for row in rows}) == 128, "duplicate file name")
60
  require(Counter(row["license"] for row in rows) == EXPECTED_COUNTS, "wrong license counts")
61
+ require(
62
+ Counter(row["current_flickr_license"] for row in rows) == EXPECTED_CURRENT_LICENSES,
63
+ "wrong current Flickr license counts",
64
+ )
65
 
66
  modified = 0
67
  modified_sharealike = 0
 
91
  row["license_evidence"] == ANNOTATIONS.relative_to(ROOT).as_posix(),
92
  f"image {image_id}: wrong evidence path",
93
  )
94
+ require(
95
+ row["license_evidence_url"] == COCO_ANNOTATIONS_URL,
96
+ f"image {image_id}: wrong evidence URL",
97
+ )
98
 
99
  coco_image = annotation_images[image_id]
100
  require(coco_image["license"] == license_id, f"image {image_id}: COCO license mismatch")
 
123
  )
124
 
125
  exact = row["distributed_sha256"] == row["coco_source_sha256"]
126
+ expected_modification = COCO128 if row["from_coco128"] == "yes" else EXACT
127
  require(
128
  row["image_modifications"] == expected_modification,
129
  f"image {image_id}: wrong modification statement",
 
146
  require(modified == 23, f"expected 23 recompressed images, received {modified}")
147
  require(modified_sharealike == 8, "expected 8 recompressed CC BY-SA images")
148
 
149
+ print("Verified 128 image records, 128 checksums, 1,025 annotations, and 128 labels.")
150
  print("Licenses: 89 CC BY 2.0; 39 CC BY-SA 2.0.")
151
+ print("Sources: 105 official COCO JPEGs; 23 Ultralytics coco128 JPEGs (8 CC BY-SA).")
152
 
153
 
154
  if __name__ == "__main__":