parquet-converter commited on
Commit
ffe957c
·
1 Parent(s): b594d16

Update parquet files

Browse files
.gitattributes DELETED
@@ -1,51 +0,0 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ftz filter=lfs diff=lfs merge=lfs -text
6
- *.gz filter=lfs diff=lfs merge=lfs -text
7
- *.h5 filter=lfs diff=lfs merge=lfs -text
8
- *.joblib filter=lfs diff=lfs merge=lfs -text
9
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
10
- *.lz4 filter=lfs diff=lfs merge=lfs -text
11
- *.model filter=lfs diff=lfs merge=lfs -text
12
- *.msgpack filter=lfs diff=lfs merge=lfs -text
13
- *.npy filter=lfs diff=lfs merge=lfs -text
14
- *.npz filter=lfs diff=lfs merge=lfs -text
15
- *.onnx filter=lfs diff=lfs merge=lfs -text
16
- *.ot filter=lfs diff=lfs merge=lfs -text
17
- *.parquet filter=lfs diff=lfs merge=lfs -text
18
- *.pb filter=lfs diff=lfs merge=lfs -text
19
- *.pickle filter=lfs diff=lfs merge=lfs -text
20
- *.pkl filter=lfs diff=lfs merge=lfs -text
21
- *.pt filter=lfs diff=lfs merge=lfs -text
22
- *.pth filter=lfs diff=lfs merge=lfs -text
23
- *.rar filter=lfs diff=lfs merge=lfs -text
24
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
25
- *.tar.* filter=lfs diff=lfs merge=lfs -text
26
- *.tflite filter=lfs diff=lfs merge=lfs -text
27
- *.tgz filter=lfs diff=lfs merge=lfs -text
28
- *.wasm filter=lfs diff=lfs merge=lfs -text
29
- *.xz filter=lfs diff=lfs merge=lfs -text
30
- *.zip filter=lfs diff=lfs merge=lfs -text
31
- *.zst filter=lfs diff=lfs merge=lfs -text
32
- *tfevents* filter=lfs diff=lfs merge=lfs -text
33
- # Audio files - uncompressed
34
- *.pcm filter=lfs diff=lfs merge=lfs -text
35
- *.sam filter=lfs diff=lfs merge=lfs -text
36
- *.raw filter=lfs diff=lfs merge=lfs -text
37
- # Audio files - compressed
38
- *.aac filter=lfs diff=lfs merge=lfs -text
39
- *.flac filter=lfs diff=lfs merge=lfs -text
40
- *.mp3 filter=lfs diff=lfs merge=lfs -text
41
- *.ogg filter=lfs diff=lfs merge=lfs -text
42
- *.wav filter=lfs diff=lfs merge=lfs -text
43
- # Image files - uncompressed
44
- *.bmp filter=lfs diff=lfs merge=lfs -text
45
- *.gif filter=lfs diff=lfs merge=lfs -text
46
- *.png filter=lfs diff=lfs merge=lfs -text
47
- *.tiff filter=lfs diff=lfs merge=lfs -text
48
- # Image files - compressed
49
- *.jpg filter=lfs diff=lfs merge=lfs -text
50
- *.jpeg filter=lfs diff=lfs merge=lfs -text
51
- *.webp filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md DELETED
@@ -1,155 +0,0 @@
1
- ---
2
- annotations_creators:
3
- - human-curator
4
- language:
5
- - en
6
- license:
7
- - mit
8
- pretty_name: RockGlacier
9
- size_categories:
10
- - 1K<n<10K
11
- source_datasets:
12
- - original
13
- task_categories:
14
- - image-classification
15
- task_ids:
16
- - multi-class-image-classification
17
- ---
18
- # Dataset Card for Rock Glacier Detection
19
- ## Table of Contents
20
- - [Table of Contents](#table-of-contents)
21
- - [Dataset Description](#dataset-description)
22
- - [Dataset Summary](#dataset-summary)
23
- - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
24
- - [Languages](#languages)
25
- - [Dataset Structure](#dataset-structure)
26
- - [Data Instances](#data-instances)
27
- - [Data Fields](#data-fields)
28
- - [Data Splits](#data-splits)
29
- - [Dataset Creation](#dataset-creation)
30
- - [Curation Rationale](#curation-rationale)
31
- - [Source Data](#source-data)
32
- - [Annotations](#annotations)
33
- - [Personal and Sensitive Information](#personal-and-sensitive-information)
34
- - [Considerations for Using the Data](#considerations-for-using-the-data)
35
- - [Social Impact of Dataset](#social-impact-of-dataset)
36
- - [Discussion of Biases](#discussion-of-biases)
37
- - [Other Known Limitations](#other-known-limitations)
38
- - [Additional Information](#additional-information)
39
- - [Dataset Curators](#dataset-curators)
40
- - [Licensing Information](#licensing-information)
41
- - [Citation Information](#citation-information)
42
- - [Contributions](#contributions)
43
- ## Dataset Description
44
- - **Homepage:** [RockGlacier Homepage](https://github.com/alcazar90/rock-glacier-detection)
45
- - **Repository:** [alcazar90/rock-glacier-detection](https://github.com/alcazar90/rock-glacier-detection)
46
- - **Paper:** N/A
47
- - **Leaderboard:** N/A
48
- - **Point of Contact:** N/A
49
- ### Dataset Summary
50
- Rock Glacier Detection dataset with satelital images of rock glaciers in the Chilean Andes.
51
- ### Supported Tasks and Leaderboards
52
- - `image-classification`: Based on a satelitel images (from sentinel2), the goal of this task is to predict a rock glacier in the geographic area, if there any.
53
- ### Languages
54
- English
55
- ## Dataset Structure
56
- ### Data Instances
57
- A sample from the training set is provided below:
58
- ```
59
- {
60
- 'image': <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=128x128 at 0x7FE652BE2FD0>,
61
- 'labels': 0
62
- }
63
- ```
64
- ### Data Fields
65
-
66
- The data instances have the following fields:
67
-
68
- - `image`: A `PIL.Image.Image` object containing the image. Note that when accessing the image column: `dataset[0]["image"]` the image file is automatically decoded. Decoding of a large number of image files might take a significant amount of time. Thus it is important to first query the sample index before the `"image"` column, *i.e.* `dataset[0]["image"]` should **always** be preferred over `dataset["image"][0]`.
69
- - `labels`: an `int` classification label.
70
-
71
- Class Label Mappings:
72
-
73
- ```json
74
- {
75
- "glaciar": 0,
76
- "cordillera": 1
77
- }
78
- ```
79
-
80
- ### Data Splits
81
-
82
-
83
- | |train|validation|test|
84
- |-------------|----:|---------:|---:|
85
- |# of examples|1456 |364 |NA |
86
-
87
- ## Dataset Creation
88
-
89
- ### Curation Rationale
90
-
91
- [More Information Needed]
92
-
93
- ### Source Data
94
-
95
- #### Initial Data Collection and Normalization
96
-
97
- [More Information Needed]
98
-
99
- #### Who are the source language producers?
100
-
101
- [More Information Needed]
102
-
103
- ### Annotations
104
-
105
- #### Annotation process
106
-
107
- [More Information Needed]
108
-
109
- #### Who are the annotators?
110
-
111
- [More Information Needed]
112
-
113
- ### Personal and Sensitive Information
114
-
115
- [More Information Needed]
116
-
117
- ## Considerations for Using the Data
118
-
119
- ### Social Impact of Dataset
120
-
121
- [More Information Needed]
122
-
123
- ### Discussion of Biases
124
-
125
- [More Information Needed]
126
-
127
- ### Other Known Limitations
128
-
129
- [More Information Needed]
130
-
131
- ## Additional Information
132
-
133
- ### Dataset Curators
134
-
135
- [More Information Needed]
136
-
137
- ### Licensing Information
138
-
139
- [More Information Needed]
140
-
141
- ### Citation Information
142
-
143
- ```
144
- @ONLINE {rock-glacier-dataset,
145
- author="CMM - Glaciares (UChile)",
146
- title="Rock Glacier Dataset",
147
- month="October",
148
- year="2022",
149
- url="https://github.com/alcazar90/rock-glacier-detection"
150
- }
151
- ```
152
-
153
- ### Contributions
154
-
155
- Thanks to...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/validation.zip → image-classification/rock-glacier-dataset-train.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:d92d64f26287df56accd1bdbc14ff642f71c90a80041f08ad0013e0ea4d08e5f
3
- size 11408248
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:876e99bc952d050deef13d6c851b069f667293ca135301a4c008349594ee8159
3
+ size 44231773
data/train.zip → image-classification/rock-glacier-dataset-validation.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ee40a2e17a29792559f3953f796f447bda4c24907d78e1bc2a5c77c0d035a16f
3
- size 45073821
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a97606a2444d116a7fd86d8e232c4cf888008cd4c46d6aa1044f3752aa157522
3
+ size 11190774
data/glaciar_masks_trainset.zip → image-segmentation/rock-glacier-dataset-train.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:bba4cfd64cb312be9a27d178a5facf3fd1e1858c34cc007a99f9c67d6b5d471a
3
- size 829770
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c930614651b0b5e69e7c41c1476a583e311ab4aae6516ca19f987e9ce9f07f8c
3
+ size 923
rock-glacier-dataset.py DELETED
@@ -1,156 +0,0 @@
1
- # Copyright 2022 Cristóbal Alcázar
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
- """Rock Glacier dataset with images of the chilean andes."""
15
-
16
- import os
17
- import re
18
-
19
- import datasets
20
- from datasets.tasks import ImageClassification
21
-
22
- datasets.logging.set_verbosity_info()
23
- logger = datasets.logging.get_logger(__name__)
24
-
25
-
26
- _HOMEPAGE = "https://github.com/alcazar90/rock-glacier-detection"
27
-
28
-
29
- _CITATION = """\
30
- @ONLINE {rock-glacier-dataset,
31
- author="CMM-Glaciares",
32
- title="Rock Glacier Dataset",
33
- month="October",
34
- year="2022",
35
- url="https://github.com/alcazar90/rock-glacier-detection"
36
- }
37
- """
38
-
39
- _DESCRIPTION = """\
40
- TODO: Add a description...
41
- """
42
-
43
-
44
- _URLS = {
45
- "train": "https://huggingface.co/datasets/alkzar90/rock-glacier-dataset/resolve/main/data/train.zip",
46
- "validation": "https://huggingface.co/datasets/alkzar90/rock-glacier-dataset/resolve/main/data/validation.zip",
47
- "train_mask": "https://huggingface.co/datasets/alkzar90/rock-glacier-dataset/resolve/main/data/glaciar_masks_trainset.zip",
48
- }
49
-
50
- _NAMES = ["glaciar", "cordillera"]
51
-
52
-
53
- class RockGlacierConfig(datasets.BuilderConfig):
54
- def __init__(self, name, **kwargs):
55
- super(RockGlacierConfig, self).__init__(
56
- version=datasets.Version("1.0.0"),
57
- name=name,
58
- description="Rock Glacier Dataset",
59
- **kwargs,
60
- )
61
-
62
-
63
- class RockGlacierDataset(datasets.GeneratorBasedBuilder):
64
- """Rock Glacier images dataset."""
65
-
66
- BUILDER_CONFIGS = [
67
- RockGlacierConfig("image-classification"),
68
- RockGlacierConfig("image-segmentation"),
69
- ]
70
-
71
- def _info(self):
72
- if self.config.name == "image-classification":
73
- features = datasets.Features({
74
- "image": datasets.Image(),
75
- "labels": datasets.features.ClassLabel(names=_NAMES),
76
- })
77
- keys = ("image", "labels")
78
-
79
- if self.config.name == "image-segmentation":
80
- features = datasets.Features({
81
- "image": datasets.Image(),
82
- "labels": datasets.Image(),
83
- })
84
- keys = ("image", "labels")
85
-
86
-
87
- return datasets.DatasetInfo(
88
- description=_DESCRIPTION,
89
- features=features,
90
- supervised_keys=keys,
91
- homepage=_HOMEPAGE,
92
- citation=_CITATION,
93
- )
94
-
95
-
96
- def _split_generators(self, dl_manager):
97
- data_files = dl_manager.download_and_extract(_URLS)
98
-
99
- if self.config.name == "image-classification":
100
- return [
101
- datasets.SplitGenerator(
102
- name=datasets.Split.TRAIN,
103
- gen_kwargs={
104
- "files": dl_manager.iter_files([data_files["train"]]),
105
- "split": "training",
106
- },
107
- ),
108
- datasets.SplitGenerator(
109
- name=datasets.Split.VALIDATION,
110
- gen_kwargs={
111
- "files": dl_manager.iter_files([data_files["validation"]]),
112
- "split": "validation",
113
- },
114
- ),
115
- ]
116
-
117
- if self.config.name == "image-segmentation":
118
- train_data = dl_manager.iter_files([data_files["train"]]), dl_manager.iter_files([data_files["train_mask"]])
119
- return [
120
- datasets.SplitGenerator(
121
- name=datasets.Split.TRAIN,
122
- gen_kwargs={
123
- "files": train_data,
124
- "split": "training",
125
- },
126
- )]
127
-
128
-
129
- def _generate_examples(self, files, split):
130
-
131
- if self.config.name == "image-classification":
132
- for i, path in enumerate(files):
133
- file_name = os.path.basename(path)
134
- if file_name.endswith(".png"):
135
- yield i, {
136
- "image": path,
137
- "labels": os.path.basename(os.path.dirname(path)).lower(),
138
- }
139
-
140
- if self.config.name == "image-segmentation":
141
- if split == "training":
142
- images, masks = files
143
- imageId2mask = {}
144
- # iterate trought masks
145
- for mask_path in masks:
146
- mask_id = re.search('\d+', mask_path).group(0)
147
- imageId2mask[mask_id] = mask_path
148
- logger.info(f"imageId2mask check paths: {imageId2mask}")
149
- for i, path in enumerate(files):
150
- file_name = os.path.basename(path)
151
- if file_name.endswith(".png"):
152
- yield i, {
153
- "image": path,
154
- "labels": imageId2mask[re.search('\d+', file_name).group(0)]
155
- }
156
-