-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdataset.py
More file actions
31 lines (26 loc) · 751 Bytes
/
dataset.py
File metadata and controls
31 lines (26 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from pathlib import Path
root_dict = {
"comic": "./data/bam/",
"line": "./data/bam/",
"natural": "./data/kodak/",
"vector": "./data/bam/",
# add
"graphite": "./data/bam/",
"oilpaint": "./data/bam/",
"watercolor": "./data/bam/",
}
file_dict = {
"line": "datasets/line-drawing.txt",
"comic": "datasets/comic.txt",
"natural": "datasets/natural.txt",
"vector": "datasets/vector-art.txt",
"graphite": "datasets/graphite.txt",
"oilpaint": "datasets/oilpaint.txt",
"watercolor": "datasets/watercolor.txt",
}
def get_paths(name: str):
root = Path(root_dict[name])
paths = list()
with open(file_dict[name]) as f:
paths = [root / line.rstrip() for line in f]
return paths