davanstrien HF staff commited on
Commit
4cbefcd
1 Parent(s): 8cf4a36
Files changed (2) hide show
  1. README.md +2 -2
  2. dating-historical-color-images.py +1 -3
README.md CHANGED
@@ -14,10 +14,10 @@ dataset_info:
14
  '4': 1970s
15
  splits:
16
  - name: train
17
- num_bytes: 48014028
18
  num_examples: 1325
19
  download_size: 222265856
20
- dataset_size: 48014028
21
  pretty_name: Dating historical color images
22
  task_categories:
23
  - image-classification
 
14
  '4': 1970s
15
  splits:
16
  - name: train
17
+ num_bytes: 221261063
18
  num_examples: 1325
19
  download_size: 222265856
20
+ dataset_size: 221261063
21
  pretty_name: Dating historical color images
22
  task_categories:
23
  - image-classification
dating-historical-color-images.py CHANGED
@@ -15,8 +15,6 @@
15
 
16
  from pathlib import Path
17
  import datasets
18
- from PIL import Image
19
- import io
20
 
21
  _CITATION = """@inproceedings{10.1007/978-3-642-33783-3_36,
22
  author = {Palermo, Frank and Hays, James and Efros, Alexei A.},
@@ -175,7 +173,7 @@ class IllustratedAds(datasets.GeneratorBasedBuilder):
175
  for fname, fobject in archive:
176
  if Path(fname).suffix != ".jpg":
177
  continue
178
- image = Image.open(io.BytesIO(fobject.read()))
179
  label = str(Path(fname).parts[-2])
180
  id_ += 1
181
  yield id_, {"image": image, "label": label}
 
15
 
16
  from pathlib import Path
17
  import datasets
 
 
18
 
19
  _CITATION = """@inproceedings{10.1007/978-3-642-33783-3_36,
20
  author = {Palermo, Frank and Hays, James and Efros, Alexei A.},
 
173
  for fname, fobject in archive:
174
  if Path(fname).suffix != ".jpg":
175
  continue
176
+ image = fobject.read()
177
  label = str(Path(fname).parts[-2])
178
  id_ += 1
179
  yield id_, {"image": image, "label": label}