Files changed (5) hide show
  1. CIFAR.zip +0 -3
  2. Databases_IlluminantChanges.py +0 -111
  3. Imagenet.zip +0 -3
  4. MNIST.zip +0 -3
  5. TID13.zip +0 -3
CIFAR.zip DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:ad7d6a77cf72b4c6ff601ec7e532fbd2c66e8d702cb56d057a224db75e370d26
3
- size 98018039
 
 
 
 
Databases_IlluminantChanges.py DELETED
@@ -1,111 +0,0 @@
1
- import os
2
- import re
3
-
4
- import pandas as pd
5
- import datasets
6
-
7
- # _CITATION = """\
8
- # @article{ponomarenko_tid2008_2009,
9
- # author = {Ponomarenko, Nikolay and Lukin, Vladimir and Zelensky, Alexander and Egiazarian, Karen and Astola, Jaakko and Carli, Marco and Battisti, Federica},
10
- # title = {{TID2008} -- {A} {Database} for {Evaluation} of {Full}- {Reference} {Visual} {Quality} {Assessment} {Metrics}},
11
- # year = {2009}
12
- # }
13
- # """
14
-
15
-
16
- _DESCRIPTION = """"""
17
-
18
- _HOMEPAGE = ""
19
- _REPO = ""
20
-
21
- # _LICENSE = ""
22
- class IlluminantConfig(datasets.BuilderConfig):
23
- """BuilderConfig for IlluminantChanges."""
24
-
25
- def __init__(self, data_url, **kwargs):
26
- """BuilderConfig for Imagette.
27
- Args:
28
- data_url: `string`, url to download the zip file from.
29
- matadata_urls: dictionary with keys 'train' and 'validation' containing the archive metadata URLs
30
- **kwargs: keyword arguments forwarded to super.
31
- """
32
- super(IlluminantConfig, self).__init__(version=datasets.Version("1.0.0"), **kwargs)
33
- self.data_url = data_url
34
-
35
- class Databases_IlluminantChanges(datasets.GeneratorBasedBuilder):
36
- """"""
37
-
38
- VERSION = datasets.Version("1.0.0")
39
-
40
- BUILDER_CONFIGS = [
41
- IlluminantConfig(
42
- name="MNIST",
43
- description="MNIST data",
44
- data_url=f"./MNIST.zip",
45
- ),
46
- IlluminantConfig(
47
- name="CIFAR",
48
- description="CIFAR data",
49
- data_url=f"./CIFAR.zip",
50
- ),
51
- IlluminantConfig(
52
- name="Imagenet",
53
- description="Imagenet data",
54
- data_url=f"./Imagenet.zip",
55
- ),
56
- IlluminantConfig(
57
- name="TID13",
58
- description="TID13 data",
59
- data_url=f"./TID13.zip",
60
- ),
61
- ]
62
-
63
- def _info(self):
64
- # TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
65
- features = datasets.Features(
66
- {
67
- # "images": datasets.Image(),
68
- "reference": datasets.Image(),
69
- "distorted": datasets.Image(),
70
- # "mos": datasets.Value("float")
71
- }
72
- )
73
- return datasets.DatasetInfo(
74
- description=_DESCRIPTION,
75
- features=features,
76
- # supervised_keys=("reference", "distorted", "mos"),
77
- homepage=_HOMEPAGE,
78
- # license=_LICENSE,
79
- # citation=_CITATION,
80
- )
81
-
82
- def _split_generators(self, dl_manager):
83
-
84
- archive_path = dl_manager.download(self.config.data_url)
85
- # print(f"Data url: {self.config.data_url} | {archive_path}")
86
- return [
87
- datasets.SplitGenerator(
88
- name=datasets.Split.TRAIN,
89
- gen_kwargs={
90
- "images": dl_manager.download_and_extract(archive_path),
91
- "split": "train",
92
- },
93
- )
94
- ]
95
-
96
- def _generate_examples(self, images, split):
97
- desat_path = os.path.join(images, self.config.name, "Desat")
98
- illum_path = os.path.join(images, self.config.name, "Illum")
99
-
100
- illum_paths = [os.path.join(illum_path, p) for p in os.listdir(illum_path)]
101
-
102
- ## Get the correct desat image for each illum image
103
- img_numbers = [re.findall("im_(\d+)_tono_\d+_sat_\d+.png", p)[0] for p in illum_paths]
104
- desat_paths = [os.path.join(desat_path, f"im_orig_desat{n}.png") for n in img_numbers]
105
-
106
- # print(desat_paths[0], illum_paths[0])
107
- for key, (desat, illum) in enumerate(zip(desat_paths, illum_paths)):
108
- yield key, {
109
- "reference": desat,
110
- "distorted": illum,
111
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Imagenet.zip DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:904e091ccdf9396c733c7359ea6d2f5d70064e3e01b6e418bb240c8c99d8e5c4
3
- size 4601530043
 
 
 
 
MNIST.zip DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:4bffe004d2b4baa23db1879b5258b916d093bb824516bdb0ccd0e78c8471e3a0
3
- size 29605529
 
 
 
 
TID13.zip DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:9313a0670681bbb3dfba8068c87ea102d20bc752b854e23a1e093865c6cf15d6
3
- size 1361737295