Link to this sectionxView Dataset#
The xView dataset is one of the largest publicly available satellite-imagery benchmarks for object detection, providing over 1 million object instances across 60 classes annotated with bounding boxes in more than 1,400 km² of 0.3 m WorldView-3 imagery. It was released for the DIUx xView 2018 Challenge by the U.S. National Geospatial-Intelligence Agency (NGA) and requires a manual download of about 20.7 GB.
The dataset was created to push four computer vision frontiers:
- Reduce minimum resolution for detection.
- Improve learning efficiency.
- Enable discovery of more object classes.
- Improve detection of fine-grained classes.
Building on benchmarks like COCO, xView targets overhead imagery, where objects are far smaller and more densely packed than in ground-level photos.
The xView dataset is not downloaded automatically. Register at the DIUx xView 2018 Challenge website to download train_images.zip (~15 GB), train_labels.zip, and val_images.zip (~5 GB), then extract them under datasets/xView/ so that it contains:
datasets/xView/
├── train_images/ # 847 TIF satellite images
├── val_images/ # 282 TIF images (no public labels)
└── xView_train.geojson # bounding-box annotationsOn the first training run, Ultralytics converts the GeoJSON annotations to YOLO format and splits the labeled images roughly 90/10 into training and validation sets automatically — no manual conversion is needed.
Link to this sectionKey Features#
- Fine-grained classes: 60 object classes spanning aircraft, vehicles, railway stock, maritime vessels, construction equipment, and buildings — many small, rare, and visually similar.
- High resolution: 0.3 m ground sample distance collected from WorldView-3 satellites.
- Dense annotation: over 1 million object instances across more than 1,400 km² of imagery, all labeled with horizontal bounding boxes.
- Automatic conversion: the Ultralytics download script converts the original GeoJSON labels to YOLO format and generates the train/val split on first use.
Link to this sectionDataset Structure#
xView images are large satellite scenes in TIF format, and only the 847 training images ship with public labels — the 282-image challenge validation set has none. The Ultralytics xView.yaml configuration therefore splits the labeled images automatically on first use:
| Split | Images | Description |
|---|---|---|
| Train | ~90% of 847 | Labeled images listed in autosplit_train.txt, generated on the first run |
| Validation | ~10% of 847 | Labeled images listed in autosplit_val.txt, used for evaluation |
The 60 classes cover fine-grained categories such as Fixed-wing Aircraft, Cargo Plane, Small Car, Bus, Locomotive, Maritime Vessel, Excavator, Building, Aircraft Hangar, and Storage Tank; the full list is in the Dataset YAML below. During conversion, the original challenge class IDs (11–94) are remapped to contiguous indices 0–59.
Link to this sectionApplications#
xView's fine-grained classes and high-resolution overhead viewpoint make it a standard benchmark for training and evaluating deep learning models in remote sensing. Common applications include:
- Military and defense reconnaissance
- Urban planning and development
- Environmental monitoring
- Disaster response and assessment
- Infrastructure mapping and management
For other overhead-imagery benchmarks, see the drone-focused VisDrone dataset or the oriented-box DOTA-v2 dataset.
Link to this sectionDataset YAML#
The xView.yaml file defines the dataset configuration — the dataset paths, the 60 class names, and the download script that converts the GeoJSON annotations and generates the autosplit. It is maintained in the Ultralytics repository at https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/xView.yaml.
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
# DIUx xView 2018 Challenge dataset https://challenge.xviewdataset.org by U.S. National Geospatial-Intelligence Agency (NGA)
# -------- Download and extract data manually to `datasets/xView` before running the train command. --------
# Documentation: https://docs.ultralytics.com/datasets/detect/xview
# Example usage: yolo train data=xView.yaml
# parent
# ├── ultralytics
# └── datasets
# └── xView ← downloads here (20.7 GB)
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
path: xView # dataset root dir
train: images/autosplit_train.txt # train images (relative to 'path') 90% of 847 train images
val: images/autosplit_val.txt # val images (relative to 'path') 10% of 847 train images
# Classes
names:
0: Fixed-wing Aircraft
1: Small Aircraft
2: Cargo Plane
3: Helicopter
4: Passenger Vehicle
5: Small Car
6: Bus
7: Pickup Truck
8: Utility Truck
9: Truck
10: Cargo Truck
11: Truck w/Box
12: Truck Tractor
13: Trailer
14: Truck w/Flatbed
15: Truck w/Liquid
16: Crane Truck
17: Railway Vehicle
18: Passenger Car
19: Cargo Car
20: Flat Car
21: Tank car
22: Locomotive
23: Maritime Vessel
24: Motorboat
25: Sailboat
26: Tugboat
27: Barge
28: Fishing Vessel
29: Ferry
30: Yacht
31: Container Ship
32: Oil Tanker
33: Engineering Vehicle
34: Tower crane
35: Container Crane
36: Reach Stacker
37: Straddle Carrier
38: Mobile Crane
39: Dump Truck
40: Haul Truck
41: Scraper/Tractor
42: Front loader/Bulldozer
43: Excavator
44: Cement Mixer
45: Ground Grader
46: Hut/Tent
47: Shed
48: Building
49: Aircraft Hangar
50: Damaged Building
51: Facility
52: Construction Site
53: Vehicle Lot
54: Helipad
55: Storage Tank
56: Shipping container lot
57: Shipping Container
58: Pylon
59: Tower
# Download script/URL (optional) ---------------------------------------------------------------------------------------
download: |
import json
from pathlib import Path
import shutil
import numpy as np
from PIL import Image
from ultralytics.utils import TQDM
from ultralytics.data.split import autosplit
from ultralytics.utils.ops import xyxy2xywhn
def convert_labels(fname=Path("xView/xView_train.geojson")):
"""Convert xView GeoJSON labels to YOLO format (classes 0-59) and save them as text files."""
path = fname.parent
with open(fname, encoding="utf-8") as f:
print(f"Loading {fname}...")
data = json.load(f)
# Make dirs
labels = path / "labels" / "train"
shutil.rmtree(labels, ignore_errors=True)
labels.mkdir(parents=True, exist_ok=True)
# xView classes 11-94 to 0-59
xview_class2index = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, -1, 3, -1, 4, 5, 6, 7, 8, -1, 9, 10, 11,
12, 13, 14, 15, -1, -1, 16, 17, 18, 19, 20, 21, 22, -1, 23, 24, 25, -1, 26, 27, -1, 28, -1,
29, 30, 31, 32, 33, 34, 35, 36, 37, -1, 38, 39, 40, 41, 42, 43, 44, 45, -1, -1, -1, -1, 46,
47, 48, 49, -1, 50, 51, -1, 52, -1, -1, -1, 53, 54, -1, 55, -1, -1, 56, -1, 57, -1, 58, 59]
shapes = {}
for feature in TQDM(data["features"], desc=f"Converting {fname}"):
p = feature["properties"]
if p["bounds_imcoords"]:
image_id = p["image_id"]
image_file = path / "train_images" / image_id
if image_file.exists(): # 1395.tif missing
try:
box = np.array([int(num) for num in p["bounds_imcoords"].split(",")])
assert box.shape[0] == 4, f"incorrect box shape {box.shape[0]}"
cls = p["type_id"]
cls = xview_class2index[int(cls)] # xView class to 0-59
assert 59 >= cls >= 0, f"incorrect class index {cls}"
# Write YOLO label
if image_id not in shapes:
shapes[image_id] = Image.open(image_file).size
box = xyxy2xywhn(box[None].astype(float), w=shapes[image_id][0], h=shapes[image_id][1], clip=True)
with open((labels / image_id).with_suffix(".txt"), "a", encoding="utf-8") as f:
f.write(f"{cls} {' '.join(f'{x:.6f}' for x in box[0])}\n") # write label.txt
except Exception as e:
print(f"WARNING: skipping one label for {image_file}: {e}")
# Download manually from https://challenge.xviewdataset.org
dir = Path(yaml["path"]) # dataset root dir
# urls = [
# "https://d307kc0mrhucc3.cloudfront.net/train_labels.zip", # train labels
# "https://d307kc0mrhucc3.cloudfront.net/train_images.zip", # 15G, 847 train images
# "https://d307kc0mrhucc3.cloudfront.net/val_images.zip", # 5G, 282 val images (no labels)
# ]
# download(urls, dir=dir)
# Convert labels
convert_labels(dir / "xView_train.geojson")
# Move images
images = Path(dir / "images")
images.mkdir(parents=True, exist_ok=True)
Path(dir / "train_images").rename(dir / "images" / "train")
Path(dir / "val_images").rename(dir / "images" / "val")
# Split
autosplit(dir / "images" / "train")Link to this sectionUsage#
Training expects the manual download described above to be extracted under datasets/xView/; annotation conversion and the train/val split then run automatically.
To train a model on the xView dataset for 100 epochs with an image size of 640, you can use the following code snippets. For a comprehensive list of available arguments, refer to the model Training page.
from ultralytics import YOLO
# Load a model
model = YOLO("yolo26n.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data="xView.yaml", epochs=100, imgsz=640)To label additional satellite images and manage xView training runs in your browser, use Ultralytics Platform.
Link to this sectionSample Data and Annotations#
The sample below shows a typical xView scene: high-resolution overhead imagery in which small objects such as vehicles and buildings are annotated with bounding boxes, illustrating why object detection in satellite imagery demands fine-grained localization.

Link to this sectionCitations and Acknowledgments#
If you use the xView dataset in your research or development work, please cite the following paper:
@misc{lam2018xview,
title={xView: Objects in Context in Overhead Imagery},
author={Darius Lam and Richard Kuzma and Kevin McGee and Samuel Dooley and Michael Laielli and Matthew Klaric and Yaroslav Bulatov and Brendan McCord},
year={2018},
eprint={1802.07856},
archivePrefix={arXiv},
primaryClass={cs.CV}
}We would like to acknowledge the Defense Innovation Unit (DIU) and the creators of the xView dataset for their valuable contribution to the computer vision research community. For more information, visit the xView dataset website.
Link to this sectionFAQ#
Link to this sectionWhat is the xView dataset and how does it benefit computer vision research?#
The xView dataset is a satellite-imagery benchmark released for the DIUx xView 2018 Challenge by the U.S. National Geospatial-Intelligence Agency, providing over 1 million object instances across 60 fine-grained classes in 0.3 m WorldView-3 imagery. It supports research on detecting small, rare, and fine-grained objects in overhead views, which are far harder targets than those in ground-level photos.
Link to this sectionHow do I download and set up the xView dataset?#
xView requires a manual download: register at the DIUx xView 2018 Challenge website, download train_images.zip (~15 GB), train_labels.zip, and val_images.zip (~5 GB) — about 20.7 GB in total — and extract them under datasets/xView/ following the layout shown in the warning at the top of this page. On the first training run, Ultralytics automatically converts the GeoJSON annotations to YOLO format and creates the train/validation split.
Link to this sectionHow many images and classes does xView have?#
xView contains 847 labeled training images and 282 validation images without public labels, all captured by WorldView-3 satellites at 0.3 m resolution. Annotations cover over 1 million object instances across 60 classes. Because only the training labels are public, the Ultralytics xView.yaml configuration splits the 847 labeled images roughly 90/10 into training and validation sets; see Dataset Structure for details.
Link to this sectionHow do I train a YOLO26 model on the xView dataset?#
Train a YOLO26n model on xView for 100 epochs at an image size of 640:
from ultralytics import YOLO
# Load a model
model = YOLO("yolo26n.pt") # load a pretrained model (recommended for training)
# Train the model
results = model.train(data="xView.yaml", epochs=100, imgsz=640)For detailed arguments and settings, refer to the model Training page.
Link to this sectionHow do I cite the xView dataset in my research?#
Cite the paper "xView: Objects in Context in Overhead Imagery" (Lam et al., arXiv:1802.07856, 2018); the full BibTeX entry is in the Citations and Acknowledgments section above.