will33am commited on
Commit
a4597a8
1 Parent(s): 4cc72d2

[add] ava.py

Browse files
.ipynb_checkpoints/AVA-checkpoint.py ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ import os
3
+ import datasets
4
+ import joblib
5
+ from pathlib import Path
6
+
7
+
8
+ _BASE_HF_URL = Path("./data")
9
+ _CITATION = ""
10
+ _HOMEPAGE = ""
11
+ _DESCRIPTION = ""
12
+ _DATA_URL = {
13
+ "train": [_BASE_HF_URL/"images.tar.gz"]
14
+ }
15
+ DICT_METADATA = joblib.load(_BASE_HF_URL / "metadata.pkl")
16
+
17
+
18
+ class AVA(datasets.GeneratorBasedBuilder):
19
+ VERSION = datasets.Version("1.0.0")
20
+
21
+ DEFAULT_WRITER_BATCH_SIZE = 1000
22
+
23
+ def _info(self):
24
+ return datasets.DatasetInfo(
25
+ description=_DESCRIPTION,
26
+ features=datasets.Features(
27
+ {
28
+ "image": datasets.Image(),
29
+ "rating_counts": datasets.features.Sequence(datasets.Value("int32")),
30
+ "text_tag_0": datasets.Value("string"),
31
+ "text_tag_1": datasets.Value("string")
32
+ }
33
+ ),
34
+ homepage=_HOMEPAGE,
35
+ citation=_CITATION,
36
+ )
37
+
38
+ def _split_generators(self, dl_manager):
39
+ """Returns SplitGenerators."""
40
+ archives = dl_manager.download(_DATA_URL)
41
+
42
+ return [
43
+ datasets.SplitGenerator(
44
+ name=datasets.Split.TRAIN,
45
+ gen_kwargs={
46
+ "archives": [dl_manager.iter_archive(archive) for archive in archives["train"]],
47
+ "split": "train",
48
+ },
49
+ )
50
+ ]
51
+
52
+ def _generate_examples(self, archives, split):
53
+ """Yields examples."""
54
+ idx = 0
55
+ for archive in archives:
56
+ for path, file in archive:
57
+ if path.endswith(".jpg"):
58
+ # image filepath format: <IMAGE_FILE NAME>_<SYNSET_ID>.JPEG
59
+ _id = int(os.path.splitext(b[0])[0].split('/')[-1])
60
+ _metadata = DICT_METADATA[_id]
61
+ ex = {"image": {"path": path, "bytes": file.read()},
62
+ "rating_counts": _metadata[0],
63
+ "text_tag0":_metadata[1],
64
+ "text_tag1": _metadata[2]}
65
+ yield idx, ex
66
+ idx += 1
AVA.py ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ import os
3
+ import datasets
4
+ import joblib
5
+ from pathlib import Path
6
+
7
+
8
+ _BASE_HF_URL = Path("./data")
9
+ _CITATION = ""
10
+ _HOMEPAGE = ""
11
+ _DESCRIPTION = ""
12
+ _DATA_URL = {
13
+ "train": [_BASE_HF_URL/"images.tar.gz"]
14
+ }
15
+ DICT_METADATA = joblib.load(_BASE_HF_URL / "metadata.pkl")
16
+
17
+
18
+ class AVA(datasets.GeneratorBasedBuilder):
19
+ VERSION = datasets.Version("1.0.0")
20
+
21
+ DEFAULT_WRITER_BATCH_SIZE = 1000
22
+
23
+ def _info(self):
24
+ return datasets.DatasetInfo(
25
+ description=_DESCRIPTION,
26
+ features=datasets.Features(
27
+ {
28
+ "image": datasets.Image(),
29
+ "rating_counts": datasets.features.Sequence(datasets.Value("int32")),
30
+ "text_tag_0": datasets.Value("string"),
31
+ "text_tag_1": datasets.Value("string")
32
+ }
33
+ ),
34
+ homepage=_HOMEPAGE,
35
+ citation=_CITATION,
36
+ )
37
+
38
+ def _split_generators(self, dl_manager):
39
+ """Returns SplitGenerators."""
40
+ archives = dl_manager.download(_DATA_URL)
41
+
42
+ return [
43
+ datasets.SplitGenerator(
44
+ name=datasets.Split.TRAIN,
45
+ gen_kwargs={
46
+ "archives": [dl_manager.iter_archive(archive) for archive in archives["train"]],
47
+ "split": "train",
48
+ },
49
+ )
50
+ ]
51
+
52
+ def _generate_examples(self, archives, split):
53
+ """Yields examples."""
54
+ idx = 0
55
+ for archive in archives:
56
+ for path, file in archive:
57
+ if path.endswith(".jpg"):
58
+ # image filepath format: <IMAGE_FILE NAME>_<SYNSET_ID>.JPEG
59
+ _id = int(os.path.splitext(b[0])[0].split('/')[-1])
60
+ _metadata = DICT_METADATA[_id]
61
+ ex = {"image": {"path": path, "bytes": file.read()},
62
+ "rating_counts": _metadata[0],
63
+ "text_tag0":_metadata[1],
64
+ "text_tag1": _metadata[2]}
65
+ yield idx, ex
66
+ idx += 1
data/metadata.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7f4717e56ab446a1c6b58c6ea44b28c180e05e4eda3f895eeec704569dbe328f
3
+ size 42369204
notebooks/.ipynb_checkpoints/EDA-checkpoint.ipynb ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 60,
6
+ "id": "0dbc59b3",
7
+ "metadata": {},
8
+ "outputs": [],
9
+ "source": [
10
+ "import pandas as pd\n",
11
+ "import os\n",
12
+ "import glob\n",
13
+ "from omegaconf import OmegaConf"
14
+ ]
15
+ },
16
+ {
17
+ "cell_type": "code",
18
+ "execution_count": 58,
19
+ "id": "1fac2763",
20
+ "metadata": {},
21
+ "outputs": [],
22
+ "source": [
23
+ "test_len = {}\n",
24
+ "train_len = {}\n",
25
+ "files = glob.glob(\"../../AVA_src/aesthetics_image_lists/*.jpgl\")\n",
26
+ "for file in files:\n",
27
+ " file = file.split('/')[-1]\n",
28
+ " if 'test' in file:\n",
29
+ " test_len[file] = len(pd.read_csv(os.path.join(\"../../AVA_src/aesthetics_image_lists\",file), sep=\" \",header = None))\n",
30
+ " elif 'train' in file:\n",
31
+ " train_len[file] = len(pd.read_csv(os.path.join(\"../../AVA_src/aesthetics_image_lists\",file), sep=\" \",header = None))\n",
32
+ " else:\n",
33
+ " print(f\"Pass {file}\")"
34
+ ]
35
+ },
36
+ {
37
+ "cell_type": "code",
38
+ "execution_count": 61,
39
+ "id": "0d089d64",
40
+ "metadata": {},
41
+ "outputs": [
42
+ {
43
+ "name": "stdout",
44
+ "output_type": "stream",
45
+ "text": [
46
+ "cityscape_test.jpgl: 2500\n",
47
+ "portrait_test.jpgl: 2500\n",
48
+ "stilllife_test.jpgl: 2500\n",
49
+ "floral_test.jpgl: 2500\n",
50
+ "architecture_test.jpgl: 2500\n",
51
+ "animal_test.jpgl: 2500\n",
52
+ "generic_test.jpgl: 20000\n",
53
+ "landscape_test.jpgl: 2500\n",
54
+ "fooddrink_test.jpgl: 2500\n",
55
+ "\n",
56
+ "generic_ls_train.jpgl: 20000\n",
57
+ "portrait_train.jpgl: 2500\n",
58
+ "landscape_train.jpgl: 2500\n",
59
+ "architecture_train.jpgl: 2500\n",
60
+ "animal_train.jpgl: 2500\n",
61
+ "cityscape_train.jpgl: 2500\n",
62
+ "floral_train.jpgl: 2500\n",
63
+ "stilllife_train.jpgl: 2500\n",
64
+ "fooddrink_train.jpgl: 2500\n",
65
+ "generic_ss_train.jpgl: 2500\n",
66
+ "\n"
67
+ ]
68
+ }
69
+ ],
70
+ "source": [
71
+ "print(OmegaConf.to_yaml(test_len))\n",
72
+ "print(OmegaConf.to_yaml(train_len))"
73
+ ]
74
+ },
75
+ {
76
+ "cell_type": "code",
77
+ "execution_count": 62,
78
+ "id": "7e25c9f8",
79
+ "metadata": {},
80
+ "outputs": [],
81
+ "source": [
82
+ "test_len = {}\n",
83
+ "train_len = {}\n",
84
+ "files = glob.glob(\"../../AVA_src/style_image_lists/*.jpgl\")\n",
85
+ "for file in files:\n",
86
+ " file = file.split('/')[-1]\n",
87
+ " if 'test' in file:\n",
88
+ " test_len[file] = len(pd.read_csv(os.path.join(\"../../AVA_src/style_image_lists\",file), sep=\" \",header = None))\n",
89
+ " elif 'train' in file:\n",
90
+ " train_len[file] = len(pd.read_csv(os.path.join(\"../../AVA_src/style_image_lists\",file), sep=\" \",header = None))\n",
91
+ " else:\n",
92
+ " print(f\"Pass {file}\")"
93
+ ]
94
+ },
95
+ {
96
+ "cell_type": "code",
97
+ "execution_count": 63,
98
+ "id": "86ff27df",
99
+ "metadata": {},
100
+ "outputs": [
101
+ {
102
+ "name": "stdout",
103
+ "output_type": "stream",
104
+ "text": [
105
+ "test.jpgl: 2809\n",
106
+ "\n",
107
+ "train.jpgl: 11270\n",
108
+ "\n"
109
+ ]
110
+ }
111
+ ],
112
+ "source": [
113
+ "print(OmegaConf.to_yaml(test_len))\n",
114
+ "print(OmegaConf.to_yaml(train_len))"
115
+ ]
116
+ }
117
+ ],
118
+ "metadata": {
119
+ "kernelspec": {
120
+ "display_name": "huggingface",
121
+ "language": "python",
122
+ "name": "huggingface"
123
+ },
124
+ "language_info": {
125
+ "codemirror_mode": {
126
+ "name": "ipython",
127
+ "version": 3
128
+ },
129
+ "file_extension": ".py",
130
+ "mimetype": "text/x-python",
131
+ "name": "python",
132
+ "nbconvert_exporter": "python",
133
+ "pygments_lexer": "ipython3",
134
+ "version": "3.8.15"
135
+ },
136
+ "varInspector": {
137
+ "cols": {
138
+ "lenName": 16,
139
+ "lenType": 16,
140
+ "lenVar": 40
141
+ },
142
+ "kernels_config": {
143
+ "python": {
144
+ "delete_cmd_postfix": "",
145
+ "delete_cmd_prefix": "del ",
146
+ "library": "var_list.py",
147
+ "varRefreshCmd": "print(var_dic_list())"
148
+ },
149
+ "r": {
150
+ "delete_cmd_postfix": ") ",
151
+ "delete_cmd_prefix": "rm(",
152
+ "library": "var_list.r",
153
+ "varRefreshCmd": "cat(var_dic_list()) "
154
+ }
155
+ },
156
+ "types_to_exclude": [
157
+ "module",
158
+ "function",
159
+ "builtin_function_or_method",
160
+ "instance",
161
+ "_Feature"
162
+ ],
163
+ "window_display": false
164
+ }
165
+ },
166
+ "nbformat": 4,
167
+ "nbformat_minor": 5
168
+ }
notebooks/.ipynb_checkpoints/Test-checkpoint.ipynb ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [],
3
+ "metadata": {},
4
+ "nbformat": 4,
5
+ "nbformat_minor": 5
6
+ }
notebooks/EDA.ipynb ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 60,
6
+ "id": "0dbc59b3",
7
+ "metadata": {},
8
+ "outputs": [],
9
+ "source": [
10
+ "import pandas as pd\n",
11
+ "import os\n",
12
+ "import glob\n",
13
+ "from omegaconf import OmegaConf"
14
+ ]
15
+ },
16
+ {
17
+ "cell_type": "code",
18
+ "execution_count": 58,
19
+ "id": "1fac2763",
20
+ "metadata": {},
21
+ "outputs": [],
22
+ "source": [
23
+ "test_len = {}\n",
24
+ "train_len = {}\n",
25
+ "files = glob.glob(\"../../AVA_src/aesthetics_image_lists/*.jpgl\")\n",
26
+ "for file in files:\n",
27
+ " file = file.split('/')[-1]\n",
28
+ " if 'test' in file:\n",
29
+ " test_len[file] = len(pd.read_csv(os.path.join(\"../../AVA_src/aesthetics_image_lists\",file), sep=\" \",header = None))\n",
30
+ " elif 'train' in file:\n",
31
+ " train_len[file] = len(pd.read_csv(os.path.join(\"../../AVA_src/aesthetics_image_lists\",file), sep=\" \",header = None))\n",
32
+ " else:\n",
33
+ " print(f\"Pass {file}\")"
34
+ ]
35
+ },
36
+ {
37
+ "cell_type": "code",
38
+ "execution_count": 61,
39
+ "id": "0d089d64",
40
+ "metadata": {},
41
+ "outputs": [
42
+ {
43
+ "name": "stdout",
44
+ "output_type": "stream",
45
+ "text": [
46
+ "cityscape_test.jpgl: 2500\n",
47
+ "portrait_test.jpgl: 2500\n",
48
+ "stilllife_test.jpgl: 2500\n",
49
+ "floral_test.jpgl: 2500\n",
50
+ "architecture_test.jpgl: 2500\n",
51
+ "animal_test.jpgl: 2500\n",
52
+ "generic_test.jpgl: 20000\n",
53
+ "landscape_test.jpgl: 2500\n",
54
+ "fooddrink_test.jpgl: 2500\n",
55
+ "\n",
56
+ "generic_ls_train.jpgl: 20000\n",
57
+ "portrait_train.jpgl: 2500\n",
58
+ "landscape_train.jpgl: 2500\n",
59
+ "architecture_train.jpgl: 2500\n",
60
+ "animal_train.jpgl: 2500\n",
61
+ "cityscape_train.jpgl: 2500\n",
62
+ "floral_train.jpgl: 2500\n",
63
+ "stilllife_train.jpgl: 2500\n",
64
+ "fooddrink_train.jpgl: 2500\n",
65
+ "generic_ss_train.jpgl: 2500\n",
66
+ "\n"
67
+ ]
68
+ }
69
+ ],
70
+ "source": [
71
+ "print(OmegaConf.to_yaml(test_len))\n",
72
+ "print(OmegaConf.to_yaml(train_len))"
73
+ ]
74
+ },
75
+ {
76
+ "cell_type": "code",
77
+ "execution_count": 62,
78
+ "id": "7e25c9f8",
79
+ "metadata": {},
80
+ "outputs": [],
81
+ "source": [
82
+ "test_len = {}\n",
83
+ "train_len = {}\n",
84
+ "files = glob.glob(\"../../AVA_src/style_image_lists/*.jpgl\")\n",
85
+ "for file in files:\n",
86
+ " file = file.split('/')[-1]\n",
87
+ " if 'test' in file:\n",
88
+ " test_len[file] = len(pd.read_csv(os.path.join(\"../../AVA_src/style_image_lists\",file), sep=\" \",header = None))\n",
89
+ " elif 'train' in file:\n",
90
+ " train_len[file] = len(pd.read_csv(os.path.join(\"../../AVA_src/style_image_lists\",file), sep=\" \",header = None))\n",
91
+ " else:\n",
92
+ " print(f\"Pass {file}\")"
93
+ ]
94
+ },
95
+ {
96
+ "cell_type": "code",
97
+ "execution_count": 63,
98
+ "id": "86ff27df",
99
+ "metadata": {},
100
+ "outputs": [
101
+ {
102
+ "name": "stdout",
103
+ "output_type": "stream",
104
+ "text": [
105
+ "test.jpgl: 2809\n",
106
+ "\n",
107
+ "train.jpgl: 11270\n",
108
+ "\n"
109
+ ]
110
+ }
111
+ ],
112
+ "source": [
113
+ "print(OmegaConf.to_yaml(test_len))\n",
114
+ "print(OmegaConf.to_yaml(train_len))"
115
+ ]
116
+ }
117
+ ],
118
+ "metadata": {
119
+ "kernelspec": {
120
+ "display_name": "huggingface",
121
+ "language": "python",
122
+ "name": "huggingface"
123
+ },
124
+ "language_info": {
125
+ "codemirror_mode": {
126
+ "name": "ipython",
127
+ "version": 3
128
+ },
129
+ "file_extension": ".py",
130
+ "mimetype": "text/x-python",
131
+ "name": "python",
132
+ "nbconvert_exporter": "python",
133
+ "pygments_lexer": "ipython3",
134
+ "version": "3.8.15"
135
+ },
136
+ "varInspector": {
137
+ "cols": {
138
+ "lenName": 16,
139
+ "lenType": 16,
140
+ "lenVar": 40
141
+ },
142
+ "kernels_config": {
143
+ "python": {
144
+ "delete_cmd_postfix": "",
145
+ "delete_cmd_prefix": "del ",
146
+ "library": "var_list.py",
147
+ "varRefreshCmd": "print(var_dic_list())"
148
+ },
149
+ "r": {
150
+ "delete_cmd_postfix": ") ",
151
+ "delete_cmd_prefix": "rm(",
152
+ "library": "var_list.r",
153
+ "varRefreshCmd": "cat(var_dic_list()) "
154
+ }
155
+ },
156
+ "types_to_exclude": [
157
+ "module",
158
+ "function",
159
+ "builtin_function_or_method",
160
+ "instance",
161
+ "_Feature"
162
+ ],
163
+ "window_display": false
164
+ }
165
+ },
166
+ "nbformat": 4,
167
+ "nbformat_minor": 5
168
+ }
notebooks/Test.ipynb ADDED
@@ -0,0 +1,1095 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 5,
6
+ "id": "aef315bf",
7
+ "metadata": {},
8
+ "outputs": [],
9
+ "source": [
10
+ "import os\n",
11
+ "import PIL\n",
12
+ "x = os.listdir(\"../../AVA_src/images/images\")"
13
+ ]
14
+ },
15
+ {
16
+ "cell_type": "code",
17
+ "execution_count": 6,
18
+ "id": "c0ed6498",
19
+ "metadata": {},
20
+ "outputs": [
21
+ {
22
+ "data": {
23
+ "text/plain": [
24
+ "['900120.jpg',\n",
25
+ " '653812.jpg',\n",
26
+ " '31000.jpg',\n",
27
+ " '127554.jpg',\n",
28
+ " '84651.jpg',\n",
29
+ " '667856.jpg',\n",
30
+ " '949022.jpg',\n",
31
+ " '675774.jpg',\n",
32
+ " '36035.jpg',\n",
33
+ " '416199.jpg',\n",
34
+ " '170503.jpg',\n",
35
+ " '853927.jpg',\n",
36
+ " '9033.jpg',\n",
37
+ " '663133.jpg',\n",
38
+ " '940947.jpg',\n",
39
+ " '906756.jpg',\n",
40
+ " '10969.jpg',\n",
41
+ " '814417.jpg',\n",
42
+ " '875360.jpg',\n",
43
+ " '48406.jpg',\n",
44
+ " '816877.jpg',\n",
45
+ " '681677.jpg',\n",
46
+ " '63128.jpg',\n",
47
+ " '485647.jpg',\n",
48
+ " '131351.jpg',\n",
49
+ " '323066.jpg',\n",
50
+ " '18720.jpg',\n",
51
+ " '545139.jpg',\n",
52
+ " '321204.jpg',\n",
53
+ " '471424.jpg',\n",
54
+ " '841691.jpg',\n",
55
+ " '510821.jpg',\n",
56
+ " '434379.jpg',\n",
57
+ " '767816.jpg',\n",
58
+ " '859727.jpg',\n",
59
+ " '624936.jpg',\n",
60
+ " '740483.jpg',\n",
61
+ " '772281.jpg',\n",
62
+ " '229736.jpg',\n",
63
+ " '30715.jpg',\n",
64
+ " '215795.jpg',\n",
65
+ " '216453.jpg',\n",
66
+ " '390411.jpg',\n",
67
+ " '245610.jpg',\n",
68
+ " '447912.jpg',\n",
69
+ " '116348.jpg',\n",
70
+ " '361956.jpg',\n",
71
+ " '878288.jpg',\n",
72
+ " '689095.jpg',\n",
73
+ " '245090.jpg',\n",
74
+ " '917107.jpg',\n",
75
+ " '22108.jpg',\n",
76
+ " '854563.jpg',\n",
77
+ " '281896.jpg',\n",
78
+ " '664648.jpg',\n",
79
+ " '930413.jpg',\n",
80
+ " '339729.jpg',\n",
81
+ " '137190.jpg',\n",
82
+ " '431861.jpg',\n",
83
+ " '296335.jpg',\n",
84
+ " '782248.jpg',\n",
85
+ " '338603.jpg',\n",
86
+ " '760710.jpg',\n",
87
+ " '600840.jpg',\n",
88
+ " '143094.jpg',\n",
89
+ " '483744.jpg',\n",
90
+ " '349608.jpg',\n",
91
+ " '40362.jpg',\n",
92
+ " '474376.jpg',\n",
93
+ " '761917.jpg',\n",
94
+ " '202451.jpg',\n",
95
+ " '660547.jpg',\n",
96
+ " '23448.jpg',\n",
97
+ " '377590.jpg',\n",
98
+ " '199417.jpg',\n",
99
+ " '294290.jpg',\n",
100
+ " '541986.jpg',\n",
101
+ " '455473.jpg',\n",
102
+ " '388836.jpg',\n",
103
+ " '815873.jpg',\n",
104
+ " '172072.jpg',\n",
105
+ " '481799.jpg',\n",
106
+ " '693903.jpg',\n",
107
+ " '276301.jpg',\n",
108
+ " '926544.jpg',\n",
109
+ " '777097.jpg',\n",
110
+ " '624913.jpg',\n",
111
+ " '787554.jpg',\n",
112
+ " '647912.jpg',\n",
113
+ " '321211.jpg',\n",
114
+ " '797886.jpg',\n",
115
+ " '153345.jpg',\n",
116
+ " '106326.jpg',\n",
117
+ " '762575.jpg',\n",
118
+ " '755310.jpg',\n",
119
+ " '626680.jpg',\n",
120
+ " '252350.jpg',\n",
121
+ " '137791.jpg',\n",
122
+ " '278198.jpg',\n",
123
+ " '135346.jpg',\n",
124
+ " '231095.jpg',\n",
125
+ " '209608.jpg',\n",
126
+ " '490578.jpg',\n",
127
+ " '550354.jpg',\n",
128
+ " '545582.jpg',\n",
129
+ " '585768.jpg',\n",
130
+ " '5294.jpg',\n",
131
+ " '490559.jpg',\n",
132
+ " '382709.jpg',\n",
133
+ " '46089.jpg',\n",
134
+ " '578165.jpg',\n",
135
+ " '384907.jpg',\n",
136
+ " '357355.jpg',\n",
137
+ " '534372.jpg',\n",
138
+ " '62120.jpg',\n",
139
+ " '512541.jpg',\n",
140
+ " '703535.jpg',\n",
141
+ " '368434.jpg',\n",
142
+ " '64409.jpg',\n",
143
+ " '779652.jpg',\n",
144
+ " '388788.jpg',\n",
145
+ " '393240.jpg',\n",
146
+ " '827307.jpg',\n",
147
+ " '716395.jpg',\n",
148
+ " '805045.jpg',\n",
149
+ " '558869.jpg',\n",
150
+ " '628269.jpg',\n",
151
+ " '47018.jpg',\n",
152
+ " '803012.jpg',\n",
153
+ " '81732.jpg',\n",
154
+ " '473376.jpg',\n",
155
+ " '116595.jpg',\n",
156
+ " '787642.jpg',\n",
157
+ " '463522.jpg',\n",
158
+ " '693929.jpg',\n",
159
+ " '415117.jpg',\n",
160
+ " '878847.jpg',\n",
161
+ " '260487.jpg',\n",
162
+ " '557995.jpg',\n",
163
+ " '824356.jpg',\n",
164
+ " '573905.jpg',\n",
165
+ " '626056.jpg',\n",
166
+ " '412615.jpg',\n",
167
+ " '15965.jpg',\n",
168
+ " '141838.jpg',\n",
169
+ " '450602.jpg',\n",
170
+ " '301383.jpg',\n",
171
+ " '73783.jpg',\n",
172
+ " '147295.jpg',\n",
173
+ " '437576.jpg',\n",
174
+ " '451524.jpg',\n",
175
+ " '823700.jpg',\n",
176
+ " '676572.jpg',\n",
177
+ " '782374.jpg',\n",
178
+ " '160514.jpg',\n",
179
+ " '915730.jpg',\n",
180
+ " '429072.jpg',\n",
181
+ " '361962.jpg',\n",
182
+ " '121666.jpg',\n",
183
+ " '940766.jpg',\n",
184
+ " '898003.jpg',\n",
185
+ " '304139.jpg',\n",
186
+ " '483804.jpg',\n",
187
+ " '772489.jpg',\n",
188
+ " '204772.jpg',\n",
189
+ " '706932.jpg',\n",
190
+ " '158403.jpg',\n",
191
+ " '414648.jpg',\n",
192
+ " '499255.jpg',\n",
193
+ " '656288.jpg',\n",
194
+ " '879422.jpg',\n",
195
+ " '362048.jpg',\n",
196
+ " '99119.jpg',\n",
197
+ " '167545.jpg',\n",
198
+ " '838635.jpg',\n",
199
+ " '750893.jpg',\n",
200
+ " '41747.jpg',\n",
201
+ " '570103.jpg',\n",
202
+ " '200448.jpg',\n",
203
+ " '830465.jpg',\n",
204
+ " '39738.jpg',\n",
205
+ " '132157.jpg',\n",
206
+ " '333878.jpg',\n",
207
+ " '722861.jpg',\n",
208
+ " '783742.jpg',\n",
209
+ " '460074.jpg',\n",
210
+ " '955413.jpg',\n",
211
+ " '509425.jpg',\n",
212
+ " '377243.jpg',\n",
213
+ " '529118.jpg',\n",
214
+ " '903670.jpg',\n",
215
+ " '657027.jpg',\n",
216
+ " '301066.jpg',\n",
217
+ " '857180.jpg',\n",
218
+ " '6243.jpg',\n",
219
+ " '562465.jpg',\n",
220
+ " '81903.jpg',\n",
221
+ " '8607.jpg',\n",
222
+ " '589355.jpg',\n",
223
+ " '548072.jpg',\n",
224
+ " '48367.jpg',\n",
225
+ " '707367.jpg',\n",
226
+ " '811579.jpg',\n",
227
+ " '619435.jpg',\n",
228
+ " '170148.jpg',\n",
229
+ " '652006.jpg',\n",
230
+ " '645576.jpg',\n",
231
+ " '102609.jpg',\n",
232
+ " '455877.jpg',\n",
233
+ " '947810.jpg',\n",
234
+ " '768184.jpg',\n",
235
+ " '421097.jpg',\n",
236
+ " '832542.jpg',\n",
237
+ " '116490.jpg',\n",
238
+ " '153121.jpg',\n",
239
+ " '141355.jpg',\n",
240
+ " '846225.jpg',\n",
241
+ " '659546.jpg',\n",
242
+ " '861064.jpg',\n",
243
+ " '810997.jpg',\n",
244
+ " '264734.jpg',\n",
245
+ " '310428.jpg',\n",
246
+ " '229941.jpg',\n",
247
+ " '344254.jpg',\n",
248
+ " '662468.jpg',\n",
249
+ " '127786.jpg',\n",
250
+ " '428566.jpg',\n",
251
+ " '43438.jpg',\n",
252
+ " '835003.jpg',\n",
253
+ " '305089.jpg',\n",
254
+ " '62777.jpg',\n",
255
+ " '134951.jpg',\n",
256
+ " '450674.jpg',\n",
257
+ " '260875.jpg',\n",
258
+ " '546206.jpg',\n",
259
+ " '306206.jpg',\n",
260
+ " '451950.jpg',\n",
261
+ " '360281.jpg',\n",
262
+ " '920033.jpg',\n",
263
+ " '150128.jpg',\n",
264
+ " '5912.jpg',\n",
265
+ " '758135.jpg',\n",
266
+ " '800259.jpg',\n",
267
+ " '315786.jpg',\n",
268
+ " '896216.jpg',\n",
269
+ " '203399.jpg',\n",
270
+ " '699565.jpg',\n",
271
+ " '791819.jpg',\n",
272
+ " '37198.jpg',\n",
273
+ " '885809.jpg',\n",
274
+ " '912169.jpg',\n",
275
+ " '358363.jpg',\n",
276
+ " '674499.jpg',\n",
277
+ " '431761.jpg',\n",
278
+ " '775722.jpg',\n",
279
+ " '438101.jpg',\n",
280
+ " '147204.jpg',\n",
281
+ " '305359.jpg',\n",
282
+ " '540259.jpg',\n",
283
+ " '624770.jpg',\n",
284
+ " '391317.jpg',\n",
285
+ " '726664.jpg',\n",
286
+ " '437777.jpg',\n",
287
+ " '1620.jpg',\n",
288
+ " '746913.jpg',\n",
289
+ " '128713.jpg',\n",
290
+ " '641581.jpg',\n",
291
+ " '647993.jpg',\n",
292
+ " '68502.jpg',\n",
293
+ " '527645.jpg',\n",
294
+ " '676199.jpg',\n",
295
+ " '850908.jpg',\n",
296
+ " '470329.jpg',\n",
297
+ " '490800.jpg',\n",
298
+ " '789916.jpg',\n",
299
+ " '907668.jpg',\n",
300
+ " '732570.jpg',\n",
301
+ " '928252.jpg',\n",
302
+ " '803561.jpg',\n",
303
+ " '737505.jpg',\n",
304
+ " '199281.jpg',\n",
305
+ " '4552.jpg',\n",
306
+ " '574569.jpg',\n",
307
+ " '408190.jpg',\n",
308
+ " '246123.jpg',\n",
309
+ " '504275.jpg',\n",
310
+ " '147259.jpg',\n",
311
+ " '564300.jpg',\n",
312
+ " '917758.jpg',\n",
313
+ " '206525.jpg',\n",
314
+ " '169783.jpg',\n",
315
+ " '761582.jpg',\n",
316
+ " '128208.jpg',\n",
317
+ " '22084.jpg',\n",
318
+ " '429897.jpg',\n",
319
+ " '230390.jpg',\n",
320
+ " '480101.jpg',\n",
321
+ " '3753.jpg',\n",
322
+ " '555784.jpg',\n",
323
+ " '620539.jpg',\n",
324
+ " '776142.jpg',\n",
325
+ " '943587.jpg',\n",
326
+ " '949209.jpg',\n",
327
+ " '305545.jpg',\n",
328
+ " '572517.jpg',\n",
329
+ " '383695.jpg',\n",
330
+ " '424010.jpg',\n",
331
+ " '242038.jpg',\n",
332
+ " '193048.jpg',\n",
333
+ " '137821.jpg',\n",
334
+ " '656551.jpg',\n",
335
+ " '14852.jpg',\n",
336
+ " '288284.jpg',\n",
337
+ " '749110.jpg',\n",
338
+ " '24289.jpg',\n",
339
+ " '386259.jpg',\n",
340
+ " '707155.jpg',\n",
341
+ " '789818.jpg',\n",
342
+ " '735163.jpg',\n",
343
+ " '739566.jpg',\n",
344
+ " '575071.jpg',\n",
345
+ " '722757.jpg',\n",
346
+ " '331625.jpg',\n",
347
+ " '423806.jpg',\n",
348
+ " '579340.jpg',\n",
349
+ " '634186.jpg',\n",
350
+ " '271881.jpg',\n",
351
+ " '427223.jpg',\n",
352
+ " '103708.jpg',\n",
353
+ " '765955.jpg',\n",
354
+ " '52135.jpg',\n",
355
+ " '31707.jpg',\n",
356
+ " '83474.jpg',\n",
357
+ " '276642.jpg',\n",
358
+ " '383251.jpg',\n",
359
+ " '73903.jpg',\n",
360
+ " '273563.jpg',\n",
361
+ " '895851.jpg',\n",
362
+ " '30194.jpg',\n",
363
+ " '458093.jpg',\n",
364
+ " '487590.jpg',\n",
365
+ " '815809.jpg',\n",
366
+ " '354619.jpg',\n",
367
+ " '385950.jpg',\n",
368
+ " '938287.jpg',\n",
369
+ " '612981.jpg',\n",
370
+ " '605507.jpg',\n",
371
+ " '684267.jpg',\n",
372
+ " '674407.jpg',\n",
373
+ " '879342.jpg',\n",
374
+ " '297979.jpg',\n",
375
+ " '527148.jpg',\n",
376
+ " '319788.jpg',\n",
377
+ " '490433.jpg',\n",
378
+ " '809998.jpg',\n",
379
+ " '9020.jpg',\n",
380
+ " '61379.jpg',\n",
381
+ " '8973.jpg',\n",
382
+ " '496049.jpg',\n",
383
+ " '831023.jpg',\n",
384
+ " '784951.jpg',\n",
385
+ " '820765.jpg',\n",
386
+ " '780234.jpg',\n",
387
+ " '238879.jpg',\n",
388
+ " '214780.jpg',\n",
389
+ " '526913.jpg',\n",
390
+ " '210734.jpg',\n",
391
+ " '807272.jpg',\n",
392
+ " '356297.jpg',\n",
393
+ " '907857.jpg',\n",
394
+ " '493256.jpg',\n",
395
+ " '821532.jpg',\n",
396
+ " '773583.jpg',\n",
397
+ " '245432.jpg',\n",
398
+ " '913149.jpg',\n",
399
+ " '496038.jpg',\n",
400
+ " '306318.jpg',\n",
401
+ " '765048.jpg',\n",
402
+ " '223264.jpg',\n",
403
+ " '886257.jpg',\n",
404
+ " '361199.jpg',\n",
405
+ " '466325.jpg',\n",
406
+ " '517889.jpg',\n",
407
+ " '364447.jpg',\n",
408
+ " '188261.jpg',\n",
409
+ " '474457.jpg',\n",
410
+ " '716995.jpg',\n",
411
+ " '486988.jpg',\n",
412
+ " '86742.jpg',\n",
413
+ " '871486.jpg',\n",
414
+ " '424120.jpg',\n",
415
+ " '434382.jpg',\n",
416
+ " '404554.jpg',\n",
417
+ " '933033.jpg',\n",
418
+ " '139182.jpg',\n",
419
+ " '323026.jpg',\n",
420
+ " '72123.jpg',\n",
421
+ " '849606.jpg',\n",
422
+ " '828630.jpg',\n",
423
+ " '81973.jpg',\n",
424
+ " '48202.jpg',\n",
425
+ " '776777.jpg',\n",
426
+ " '332488.jpg',\n",
427
+ " '397470.jpg',\n",
428
+ " '829618.jpg',\n",
429
+ " '929671.jpg',\n",
430
+ " '605730.jpg',\n",
431
+ " '598217.jpg',\n",
432
+ " '160774.jpg',\n",
433
+ " '6118.jpg',\n",
434
+ " '5243.jpg',\n",
435
+ " '317154.jpg',\n",
436
+ " '501767.jpg',\n",
437
+ " '771524.jpg',\n",
438
+ " '114670.jpg',\n",
439
+ " '33926.jpg',\n",
440
+ " '650119.jpg',\n",
441
+ " '273572.jpg',\n",
442
+ " '82102.jpg',\n",
443
+ " '811010.jpg',\n",
444
+ " '390101.jpg',\n",
445
+ " '587381.jpg',\n",
446
+ " '669864.jpg',\n",
447
+ " '253888.jpg',\n",
448
+ " '858837.jpg',\n",
449
+ " '847650.jpg',\n",
450
+ " '934840.jpg',\n",
451
+ " '17479.jpg',\n",
452
+ " '593835.jpg',\n",
453
+ " '810654.jpg',\n",
454
+ " '375249.jpg',\n",
455
+ " '546176.jpg',\n",
456
+ " '468704.jpg',\n",
457
+ " '423562.jpg',\n",
458
+ " '430024.jpg',\n",
459
+ " '528185.jpg',\n",
460
+ " '444601.jpg',\n",
461
+ " '886671.jpg',\n",
462
+ " '506185.jpg',\n",
463
+ " '539090.jpg',\n",
464
+ " '102797.jpg',\n",
465
+ " '812014.jpg',\n",
466
+ " '570364.jpg',\n",
467
+ " '497765.jpg',\n",
468
+ " '281317.jpg',\n",
469
+ " '926478.jpg',\n",
470
+ " '382055.jpg',\n",
471
+ " '367621.jpg',\n",
472
+ " '65209.jpg',\n",
473
+ " '136760.jpg',\n",
474
+ " '400357.jpg',\n",
475
+ " '239371.jpg',\n",
476
+ " '66039.jpg',\n",
477
+ " '741397.jpg',\n",
478
+ " '355902.jpg',\n",
479
+ " '387096.jpg',\n",
480
+ " '58000.jpg',\n",
481
+ " '60462.jpg',\n",
482
+ " '8853.jpg',\n",
483
+ " '913065.jpg',\n",
484
+ " '582937.jpg',\n",
485
+ " '767628.jpg',\n",
486
+ " '254593.jpg',\n",
487
+ " '106811.jpg',\n",
488
+ " '312118.jpg',\n",
489
+ " '846723.jpg',\n",
490
+ " '723845.jpg',\n",
491
+ " '300627.jpg',\n",
492
+ " '927670.jpg',\n",
493
+ " '232911.jpg',\n",
494
+ " '443356.jpg',\n",
495
+ " '920400.jpg',\n",
496
+ " '703540.jpg',\n",
497
+ " '3861.jpg',\n",
498
+ " '757771.jpg',\n",
499
+ " '430748.jpg',\n",
500
+ " '282122.jpg',\n",
501
+ " '788553.jpg',\n",
502
+ " '55080.jpg',\n",
503
+ " '768517.jpg',\n",
504
+ " '729092.jpg',\n",
505
+ " '155688.jpg',\n",
506
+ " '66230.jpg',\n",
507
+ " '196236.jpg',\n",
508
+ " '372904.jpg',\n",
509
+ " '738500.jpg',\n",
510
+ " '940280.jpg',\n",
511
+ " '102106.jpg',\n",
512
+ " '203393.jpg',\n",
513
+ " '354532.jpg',\n",
514
+ " '907582.jpg',\n",
515
+ " '867053.jpg',\n",
516
+ " '940676.jpg',\n",
517
+ " '44419.jpg',\n",
518
+ " '149574.jpg',\n",
519
+ " '217766.jpg',\n",
520
+ " '144297.jpg',\n",
521
+ " '104073.jpg',\n",
522
+ " '637114.jpg',\n",
523
+ " '878450.jpg',\n",
524
+ " '340448.jpg',\n",
525
+ " '579579.jpg',\n",
526
+ " '58236.jpg',\n",
527
+ " '72295.jpg',\n",
528
+ " '890400.jpg',\n",
529
+ " '206818.jpg',\n",
530
+ " '274896.jpg',\n",
531
+ " '811556.jpg',\n",
532
+ " '13693.jpg',\n",
533
+ " '641959.jpg',\n",
534
+ " '202974.jpg',\n",
535
+ " '921397.jpg',\n",
536
+ " '183966.jpg',\n",
537
+ " '678582.jpg',\n",
538
+ " '753228.jpg',\n",
539
+ " '85269.jpg',\n",
540
+ " '743094.jpg',\n",
541
+ " '471155.jpg',\n",
542
+ " '582548.jpg',\n",
543
+ " '802347.jpg',\n",
544
+ " '822921.jpg',\n",
545
+ " '951259.jpg',\n",
546
+ " '914228.jpg',\n",
547
+ " '902965.jpg',\n",
548
+ " '934026.jpg',\n",
549
+ " '573833.jpg',\n",
550
+ " '497942.jpg',\n",
551
+ " '291801.jpg',\n",
552
+ " '1927.jpg',\n",
553
+ " '384138.jpg',\n",
554
+ " '26739.jpg',\n",
555
+ " '430849.jpg',\n",
556
+ " '3916.jpg',\n",
557
+ " '301250.jpg',\n",
558
+ " '647854.jpg',\n",
559
+ " '234311.jpg',\n",
560
+ " '82157.jpg',\n",
561
+ " '37440.jpg',\n",
562
+ " '356892.jpg',\n",
563
+ " '324335.jpg',\n",
564
+ " '423468.jpg',\n",
565
+ " '777095.jpg',\n",
566
+ " '754661.jpg',\n",
567
+ " '883615.jpg',\n",
568
+ " '313551.jpg',\n",
569
+ " '388794.jpg',\n",
570
+ " '733351.jpg',\n",
571
+ " '952087.jpg',\n",
572
+ " '449212.jpg',\n",
573
+ " '261070.jpg',\n",
574
+ " '536891.jpg',\n",
575
+ " '795200.jpg',\n",
576
+ " '885798.jpg',\n",
577
+ " '38011.jpg',\n",
578
+ " '443661.jpg',\n",
579
+ " '290508.jpg',\n",
580
+ " '13417.jpg',\n",
581
+ " '350023.jpg',\n",
582
+ " '120122.jpg',\n",
583
+ " '300412.jpg',\n",
584
+ " '913890.jpg',\n",
585
+ " '834260.jpg',\n",
586
+ " '182580.jpg',\n",
587
+ " '473826.jpg',\n",
588
+ " '868967.jpg',\n",
589
+ " '454120.jpg',\n",
590
+ " '18084.jpg',\n",
591
+ " '596735.jpg',\n",
592
+ " '34886.jpg',\n",
593
+ " '23308.jpg',\n",
594
+ " '364954.jpg',\n",
595
+ " '463536.jpg',\n",
596
+ " '701096.jpg',\n",
597
+ " '480763.jpg',\n",
598
+ " '49762.jpg',\n",
599
+ " '66672.jpg',\n",
600
+ " '10610.jpg',\n",
601
+ " '16574.jpg',\n",
602
+ " '592748.jpg',\n",
603
+ " '521444.jpg',\n",
604
+ " '618181.jpg',\n",
605
+ " '19722.jpg',\n",
606
+ " '58799.jpg',\n",
607
+ " '733966.jpg',\n",
608
+ " '934147.jpg',\n",
609
+ " '272421.jpg',\n",
610
+ " '800866.jpg',\n",
611
+ " '504146.jpg',\n",
612
+ " '491258.jpg',\n",
613
+ " '778531.jpg',\n",
614
+ " '40855.jpg',\n",
615
+ " '424269.jpg',\n",
616
+ " '437860.jpg',\n",
617
+ " '185658.jpg',\n",
618
+ " '941810.jpg',\n",
619
+ " '165345.jpg',\n",
620
+ " '64494.jpg',\n",
621
+ " '562557.jpg',\n",
622
+ " '7499.jpg',\n",
623
+ " '326260.jpg',\n",
624
+ " '572428.jpg',\n",
625
+ " '764613.jpg',\n",
626
+ " '734545.jpg',\n",
627
+ " '540110.jpg',\n",
628
+ " '252553.jpg',\n",
629
+ " '427590.jpg',\n",
630
+ " '4197.jpg',\n",
631
+ " '77179.jpg',\n",
632
+ " '880268.jpg',\n",
633
+ " '516210.jpg',\n",
634
+ " '759762.jpg',\n",
635
+ " '923156.jpg',\n",
636
+ " '558518.jpg',\n",
637
+ " '99226.jpg',\n",
638
+ " '818652.jpg',\n",
639
+ " '270444.jpg',\n",
640
+ " '906805.jpg',\n",
641
+ " '473487.jpg',\n",
642
+ " '446299.jpg',\n",
643
+ " '273128.jpg',\n",
644
+ " '669429.jpg',\n",
645
+ " '560270.jpg',\n",
646
+ " '295529.jpg',\n",
647
+ " '112872.jpg',\n",
648
+ " '81712.jpg',\n",
649
+ " '45575.jpg',\n",
650
+ " '637428.jpg',\n",
651
+ " '79279.jpg',\n",
652
+ " '303171.jpg',\n",
653
+ " '905956.jpg',\n",
654
+ " '171269.jpg',\n",
655
+ " '719545.jpg',\n",
656
+ " '101206.jpg',\n",
657
+ " '431972.jpg',\n",
658
+ " '790564.jpg',\n",
659
+ " '893830.jpg',\n",
660
+ " '863416.jpg',\n",
661
+ " '255589.jpg',\n",
662
+ " '636707.jpg',\n",
663
+ " '669633.jpg',\n",
664
+ " '914577.jpg',\n",
665
+ " '40366.jpg',\n",
666
+ " '834974.jpg',\n",
667
+ " '137381.jpg',\n",
668
+ " '643148.jpg',\n",
669
+ " '271987.jpg',\n",
670
+ " '144327.jpg',\n",
671
+ " '561427.jpg',\n",
672
+ " '444524.jpg',\n",
673
+ " '938602.jpg',\n",
674
+ " '578566.jpg',\n",
675
+ " '779596.jpg',\n",
676
+ " '950016.jpg',\n",
677
+ " '829980.jpg',\n",
678
+ " '119257.jpg',\n",
679
+ " '719211.jpg',\n",
680
+ " '754147.jpg',\n",
681
+ " '618247.jpg',\n",
682
+ " '869837.jpg',\n",
683
+ " '7957.jpg',\n",
684
+ " '369001.jpg',\n",
685
+ " '326396.jpg',\n",
686
+ " '737378.jpg',\n",
687
+ " '905373.jpg',\n",
688
+ " '60505.jpg',\n",
689
+ " '66669.jpg',\n",
690
+ " '838058.jpg',\n",
691
+ " '721175.jpg',\n",
692
+ " '782095.jpg',\n",
693
+ " '46624.jpg',\n",
694
+ " '479016.jpg',\n",
695
+ " '627874.jpg',\n",
696
+ " '862478.jpg',\n",
697
+ " '872011.jpg',\n",
698
+ " '801871.jpg',\n",
699
+ " '503728.jpg',\n",
700
+ " '9689.jpg',\n",
701
+ " '31017.jpg',\n",
702
+ " '405474.jpg',\n",
703
+ " '813417.jpg',\n",
704
+ " '30891.jpg',\n",
705
+ " '14006.jpg',\n",
706
+ " '234264.jpg',\n",
707
+ " '859166.jpg',\n",
708
+ " '271564.jpg',\n",
709
+ " '516623.jpg',\n",
710
+ " '139337.jpg',\n",
711
+ " '876954.jpg',\n",
712
+ " '778321.jpg',\n",
713
+ " '775766.jpg',\n",
714
+ " '434766.jpg',\n",
715
+ " '774267.jpg',\n",
716
+ " '58333.jpg',\n",
717
+ " '226014.jpg',\n",
718
+ " '225864.jpg',\n",
719
+ " '681558.jpg',\n",
720
+ " '935609.jpg',\n",
721
+ " '181438.jpg',\n",
722
+ " '805709.jpg',\n",
723
+ " '902296.jpg',\n",
724
+ " '545433.jpg',\n",
725
+ " '732274.jpg',\n",
726
+ " '408214.jpg',\n",
727
+ " '120248.jpg',\n",
728
+ " '943754.jpg',\n",
729
+ " '625198.jpg',\n",
730
+ " '614459.jpg',\n",
731
+ " '127482.jpg',\n",
732
+ " '913136.jpg',\n",
733
+ " '673639.jpg',\n",
734
+ " '701144.jpg',\n",
735
+ " '13415.jpg',\n",
736
+ " '763944.jpg',\n",
737
+ " '797656.jpg',\n",
738
+ " '354158.jpg',\n",
739
+ " '465109.jpg',\n",
740
+ " '78090.jpg',\n",
741
+ " '949330.jpg',\n",
742
+ " '279206.jpg',\n",
743
+ " '349588.jpg',\n",
744
+ " '665538.jpg',\n",
745
+ " '633815.jpg',\n",
746
+ " '636005.jpg',\n",
747
+ " '391249.jpg',\n",
748
+ " '322643.jpg',\n",
749
+ " '1415.jpg',\n",
750
+ " '254150.jpg',\n",
751
+ " '473225.jpg',\n",
752
+ " '297735.jpg',\n",
753
+ " '803129.jpg',\n",
754
+ " '305165.jpg',\n",
755
+ " '309569.jpg',\n",
756
+ " '103823.jpg',\n",
757
+ " '598221.jpg',\n",
758
+ " '943998.jpg',\n",
759
+ " '373361.jpg',\n",
760
+ " '118740.jpg',\n",
761
+ " '770553.jpg',\n",
762
+ " '343510.jpg',\n",
763
+ " '547536.jpg',\n",
764
+ " '486639.jpg',\n",
765
+ " '529227.jpg',\n",
766
+ " '942775.jpg',\n",
767
+ " '550559.jpg',\n",
768
+ " '552643.jpg',\n",
769
+ " '619720.jpg',\n",
770
+ " '753394.jpg',\n",
771
+ " '59102.jpg',\n",
772
+ " '255444.jpg',\n",
773
+ " '103905.jpg',\n",
774
+ " '134564.jpg',\n",
775
+ " '319720.jpg',\n",
776
+ " '161739.jpg',\n",
777
+ " '245847.jpg',\n",
778
+ " '887528.jpg',\n",
779
+ " '461581.jpg',\n",
780
+ " '244821.jpg',\n",
781
+ " '346276.jpg',\n",
782
+ " '200794.jpg',\n",
783
+ " '223629.jpg',\n",
784
+ " '770315.jpg',\n",
785
+ " '692882.jpg',\n",
786
+ " '901511.jpg',\n",
787
+ " '954679.jpg',\n",
788
+ " '270930.jpg',\n",
789
+ " '321938.jpg',\n",
790
+ " '38324.jpg',\n",
791
+ " '855967.jpg',\n",
792
+ " '741007.jpg',\n",
793
+ " '94092.jpg',\n",
794
+ " '394388.jpg',\n",
795
+ " '113451.jpg',\n",
796
+ " '125151.jpg',\n",
797
+ " '485610.jpg',\n",
798
+ " '633108.jpg',\n",
799
+ " '70121.jpg',\n",
800
+ " '361206.jpg',\n",
801
+ " '570955.jpg',\n",
802
+ " '505544.jpg',\n",
803
+ " '930734.jpg',\n",
804
+ " '12386.jpg',\n",
805
+ " '130.jpg',\n",
806
+ " '423207.jpg',\n",
807
+ " '703169.jpg',\n",
808
+ " '526369.jpg',\n",
809
+ " '157597.jpg',\n",
810
+ " '350265.jpg',\n",
811
+ " '920968.jpg',\n",
812
+ " '384074.jpg',\n",
813
+ " '200227.jpg',\n",
814
+ " '711960.jpg',\n",
815
+ " '210705.jpg',\n",
816
+ " '591989.jpg',\n",
817
+ " '733391.jpg',\n",
818
+ " '169609.jpg',\n",
819
+ " '669613.jpg',\n",
820
+ " '391322.jpg',\n",
821
+ " '863851.jpg',\n",
822
+ " '334890.jpg',\n",
823
+ " '517908.jpg',\n",
824
+ " '65029.jpg',\n",
825
+ " '579316.jpg',\n",
826
+ " '559541.jpg',\n",
827
+ " '421059.jpg',\n",
828
+ " '391511.jpg',\n",
829
+ " '909922.jpg',\n",
830
+ " '265263.jpg',\n",
831
+ " '483842.jpg',\n",
832
+ " '802720.jpg',\n",
833
+ " '904538.jpg',\n",
834
+ " '830776.jpg',\n",
835
+ " '370.jpg',\n",
836
+ " '18556.jpg',\n",
837
+ " '501253.jpg',\n",
838
+ " '903659.jpg',\n",
839
+ " '732628.jpg',\n",
840
+ " '933863.jpg',\n",
841
+ " '897269.jpg',\n",
842
+ " '873653.jpg',\n",
843
+ " '489572.jpg',\n",
844
+ " '102676.jpg',\n",
845
+ " '674575.jpg',\n",
846
+ " '783960.jpg',\n",
847
+ " '791382.jpg',\n",
848
+ " '70750.jpg',\n",
849
+ " '12736.jpg',\n",
850
+ " '437815.jpg',\n",
851
+ " '882034.jpg',\n",
852
+ " '564109.jpg',\n",
853
+ " '516552.jpg',\n",
854
+ " '808946.jpg',\n",
855
+ " '945760.jpg',\n",
856
+ " '164600.jpg',\n",
857
+ " '680622.jpg',\n",
858
+ " '222035.jpg',\n",
859
+ " '163981.jpg',\n",
860
+ " '265664.jpg',\n",
861
+ " '563250.jpg',\n",
862
+ " '550424.jpg',\n",
863
+ " '386600.jpg',\n",
864
+ " '570335.jpg',\n",
865
+ " '76615.jpg',\n",
866
+ " '412065.jpg',\n",
867
+ " '946769.jpg',\n",
868
+ " '590265.jpg',\n",
869
+ " '398376.jpg',\n",
870
+ " '728541.jpg',\n",
871
+ " '814957.jpg',\n",
872
+ " '196226.jpg',\n",
873
+ " '147829.jpg',\n",
874
+ " '379583.jpg',\n",
875
+ " '605020.jpg',\n",
876
+ " '523135.jpg',\n",
877
+ " '701225.jpg',\n",
878
+ " '887034.jpg',\n",
879
+ " '318598.jpg',\n",
880
+ " '916494.jpg',\n",
881
+ " '10409.jpg',\n",
882
+ " '163083.jpg',\n",
883
+ " '719552.jpg',\n",
884
+ " '755891.jpg',\n",
885
+ " '134289.jpg',\n",
886
+ " '377205.jpg',\n",
887
+ " '165333.jpg',\n",
888
+ " '42880.jpg',\n",
889
+ " '35761.jpg',\n",
890
+ " '136395.jpg',\n",
891
+ " '47253.jpg',\n",
892
+ " '4413.jpg',\n",
893
+ " '879769.jpg',\n",
894
+ " '938284.jpg',\n",
895
+ " '726920.jpg',\n",
896
+ " '363890.jpg',\n",
897
+ " '161777.jpg',\n",
898
+ " '957584.jpg',\n",
899
+ " '263247.jpg',\n",
900
+ " '329168.jpg',\n",
901
+ " '523897.jpg',\n",
902
+ " '872348.jpg',\n",
903
+ " '846798.jpg',\n",
904
+ " '854161.jpg',\n",
905
+ " '292803.jpg',\n",
906
+ " '605728.jpg',\n",
907
+ " '56275.jpg',\n",
908
+ " '664482.jpg',\n",
909
+ " '328092.jpg',\n",
910
+ " '183874.jpg',\n",
911
+ " '886473.jpg',\n",
912
+ " '864068.jpg',\n",
913
+ " '511320.jpg',\n",
914
+ " '21455.jpg',\n",
915
+ " '820187.jpg',\n",
916
+ " '652267.jpg',\n",
917
+ " '651973.jpg',\n",
918
+ " '897174.jpg',\n",
919
+ " '265719.jpg',\n",
920
+ " '214810.jpg',\n",
921
+ " '164051.jpg',\n",
922
+ " '857226.jpg',\n",
923
+ " '555593.jpg',\n",
924
+ " '766054.jpg',\n",
925
+ " '443255.jpg',\n",
926
+ " '339413.jpg',\n",
927
+ " '842183.jpg',\n",
928
+ " '255115.jpg',\n",
929
+ " '743665.jpg',\n",
930
+ " '206531.jpg',\n",
931
+ " '599887.jpg',\n",
932
+ " '141446.jpg',\n",
933
+ " '24981.jpg',\n",
934
+ " '818477.jpg',\n",
935
+ " '535515.jpg',\n",
936
+ " '498983.jpg',\n",
937
+ " '19984.jpg',\n",
938
+ " '392304.jpg',\n",
939
+ " '639814.jpg',\n",
940
+ " '505636.jpg',\n",
941
+ " '467125.jpg',\n",
942
+ " '401198.jpg',\n",
943
+ " '909530.jpg',\n",
944
+ " '750255.jpg',\n",
945
+ " '308921.jpg',\n",
946
+ " '504470.jpg',\n",
947
+ " '174592.jpg',\n",
948
+ " '268859.jpg',\n",
949
+ " '3710.jpg',\n",
950
+ " '891121.jpg',\n",
951
+ " '76965.jpg',\n",
952
+ " '940579.jpg',\n",
953
+ " '368521.jpg',\n",
954
+ " '704001.jpg',\n",
955
+ " '464436.jpg',\n",
956
+ " '94878.jpg',\n",
957
+ " '941500.jpg',\n",
958
+ " '8831.jpg',\n",
959
+ " '938378.jpg',\n",
960
+ " '35618.jpg',\n",
961
+ " '253018.jpg',\n",
962
+ " '9788.jpg',\n",
963
+ " '339663.jpg',\n",
964
+ " '205801.jpg',\n",
965
+ " '590534.jpg',\n",
966
+ " '811662.jpg',\n",
967
+ " '957337.jpg',\n",
968
+ " '949008.jpg',\n",
969
+ " '891115.jpg',\n",
970
+ " '832943.jpg',\n",
971
+ " '835970.jpg',\n",
972
+ " '286851.jpg',\n",
973
+ " '538271.jpg',\n",
974
+ " '638299.jpg',\n",
975
+ " '391301.jpg',\n",
976
+ " '909436.jpg',\n",
977
+ " '480520.jpg',\n",
978
+ " '400473.jpg',\n",
979
+ " '396724.jpg',\n",
980
+ " '792008.jpg',\n",
981
+ " '544088.jpg',\n",
982
+ " '121238.jpg',\n",
983
+ " '754983.jpg',\n",
984
+ " '640254.jpg',\n",
985
+ " '316902.jpg',\n",
986
+ " '659074.jpg',\n",
987
+ " '150344.jpg',\n",
988
+ " '294816.jpg',\n",
989
+ " '887683.jpg',\n",
990
+ " '883404.jpg',\n",
991
+ " '179039.jpg',\n",
992
+ " '656469.jpg',\n",
993
+ " '912.jpg',\n",
994
+ " '701113.jpg',\n",
995
+ " '34253.jpg',\n",
996
+ " '926244.jpg',\n",
997
+ " '388475.jpg',\n",
998
+ " '411162.jpg',\n",
999
+ " '104858.jpg',\n",
1000
+ " '888135.jpg',\n",
1001
+ " '817397.jpg',\n",
1002
+ " '830036.jpg',\n",
1003
+ " '326222.jpg',\n",
1004
+ " '253354.jpg',\n",
1005
+ " '918715.jpg',\n",
1006
+ " '467337.jpg',\n",
1007
+ " '256870.jpg',\n",
1008
+ " '876845.jpg',\n",
1009
+ " '888190.jpg',\n",
1010
+ " '313026.jpg',\n",
1011
+ " '894540.jpg',\n",
1012
+ " '894551.jpg',\n",
1013
+ " '161438.jpg',\n",
1014
+ " '703344.jpg',\n",
1015
+ " '173000.jpg',\n",
1016
+ " '734327.jpg',\n",
1017
+ " '230572.jpg',\n",
1018
+ " '146308.jpg',\n",
1019
+ " '871228.jpg',\n",
1020
+ " '263076.jpg',\n",
1021
+ " '762329.jpg',\n",
1022
+ " '904792.jpg',\n",
1023
+ " '897639.jpg',\n",
1024
+ " ...]"
1025
+ ]
1026
+ },
1027
+ "execution_count": 6,
1028
+ "metadata": {},
1029
+ "output_type": "execute_result"
1030
+ }
1031
+ ],
1032
+ "source": [
1033
+ "x"
1034
+ ]
1035
+ },
1036
+ {
1037
+ "cell_type": "code",
1038
+ "execution_count": null,
1039
+ "id": "f1611451",
1040
+ "metadata": {},
1041
+ "outputs": [],
1042
+ "source": []
1043
+ }
1044
+ ],
1045
+ "metadata": {
1046
+ "kernelspec": {
1047
+ "display_name": "huggingface",
1048
+ "language": "python",
1049
+ "name": "huggingface"
1050
+ },
1051
+ "language_info": {
1052
+ "codemirror_mode": {
1053
+ "name": "ipython",
1054
+ "version": 3
1055
+ },
1056
+ "file_extension": ".py",
1057
+ "mimetype": "text/x-python",
1058
+ "name": "python",
1059
+ "nbconvert_exporter": "python",
1060
+ "pygments_lexer": "ipython3",
1061
+ "version": "3.8.15"
1062
+ },
1063
+ "varInspector": {
1064
+ "cols": {
1065
+ "lenName": 16,
1066
+ "lenType": 16,
1067
+ "lenVar": 40
1068
+ },
1069
+ "kernels_config": {
1070
+ "python": {
1071
+ "delete_cmd_postfix": "",
1072
+ "delete_cmd_prefix": "del ",
1073
+ "library": "var_list.py",
1074
+ "varRefreshCmd": "print(var_dic_list())"
1075
+ },
1076
+ "r": {
1077
+ "delete_cmd_postfix": ") ",
1078
+ "delete_cmd_prefix": "rm(",
1079
+ "library": "var_list.r",
1080
+ "varRefreshCmd": "cat(var_dic_list()) "
1081
+ }
1082
+ },
1083
+ "types_to_exclude": [
1084
+ "module",
1085
+ "function",
1086
+ "builtin_function_or_method",
1087
+ "instance",
1088
+ "_Feature"
1089
+ ],
1090
+ "window_display": false
1091
+ }
1092
+ },
1093
+ "nbformat": 4,
1094
+ "nbformat_minor": 5
1095
+ }
scripts/.ipynb_checkpoints/run-checkpoint.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ from tqdm import tqdm
3
+ import joblib
4
+
5
+ if __name__ == '__main__':
6
+ df_scores = pd.read_csv('../../AVA_src/AVA.txt',sep = " ",header = None)
7
+ df_scores.columns = df_scores.columns + 1
8
+ df_scores = df_scores.drop(columns=df_scores.columns[0], axis=1)
9
+ df_tags = pd.read_csv('../../AVA_src/tags.txt',sep = "|",header = None)
10
+
11
+ dict_tags = {0:'None'}
12
+ for row in df_tags.iterrows():
13
+ row = row[1]
14
+ dict_tags[row[0]] = row[1]
15
+
16
+ dict_ = {}
17
+ for idx in tqdm(range(len(df_scores))):
18
+ row = df_scores.iloc[idx,:]
19
+ _id = row[2]
20
+ ratings = row.values[1:11]
21
+ textual_tag0 = dict_tags[row[13]]
22
+ textual_tag1 = dict_tags[row[14]]
23
+ dict_[_id] = (ratings,textual_tag0,textual_tag1)
24
+ joblib.dump(dict_,"../data/metadata.pkl")
scripts/run.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ from tqdm import tqdm
3
+ import joblib
4
+
5
+ if __name__ == '__main__':
6
+ df_scores = pd.read_csv('../../AVA_src/AVA.txt',sep = " ",header = None)
7
+ df_scores.columns = df_scores.columns + 1
8
+ df_scores = df_scores.drop(columns=df_scores.columns[0], axis=1)
9
+ df_tags = pd.read_csv('../../AVA_src/tags.txt',sep = "|",header = None)
10
+
11
+ dict_tags = {0:'None'}
12
+ for row in df_tags.iterrows():
13
+ row = row[1]
14
+ dict_tags[row[0]] = row[1]
15
+
16
+ dict_ = {}
17
+ for idx in tqdm(range(len(df_scores))):
18
+ row = df_scores.iloc[idx,:]
19
+ _id = row[2]
20
+ ratings = row.values[1:11]
21
+ textual_tag0 = dict_tags[row[13]]
22
+ textual_tag1 = dict_tags[row[14]]
23
+ dict_[_id] = (ratings,textual_tag0,textual_tag1)
24
+ joblib.dump(dict_,"../data/metadata.pkl")