keremberke commited on
Commit
2f3f894
1 Parent(s): 7036610

dataset uploaded by roboflow2huggingface package

Browse files
README.dataset.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ # Pothole Detection > Dataset_90
2
+ https://universe.roboflow.com/imacs-pothole-detection-wo8mu/pothole-detection-irkz9
3
+
4
+ Provided by a Roboflow user
5
+ License: CC BY 4.0
6
+
README.md ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ task_categories:
3
+ - image-segmentation
4
+ tags:
5
+ - roboflow
6
+ - roboflow2huggingface
7
+ - Construction
8
+ - Self Driving
9
+ - Transportation
10
+ - Damage Risk
11
+ ---
12
+
13
+ <div align="center">
14
+ <img width="640" alt="keremberke/pothole-segmentation" src="https://huggingface.co/datasets/keremberke/pothole-segmentation/resolve/main/thumbnail.jpg">
15
+ </div>
16
+
17
+ ### Dataset Labels
18
+
19
+ ```
20
+ ['pothole']
21
+ ```
22
+
23
+
24
+ ### Number of Images
25
+
26
+ ```json
27
+ {'test': 5, 'train': 80, 'valid': 5}
28
+ ```
29
+
30
+
31
+ ### How to Use
32
+
33
+ - Install [datasets](https://pypi.org/project/datasets/):
34
+
35
+ ```bash
36
+ pip install datasets
37
+ ```
38
+
39
+ - Load the dataset:
40
+
41
+ ```python
42
+ from datasets import load_dataset
43
+
44
+ ds = load_dataset("keremberke/pothole-segmentation", name="full")
45
+ example = ds['train'][0]
46
+ ```
47
+
48
+ ### Roboflow Dataset Page
49
+ [https://universe.roboflow.com/imacs-pothole-detection-wo8mu/pothole-detection-irkz9/dataset/4](https://universe.roboflow.com/imacs-pothole-detection-wo8mu/pothole-detection-irkz9/dataset/4?ref=roboflow2huggingface)
50
+
51
+ ### Citation
52
+
53
+ ```
54
+ @misc{ pothole-detection-irkz9_dataset,
55
+ title = { Pothole Detection Dataset },
56
+ type = { Open Source Dataset },
57
+ author = { IMACS Pothole Detection },
58
+ howpublished = { \\url{ https://universe.roboflow.com/imacs-pothole-detection-wo8mu/pothole-detection-irkz9 } },
59
+ url = { https://universe.roboflow.com/imacs-pothole-detection-wo8mu/pothole-detection-irkz9 },
60
+ journal = { Roboflow Universe },
61
+ publisher = { Roboflow },
62
+ year = { 2023 },
63
+ month = { jan },
64
+ note = { visited on 2023-01-15 },
65
+ }
66
+ ```
67
+
68
+ ### License
69
+ CC BY 4.0
70
+
71
+ ### Dataset Summary
72
+ This dataset was exported via roboflow.com on January 15, 2023 at 6:38 PM GMT
73
+
74
+ Roboflow is an end-to-end computer vision platform that helps you
75
+ * collaborate with your team on computer vision projects
76
+ * collect & organize images
77
+ * understand and search unstructured image data
78
+ * annotate, and create datasets
79
+ * export, train, and deploy computer vision models
80
+ * use active learning to improve your dataset over time
81
+
82
+ For state of the art Computer Vision training notebooks you can use with this dataset,
83
+ visit https://github.com/roboflow/notebooks
84
+
85
+ To find over 100k other datasets and pre-trained models, visit https://universe.roboflow.com
86
+
87
+ The dataset includes 90 images.
88
+ Pothole are annotated in COCO format.
89
+
90
+ The following pre-processing was applied to each image:
91
+
92
+ No image augmentation techniques were applied.
93
+
94
+
95
+
README.roboflow.txt ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Pothole Detection - v4 Dataset_90
3
+ ==============================
4
+
5
+ This dataset was exported via roboflow.com on January 15, 2023 at 6:38 PM GMT
6
+
7
+ Roboflow is an end-to-end computer vision platform that helps you
8
+ * collaborate with your team on computer vision projects
9
+ * collect & organize images
10
+ * understand and search unstructured image data
11
+ * annotate, and create datasets
12
+ * export, train, and deploy computer vision models
13
+ * use active learning to improve your dataset over time
14
+
15
+ For state of the art Computer Vision training notebooks you can use with this dataset,
16
+ visit https://github.com/roboflow/notebooks
17
+
18
+ To find over 100k other datasets and pre-trained models, visit https://universe.roboflow.com
19
+
20
+ The dataset includes 90 images.
21
+ Pothole are annotated in COCO format.
22
+
23
+ The following pre-processing was applied to each image:
24
+
25
+ No image augmentation techniques were applied.
26
+
27
+
data/test.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0e172692af7847283bbb6e627be3a270c481e32373376013f272f9070e2f54c9
3
+ size 382846
data/train.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d6f8d27ccaff5ed1d3b97b1d8fc3ef3d99dedee860bdbd8b0d5658871dee2f7
3
+ size 6223723
data/valid-mini.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31d6dbc6c0bd85e5c665c11706b8647e5da1eddbe7ae6b71ea3475400d3924be
3
+ size 207506
data/valid.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:85a1cef607029b91b86fb506af9541f609cb347d81ff95f00253a5cf967b769d
3
+ size 328798
pothole-segmentation.py ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import collections
2
+ import json
3
+ import os
4
+
5
+ import datasets
6
+
7
+
8
+ _HOMEPAGE = "https://universe.roboflow.com/imacs-pothole-detection-wo8mu/pothole-detection-irkz9/dataset/4"
9
+ _LICENSE = "CC BY 4.0"
10
+ _CITATION = """\
11
+ @misc{ pothole-detection-irkz9_dataset,
12
+ title = { Pothole Detection Dataset },
13
+ type = { Open Source Dataset },
14
+ author = { IMACS Pothole Detection },
15
+ howpublished = { \\url{ https://universe.roboflow.com/imacs-pothole-detection-wo8mu/pothole-detection-irkz9 } },
16
+ url = { https://universe.roboflow.com/imacs-pothole-detection-wo8mu/pothole-detection-irkz9 },
17
+ journal = { Roboflow Universe },
18
+ publisher = { Roboflow },
19
+ year = { 2023 },
20
+ month = { jan },
21
+ note = { visited on 2023-01-15 },
22
+ }
23
+ """
24
+ _CATEGORIES = ['pothole']
25
+ _ANNOTATION_FILENAME = "_annotations.coco.json"
26
+
27
+
28
+ class POTHOLESEGMENTATIONConfig(datasets.BuilderConfig):
29
+ """Builder Config for pothole-segmentation"""
30
+
31
+ def __init__(self, data_urls, **kwargs):
32
+ """
33
+ BuilderConfig for pothole-segmentation.
34
+
35
+ Args:
36
+ data_urls: `dict`, name to url to download the zip file from.
37
+ **kwargs: keyword arguments forwarded to super.
38
+ """
39
+ super(POTHOLESEGMENTATIONConfig, self).__init__(version=datasets.Version("1.0.0"), **kwargs)
40
+ self.data_urls = data_urls
41
+
42
+
43
+ class POTHOLESEGMENTATION(datasets.GeneratorBasedBuilder):
44
+ """pothole-segmentation instance segmentation dataset"""
45
+
46
+ VERSION = datasets.Version("1.0.0")
47
+ BUILDER_CONFIGS = [
48
+ POTHOLESEGMENTATIONConfig(
49
+ name="full",
50
+ description="Full version of pothole-segmentation dataset.",
51
+ data_urls={
52
+ "train": "https://huggingface.co/datasets/keremberke/pothole-segmentation/resolve/main/data/train.zip",
53
+ "validation": "https://huggingface.co/datasets/keremberke/pothole-segmentation/resolve/main/data/valid.zip",
54
+ "test": "https://huggingface.co/datasets/keremberke/pothole-segmentation/resolve/main/data/test.zip",
55
+ },
56
+ ),
57
+ POTHOLESEGMENTATIONConfig(
58
+ name="mini",
59
+ description="Mini version of pothole-segmentation dataset.",
60
+ data_urls={
61
+ "train": "https://huggingface.co/datasets/keremberke/pothole-segmentation/resolve/main/data/valid-mini.zip",
62
+ "validation": "https://huggingface.co/datasets/keremberke/pothole-segmentation/resolve/main/data/valid-mini.zip",
63
+ "test": "https://huggingface.co/datasets/keremberke/pothole-segmentation/resolve/main/data/valid-mini.zip",
64
+ },
65
+ )
66
+ ]
67
+
68
+ def _info(self):
69
+ features = datasets.Features(
70
+ {
71
+ "image_id": datasets.Value("int64"),
72
+ "image": datasets.Image(),
73
+ "width": datasets.Value("int32"),
74
+ "height": datasets.Value("int32"),
75
+ "objects": datasets.Sequence(
76
+ {
77
+ "id": datasets.Value("int64"),
78
+ "area": datasets.Value("int64"),
79
+ "bbox": datasets.Sequence(datasets.Value("float32"), length=4),
80
+ "segmentation": datasets.Sequence(datasets.Sequence(datasets.Value("float32"))),
81
+ "category": datasets.ClassLabel(names=_CATEGORIES),
82
+ }
83
+ ),
84
+ }
85
+ )
86
+ return datasets.DatasetInfo(
87
+ features=features,
88
+ homepage=_HOMEPAGE,
89
+ citation=_CITATION,
90
+ license=_LICENSE,
91
+ )
92
+
93
+ def _split_generators(self, dl_manager):
94
+ data_files = dl_manager.download_and_extract(self.config.data_urls)
95
+ return [
96
+ datasets.SplitGenerator(
97
+ name=datasets.Split.TRAIN,
98
+ gen_kwargs={
99
+ "folder_dir": data_files["train"],
100
+ },
101
+ ),
102
+ datasets.SplitGenerator(
103
+ name=datasets.Split.VALIDATION,
104
+ gen_kwargs={
105
+ "folder_dir": data_files["validation"],
106
+ },
107
+ ),
108
+ datasets.SplitGenerator(
109
+ name=datasets.Split.TEST,
110
+ gen_kwargs={
111
+ "folder_dir": data_files["test"],
112
+ },
113
+ ),
114
+ ]
115
+
116
+ def _generate_examples(self, folder_dir):
117
+ def process_annot(annot, category_id_to_category):
118
+ return {
119
+ "id": annot["id"],
120
+ "area": annot["area"],
121
+ "bbox": annot["bbox"],
122
+ "segmentation": annot["segmentation"],
123
+ "category": category_id_to_category[annot["category_id"]],
124
+ }
125
+
126
+ image_id_to_image = {}
127
+ idx = 0
128
+
129
+ annotation_filepath = os.path.join(folder_dir, _ANNOTATION_FILENAME)
130
+ with open(annotation_filepath, "r") as f:
131
+ annotations = json.load(f)
132
+ category_id_to_category = {category["id"]: category["name"] for category in annotations["categories"]}
133
+ image_id_to_annotations = collections.defaultdict(list)
134
+ for annot in annotations["annotations"]:
135
+ image_id_to_annotations[annot["image_id"]].append(annot)
136
+ filename_to_image = {image["file_name"]: image for image in annotations["images"]}
137
+
138
+ for filename in os.listdir(folder_dir):
139
+ filepath = os.path.join(folder_dir, filename)
140
+ if filename in filename_to_image:
141
+ image = filename_to_image[filename]
142
+ objects = [
143
+ process_annot(annot, category_id_to_category) for annot in image_id_to_annotations[image["id"]]
144
+ ]
145
+ with open(filepath, "rb") as f:
146
+ image_bytes = f.read()
147
+ yield idx, {
148
+ "image_id": image["id"],
149
+ "image": {"path": filepath, "bytes": image_bytes},
150
+ "width": image["width"],
151
+ "height": image["height"],
152
+ "objects": objects,
153
+ }
154
+ idx += 1
split_name_to_num_samples.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"test": 5, "train": 80, "valid": 5}
thumbnail.jpg ADDED

Git LFS Details

  • SHA256: 9a6c9cc8f21be4d9e9b695f99d024af32d77378efb0c8c6c9d53f655977fa20a
  • Pointer size: 131 Bytes
  • Size of remote file: 142 kB