Thinh Huynh Nguyen Truong
commited on
Commit
·
7b77a91
1
Parent(s):
2540430
Update test.py
Browse files
README.md
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
dataset_info:
|
3 |
+
- config_name: v1
|
4 |
+
features:
|
5 |
+
- name: depth
|
6 |
+
dtype: image
|
7 |
+
- name: rgb
|
8 |
+
dtype: image
|
9 |
+
- name: gt
|
10 |
+
dtype: image
|
11 |
+
- name: name
|
12 |
+
dtype: string
|
13 |
+
splits:
|
14 |
+
- name: train
|
15 |
+
num_bytes: 4232411
|
16 |
+
num_examples: 10
|
17 |
+
- name: validation
|
18 |
+
num_bytes: 4232411
|
19 |
+
num_examples: 10
|
20 |
+
download_size: 2917880
|
21 |
+
dataset_size: 8464822
|
22 |
+
- config_name: v2
|
23 |
+
features:
|
24 |
+
- name: depth
|
25 |
+
dtype: image
|
26 |
+
- name: rgb
|
27 |
+
dtype: image
|
28 |
+
- name: gt
|
29 |
+
dtype: image
|
30 |
+
- name: name
|
31 |
+
dtype: string
|
32 |
+
splits:
|
33 |
+
- name: train
|
34 |
+
num_bytes: 4232411
|
35 |
+
num_examples: 10
|
36 |
+
- name: validation
|
37 |
+
num_bytes: 4232411
|
38 |
+
num_examples: 10
|
39 |
+
download_size: 2917880
|
40 |
+
dataset_size: 8464822
|
41 |
+
---
|
test.py
CHANGED
@@ -68,7 +68,7 @@ def get_download_url(config_name: str, partition: str) -> str:
|
|
68 |
Returns:
|
69 |
str: URL to download file
|
70 |
"""
|
71 |
-
return f"https://huggingface.co/datasets/RGBD-SOD/test/
|
72 |
|
73 |
|
74 |
# TODO: Name of the dataset usually matches the script name with CamelCase instead of snake_case
|
@@ -174,9 +174,7 @@ class Test(datasets.GeneratorBasedBuilder):
|
|
174 |
for key, row in enumerate(metadata):
|
175 |
yield key, {
|
176 |
"name": row["name"],
|
177 |
-
"rgb": Image.open(os.path.join(dir_path,
|
178 |
-
"gt": Image.open(os.path.join(dir_path,
|
179 |
-
"depth": Image.open(
|
180 |
-
os.path.join(dir_path, metadata["depth"]), mode="L"
|
181 |
-
),
|
182 |
}
|
|
|
68 |
Returns:
|
69 |
str: URL to download file
|
70 |
"""
|
71 |
+
return f"https://huggingface.co/datasets/RGBD-SOD/test/resolve/main/data/{config_name}/{partition}.zip"
|
72 |
|
73 |
|
74 |
# TODO: Name of the dataset usually matches the script name with CamelCase instead of snake_case
|
|
|
174 |
for key, row in enumerate(metadata):
|
175 |
yield key, {
|
176 |
"name": row["name"],
|
177 |
+
"rgb": Image.open(os.path.join(dir_path, row["rgb"])).convert("RGB"),
|
178 |
+
"gt": Image.open(os.path.join(dir_path, row["gt"])).convert("L"),
|
179 |
+
"depth": Image.open(os.path.join(dir_path, row["depth"])).convert("L"),
|
|
|
|
|
180 |
}
|