triangulum66 commited on
Commit
a19f949
1 Parent(s): 3dd91d9

dataset uploaded by roboflow2huggingface package

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

Git LFS Details

  • SHA256: 9f772e2a72edf8f35c5e73dec66ffb38db8572c6ba77a2a7dc6dd51f7add06bd
  • Pointer size: 130 Bytes
  • Size of remote file: 83.5 kB