Yiwei-Ou commited on
Commit
277ce0a
·
verified ·
1 Parent(s): 867dde9

Delete dataset_script.py

Browse files
Files changed (1) hide show
  1. dataset_script.py +0 -64
dataset_script.py DELETED
@@ -1,64 +0,0 @@
1
-
2
- import os
3
- import tarfile
4
- from pathlib import Path
5
-
6
- import datasets
7
-
8
- _DESCRIPTION = """
9
- Multimodal Street-level Place Recognition Dataset (Resized version).
10
- This dataset consists of downscaled images, video frames, and associated annotations,
11
- captured in a pedestrian-oriented urban environment.
12
- """
13
-
14
- _CITATION = """
15
- @inproceedings{your_neurips_submission,
16
- title={Multimodal Street-level Place Recognition Dataset},
17
- author={Ou, Yiwei},
18
- year={2025},
19
- booktitle={NeurIPS Datasets and Benchmarks Track}
20
- }
21
- """
22
-
23
- _HOMEPAGE = "https://huggingface.co/datasets/Yiwei-Ou/Multimodal_Street-level_Place_Recognition_Dataset"
24
-
25
- _LICENSE = "cc-by-4.0"
26
-
27
- class MultimodalPlaceRecognitionDataset(datasets.GeneratorBasedBuilder):
28
- VERSION = datasets.Version("1.0.0")
29
-
30
- def _info(self):
31
- return datasets.DatasetInfo(
32
- description=_DESCRIPTION,
33
- features=datasets.Features({
34
- "image_path": datasets.Value("string"),
35
- "label": datasets.Value("string"),
36
- }),
37
- supervised_keys=None,
38
- homepage=_HOMEPAGE,
39
- citation=_CITATION,
40
- license=_LICENSE,
41
- )
42
-
43
- def _split_generators(self, dl_manager):
44
- archive_path = dl_manager.download_and_extract("https://huggingface.co/datasets/Yiwei-Ou/Multimodal_Street-level_Place_Recognition_Dataset/resolve/main/Annotated_Resized.tar.gz")
45
- data_dir = os.path.join(archive_path, "Annotated_Resized")
46
-
47
- return [
48
- datasets.SplitGenerator(
49
- name=datasets.Split.TRAIN,
50
- gen_kwargs={"data_dir": data_dir},
51
- )
52
- ]
53
-
54
- def _generate_examples(self, data_dir):
55
- id_ = 0
56
- for root, _, files in os.walk(data_dir):
57
- for file_name in files:
58
- if file_name.lower().endswith((".jpg", ".jpeg", ".png")):
59
- label = Path(root).name # folder name is label
60
- yield id_, {
61
- "image_path": os.path.join(root, file_name),
62
- "label": label,
63
- }
64
- id_ += 1