Datasets:
Tasks:
Image Classification
Modalities:
Image
Formats:
parquet
Languages:
English
Size:
10K - 100K
ArXiv:
Delete loading script
Browse files- eurosat.py +0 -58
eurosat.py
DELETED
@@ -1,58 +0,0 @@
|
|
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 EuroSAT(ImageFolder):
|
9 |
-
R"""
|
10 |
-
EuroSAT 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 |
-
"annual crop land",
|
30 |
-
"forest",
|
31 |
-
"brushland or shrubland",
|
32 |
-
"highway or road",
|
33 |
-
"industrial buildings or commercial buildings",
|
34 |
-
"pasture land",
|
35 |
-
"permanent crop land",
|
36 |
-
"residential buildings or homes or apartments",
|
37 |
-
"river",
|
38 |
-
"lake or sea",
|
39 |
-
]
|
40 |
-
|
41 |
-
clip_templates = [
|
42 |
-
lambda c: f"a centered satellite photo of {c}.",
|
43 |
-
lambda c: f"a centered satellite photo of a {c}.",
|
44 |
-
lambda c: f"a centered satellite photo of the {c}.",
|
45 |
-
]
|
46 |
-
|
47 |
-
def _info(self):
|
48 |
-
return datasets.DatasetInfo(
|
49 |
-
description="EuroSAT dataset for image classification.",
|
50 |
-
features=datasets.Features(
|
51 |
-
{
|
52 |
-
"image": datasets.Image(),
|
53 |
-
"label": datasets.ClassLabel(names=self.classnames),
|
54 |
-
}
|
55 |
-
),
|
56 |
-
supervised_keys=("image", "label"),
|
57 |
-
task_templates=[datasets.ImageClassification(image_column="image", label_column="label")],
|
58 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|