davanstrien HF staff commited on
Commit
1db2bc3
1 Parent(s): f5e64d3

fix formatting

Browse files
Files changed (1) hide show
  1. dating-historical-color-images.py +0 -90
dating-historical-color-images.py CHANGED
@@ -46,96 +46,6 @@ _HOMEPAGE = "http://graphics.cs.cmu.edu/projects/historicalColor/"
46
  _URLS = "http://graphics.cs.cmu.edu/projects/historicalColor/HistoricalColor-ECCV2012-DecadeDatabase.tar"
47
 
48
 
49
- class IllustratedAds(datasets.GeneratorBasedBuilder):
50
- """Dating Historical Color Images dataset"""
51
-
52
- VERSION = datasets.Version("1.1.0")
53
-
54
- def _info(self):
55
- features = datasets.Features(
56
- {
57
- "image": datasets.Image(),
58
- "label": datasets.ClassLabel(
59
- names=["1930s", "1940s", "1950s", "1960s", "1970s"]
60
- ),
61
- }
62
- )
63
-
64
- return datasets.DatasetInfo(
65
- description=_DESCRIPTION,
66
- features=features,
67
- homepage=_HOMEPAGE,
68
- citation=_CITATION,
69
- )
70
-
71
- def _split_generators(self, dl_manager):
72
- images = dl_manager.download(_URLS)
73
- return [
74
- datasets.SplitGenerator(
75
- name=datasets.Split.TRAIN,
76
- gen_kwargs={"archive": dl_manager.iter_archive(images)},
77
- ),
78
- ]
79
-
80
- def _generate_examples(self, archive):
81
- id_ = 0
82
- for fname, _ in archive:
83
- if Path(fname).suffix != ".jpg":
84
- continue
85
- image = Image.open(fname)
86
- label = str(Path(image).parts[-2])
87
- id_ += 1
88
- yield id_, {"image": image, "label": label}
89
-
90
-
91
- # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
92
- #
93
- # Licensed under the Apache License, Version 2.0 (the "License");
94
- # you may not use this file except in compliance with the License.
95
- # You may obtain a copy of the License at
96
- #
97
- # http://www.apache.org/licenses/LICENSE-2.0
98
- #
99
- # Unless required by applicable law or agreed to in writing, software
100
- # distributed under the License is distributed on an "AS IS" BASIS,
101
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
102
- # See the License for the specific language governing permissions and
103
- # limitations under the License.
104
- """Dataset for dating historical color images"""
105
-
106
- from pathlib import Path
107
- import datasets
108
-
109
- _CITATION = """@inproceedings{10.1007/978-3-642-33783-3_36,
110
- author = {Palermo, Frank and Hays, James and Efros, Alexei A.},
111
- title = {Dating Historical Color Images},
112
- year = {2012},
113
- isbn = {9783642337826},
114
- publisher = {Springer-Verlag},
115
- address = {Berlin, Heidelberg},
116
- url = {https://doi.org/10.1007/978-3-642-33783-3_36},
117
- doi = {10.1007/978-3-642-33783-3_36},
118
- abstract = {We introduce the task of automatically estimating the age of historical color photographs. We suggest features which attempt to capture temporally discriminative information based on the evolution of color imaging processes over time and evaluate the performance of both these novel features and existing features commonly utilized in other problem domains on a novel historical image data set. For the challenging classification task of sorting historical color images into the decade during which they were photographed, we demonstrate significantly greater accuracy than that shown by untrained humans on the same data set. Additionally, we apply the concept of data-driven camera response function estimation to historical color imagery, demonstrating its relevance to both the age estimation task and the popular application of imitating the appearance of vintage color photography.},
119
- booktitle = {Proceedings of the 12th European Conference on Computer Vision - Volume Part VI},
120
- pages = {499–512},
121
- numpages = {14},
122
- location = {Florence, Italy},
123
- series = {ECCV'12}
124
- }
125
- """
126
-
127
-
128
- _DESCRIPTION = """\
129
- This dataset contains color photographs taken between the 1930s and 1970s.
130
- The goal of the dataset is to develop methods for dating historical color photographs
131
- """
132
-
133
- _HOMEPAGE = "http://graphics.cs.cmu.edu/projects/historicalColor/"
134
-
135
-
136
- _URLS = "http://graphics.cs.cmu.edu/projects/historicalColor/HistoricalColor-ECCV2012-DecadeDatabase.tar"
137
-
138
-
139
  class IllustratedAds(datasets.GeneratorBasedBuilder):
140
  """Dating Historical Color Images dataset"""
141
 
 
46
  _URLS = "http://graphics.cs.cmu.edu/projects/historicalColor/HistoricalColor-ECCV2012-DecadeDatabase.tar"
47
 
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  class IllustratedAds(datasets.GeneratorBasedBuilder):
50
  """Dating Historical Color Images dataset"""
51