Skip to content

Commit

Permalink
Fix classes in EuroSAT (#1650)
Browse files Browse the repository at this point in the history
* Fix classes

* Black fix

* Align docstring class names

* remove classes

* remove resisc45 classes

* remove ucmerced classes
  • Loading branch information
robmarkcole authored and nilsleh committed Nov 6, 2023
1 parent 964c02d commit 1b48cb0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 88 deletions.
24 changes: 6 additions & 18 deletions torchgeo/datasets/eurosat.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ class EuroSAT(NonGeoClassificationDataset):
Dataset classes:
* Industrial Buildings
* Residential Buildings
* Annual Crop
* Permanent Crop
* River
* Sea and Lake
* Forest
* Herbaceous Vegetation
* Highway
* Industrial Buildings
* Pasture
* Forest
* Permanent Crop
* Residential Buildings
* River
* SeaLake
This dataset uses the train/val/test splits defined in the "In-domain representation
learning for remote sensing" paper:
Expand Down Expand Up @@ -73,18 +73,6 @@ class EuroSAT(NonGeoClassificationDataset):
"val": "95de90f2aa998f70a3b2416bfe0687b4",
"test": "7ae5ab94471417b6e315763121e67c5f",
}
classes = [
"Industrial Buildings",
"Residential Buildings",
"Annual Crop",
"Permanent Crop",
"River",
"Sea and Lake",
"Herbaceous Vegetation",
"Highway",
"Pasture",
"Forest",
]

all_band_names = (
"B01",
Expand Down
47 changes: 0 additions & 47 deletions torchgeo/datasets/resisc45.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,53 +108,6 @@ class RESISC45(NonGeoClassificationDataset):
"val": "a0770cee4c5ca20b8c32bbd61e114805",
"test": "3dda9e4988b47eb1de9f07993653eb08",
}
classes = [
"airplane",
"airport",
"baseball_diamond",
"basketball_court",
"beach",
"bridge",
"chaparral",
"church",
"circular_farmland",
"cloud",
"commercial_area",
"dense_residential",
"desert",
"forest",
"freeway",
"golf_course",
"ground_track_field",
"harbor",
"industrial_area",
"intersection",
"island",
"lake",
"meadow",
"medium_residential",
"mobile_home_park",
"mountain",
"overpass",
"palace",
"parking_lot",
"railway",
"railway_station",
"rectangular_farmland",
"river",
"roundabout",
"runway",
"sea_ice",
"ship",
"snowberg",
"sparse_residential",
"stadium",
"storage_tank",
"tennis_court",
"terrace",
"thermal_power_station",
"wetland",
]

def __init__(
self,
Expand Down
23 changes: 0 additions & 23 deletions torchgeo/datasets/ucmerced.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,29 +68,6 @@ class UCMerced(NonGeoClassificationDataset):
md5 = "5b7ec56793786b6dc8a908e8854ac0e4"

base_dir = os.path.join("UCMerced_LandUse", "Images")
classes = [
"agricultural",
"airplane",
"baseballdiamond",
"beach",
"buildings",
"chaparral",
"denseresidential",
"forest",
"freeway",
"golfcourse",
"harbor",
"intersection",
"mediumresidential",
"mobilehomepark",
"overpass",
"parkinglot",
"river",
"runway",
"sparseresidential",
"storagetanks",
"tenniscourt",
]

splits = ["train", "val", "test"]
split_urls = {
Expand Down

0 comments on commit 1b48cb0

Please sign in to comment.