tanganke commited on
Commit
e7adcd2
1 Parent(s): b1ee3d9

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ dataset_info:
3
+ features:
4
+ - name: image
5
+ dtype: image
6
+ - name: label
7
+ dtype:
8
+ class_label:
9
+ names:
10
+ '0': airplane
11
+ '1': airport
12
+ '2': baseball diamond
13
+ '3': basketball court
14
+ '4': beach
15
+ '5': bridge
16
+ '6': chaparral
17
+ '7': church
18
+ '8': circular farmland
19
+ '9': cloud
20
+ '10': commercial area
21
+ '11': dense residential
22
+ '12': desert
23
+ '13': forest
24
+ '14': freeway
25
+ '15': golf course
26
+ '16': ground track field
27
+ '17': harbor
28
+ '18': industrial area
29
+ '19': intersection
30
+ '20': island
31
+ '21': lake
32
+ '22': meadow
33
+ '23': medium residential
34
+ '24': mobile home park
35
+ '25': mountain
36
+ '26': overpass
37
+ '27': palace
38
+ '28': parking lot
39
+ '29': railway
40
+ '30': railway station
41
+ '31': rectangular farmland
42
+ '32': river
43
+ '33': roundabout
44
+ '34': runway
45
+ '35': sea ice
46
+ '36': ship
47
+ '37': snowberg
48
+ '38': sparse residential
49
+ '39': stadium
50
+ '40': storage tank
51
+ '41': tennis court
52
+ '42': terrace
53
+ '43': thermal power station
54
+ '44': wetland
55
+ splits:
56
+ - name: train
57
+ num_bytes: 2383019
58
+ num_examples: 18900
59
+ - name: test
60
+ num_bytes: 781557
61
+ num_examples: 6300
62
+ - name: contrast
63
+ num_bytes: 831957
64
+ num_examples: 6300
65
+ - name: gaussian_noise
66
+ num_bytes: 907557
67
+ num_examples: 6300
68
+ - name: impulse_noise
69
+ num_bytes: 894957
70
+ num_examples: 6300
71
+ - name: jpeg_compression
72
+ num_bytes: 932757
73
+ num_examples: 6300
74
+ - name: motion_blur
75
+ num_bytes: 869757
76
+ num_examples: 6300
77
+ - name: pixelate
78
+ num_bytes: 831957
79
+ num_examples: 6300
80
+ - name: spatter
81
+ num_bytes: 819357
82
+ num_examples: 6300
83
+ download_size: 916981012
84
+ dataset_size: 9252875
85
+ ---
86
+
87
+ # [RESISC45](https://www.tensorflow.org/datasets/catalog/resisc45)
88
+
89
+ ## Overview
90
+
91
+ The **RESISC45 Classification Model** is a deep learning-based image classification model designed to identify and classify different types of scenes from satellite imagery. This dataset contains 45 classes of scenes, with each class representing a different type of land cover or land use.
92
+
93
+ ## Usage
94
+
95
+ ```python
96
+ from datasets import load_dataset
97
+
98
+ # Load the dataset
99
+ dataset = load_dataset('tanganke/resisc45')
100
+ ```
101
+
102
+ ## Dataset Information
103
+
104
+ The dataset is divided into the following splits:
105
+
106
+ - **Training set**: Contains 18,900 examples, used for model training.
107
+ - **Test set**: Contains 6,300 examples, used for model evaluation and benchmarking.
108
+
109
+ The dataset also includes the following augmented sets, which can be used for testing the model's robustness to various types of image corruptions:
110
+
111
+ - **Contrast-enhanced set**: Contains 6,300 examples with enhanced contrast for improved feature visibility.
112
+ - **Gaussian noise set**: Contains 6,300 examples where images have been corrupted with Gaussian noise.
113
+ - **Impulse noise set**: Contains 6,300 examples with impulse noise.
114
+ - **JPEG compression set**: Contains 6,300 examples where images have been compressed using JPEG encoding.
115
+ - **Motion blur set**: Contains 6,300 examples with motion blur applied.
116
+ - **Pixelate set**: Contains 6,300 examples where images have been pixelated.
117
+ - **Spatter set**: Contains 6,300 examples with spatter noise.
118
+
data/contrast.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95b995aa5742a8bf5c99caec21e425ed62e8be5e7e2499b770e177a06442ceb0
3
+ size 65821198
data/gaussian_noise.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e3fbcc81eb278e18e9e8bc75a220d07caccc1c8ac8c55eed2d84c7f8aca804df
3
+ size 115764717
data/impulse_noise.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7422b2cde62e6697a3d0ef3f0727aca21b788ab7b45a1622a2b57f4c65c32332
3
+ size 124570638
data/jpeg_compression.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5e3c4d35e8b22f6db7e50f8394f7cd1e40dbbeec75f4cd92b27b9610b2d585fc
3
+ size 82819474
data/motion_blur.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e372cae5fdc68296741d71742333cc39c05860faa463d37a734d52e14bd0e1d
3
+ size 72616247
data/pixelate.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:10ec683407ab63d57b7109fa9c78edf7a78b1e83572bfeddd052decee8e4e0c4
3
+ size 5677005
data/spatter.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:99bb1700ff22675d5521d919b59ad26dd6716c3e4d98ecb89fdb2cdef23f827f
3
+ size 108574042
data/test.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5955d0c47b55a178b30a3b6f5f8dff1447a3d2d6e018a6867ddb3d0e640de32b
3
+ size 85393782
data/train.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0427735bc7efb681e9b680ee49839f53a1e3087d9734f6b507a057ab23be5f10
3
+ size 255743909
resisc45.py ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import datasets
2
+ from datasets.data_files import DataFilesDict
3
+ from datasets.packaged_modules.imagefolder.imagefolder import ImageFolder, ImageFolderConfig
4
+
5
+ logger = datasets.logging.get_logger(__name__)
6
+
7
+
8
+ class RESISC45(ImageFolder):
9
+ R"""
10
+ RESISC45 dataset for image classification.
11
+ """
12
+
13
+ BUILDER_CONFIG_CLASS = ImageFolderConfig
14
+ BUILDER_CONFIGS = [
15
+ ImageFolderConfig(
16
+ name="default",
17
+ features=("images", "labels"),
18
+ data_files=DataFilesDict(
19
+ {
20
+ split: f"data/{split}.zip"
21
+ for split in ["train", "test"]
22
+ + ["contrast", "gaussian_noise", "impulse_noise", "jpeg_compression", "motion_blur", "pixelate", "spatter"]
23
+ }
24
+ ),
25
+ )
26
+ ]
27
+
28
+ classnames = [
29
+ "airplane",
30
+ "airport",
31
+ "baseball diamond",
32
+ "basketball court",
33
+ "beach",
34
+ "bridge",
35
+ "chaparral",
36
+ "church",
37
+ "circular farmland",
38
+ "cloud",
39
+ "commercial area",
40
+ "dense residential",
41
+ "desert",
42
+ "forest",
43
+ "freeway",
44
+ "golf course",
45
+ "ground track field",
46
+ "harbor",
47
+ "industrial area",
48
+ "intersection",
49
+ "island",
50
+ "lake",
51
+ "meadow",
52
+ "medium residential",
53
+ "mobile home park",
54
+ "mountain",
55
+ "overpass",
56
+ "palace",
57
+ "parking lot",
58
+ "railway",
59
+ "railway station",
60
+ "rectangular farmland",
61
+ "river",
62
+ "roundabout",
63
+ "runway",
64
+ "sea ice",
65
+ "ship",
66
+ "snowberg",
67
+ "sparse residential",
68
+ "stadium",
69
+ "storage tank",
70
+ "tennis court",
71
+ "terrace",
72
+ "thermal power station",
73
+ "wetland",
74
+ ]
75
+
76
+ clip_templates = [
77
+ lambda c: f"satellite imagery of {c}.",
78
+ lambda c: f"aerial imagery of {c}.",
79
+ lambda c: f"satellite photo of {c}.",
80
+ lambda c: f"aerial photo of {c}.",
81
+ lambda c: f"satellite view of {c}.",
82
+ lambda c: f"aerial view of {c}.",
83
+ lambda c: f"satellite imagery of a {c}.",
84
+ lambda c: f"aerial imagery of a {c}.",
85
+ lambda c: f"satellite photo of a {c}.",
86
+ lambda c: f"aerial photo of a {c}.",
87
+ lambda c: f"satellite view of a {c}.",
88
+ lambda c: f"aerial view of a {c}.",
89
+ lambda c: f"satellite imagery of the {c}.",
90
+ lambda c: f"aerial imagery of the {c}.",
91
+ lambda c: f"satellite photo of the {c}.",
92
+ lambda c: f"aerial photo of the {c}.",
93
+ lambda c: f"satellite view of the {c}.",
94
+ lambda c: f"aerial view of the {c}.",
95
+ ]
96
+
97
+ def _info(self):
98
+ return datasets.DatasetInfo(
99
+ description="RESISC45 dataset for image classification.",
100
+ features=datasets.Features(
101
+ {
102
+ "image": datasets.Image(),
103
+ "label": datasets.ClassLabel(names=self.classnames),
104
+ }
105
+ ),
106
+ supervised_keys=("image", "label"),
107
+ task_templates=[datasets.ImageClassification(image_column="image", label_column="label")],
108
+ )