DOTA#
- class torchgeo.datasets.DOTA(root='data', split='train', version='2.0', bbox_orientation='oriented', transforms=None, download=False, checksum=False)[source]#
Bases:
NonGeoDatasetDOTA dataset.
DOTA is a large-scale object detection dataset for aerial imagery containing RGB and gray-scale imagery from Google Earth, GF-2 and JL-1 satellites as well as additional aerial imagery from CycloMedia. There are three versions of the dataset: v1.0, v1.5, and v2.0, where, v1.0 and v1.5 have the same images but different annotations, and v2.0 extends both the images and annotations with more samples
Dataset features:
1869 samples in v1.0 and v1.5 and 2423 samples in v2.0
multi-class object detection (15 classes in v1.0 and v1.5 and 18 classes in v2.0)
horizontal and oriented bounding boxes
Dataset format:
images are three channel PNGs with various pixel sizes
annotations are text files with one line per bounding box
Classes:
plane
ship
storage-tank
baseball-diamond
tennis-court
basketball-court
ground-track-field
harbor
bridge
large-vehicle
small-vehicle
helicopter
roundabout
soccer-ball-field
swimming-pool
container-crane (v1.5+)
airport (v2.0+)
helipad (v2.0+)
If you use this work in your research, please cite the following papers:
Added in version 0.7.
- __init__(root='data', split='train', version='2.0', bbox_orientation='oriented', transforms=None, download=False, checksum=False)[source]#
Initialize a new DOTA dataset instance.
- Parameters:
root (str | PathLike[str]) – root directory where dataset can be found
split (Literal['train', 'val']) – split of the dataset to use, one of [‘train’, ‘val’]
version (Literal['1.0', '1.5', '2.0']) – version of the dataset to use, one of [‘1.0’, ‘1.5’, ‘2.0’]
bbox_orientation (Literal['horizontal', 'oriented']) – bounding box orientation, one of [‘horizontal’, ‘oriented’], where horizontal returnx xyxy format and oriented returns x1y1x2y2x3y3x4y4 format
transforms (Callable[[dict[str, Any]], dict[str, Any]] | None) – a function/transform that takes input sample and its target as entry and returns a transformed version
download (bool) – if True, download dataset and store it in the root directory
checksum (bool) – if True, check the MD5 of the downloaded files (may be slow)
- Raises:
AssertionError – if split, version, or bbox_orientation argument are not valid
DatasetNotFoundError – if dataset is not found or corrupted, and download is False
- __len__()[source]#
Return the number of samples in the dataset.
- Returns:
length of the dataset
- Return type:
- __annotate_func__()#
The type of the None singleton.