task_categories:object-detection size_categories:10B<n<100B language:en license:cc-by-4.0 region:us
---
language:
- en
license: cc-by-4.0
size_categories:
- 10B<n<100B
task_categories:
- object-detection
pretty_name: XView
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
dataset_info:
  features:
  - name: index
    dtype: int64
  - name: image_id
    dtype: string
  - name: image
    dtype: image
  - name: width
    dtype: int64
  - name: height
    dtype: int64
  - name: objects
    struct:
    - name: area
      sequence: int64
    - name: bbox
      sequence:
        sequence: int64
    - name: category
      sequence: int64
    - name: id
      sequence: int64
  splits:
  - name: train
    num_bytes: 24714436010.0
    num_examples: 846
  download_size: 22043770037
  dataset_size: 24714436010.0
---

# Dataset Card for Xview

## Table of Contents
- [How to Use](#How-to-Use)
- [Dataset Description](#dataset-description)
  - [Dataset Summary](#dataset-summary)
- [Dataset Structure](#dataset-structure)
  - [Data Instances](#data-instances)
  - [Data Fields](#data-fields)
  - [Data Splits](#data-splits)
- [Additional Information](#additional-information)
  - [Licensing Information](#licensing-information)


## How to Use

- Install [datasets](https://pypi.org/project/datasets/):

```bash
pip install datasets
```
- How to use in Python
```py
from datasets import load_dataset
train_data = load_dataset("Honaker/xview_dataset", split="train")
```

## Dataset Description
- **Homepage:** http://xviewdataset.org/

### Dataset Summary
Xview is an object detection dataset of 60 unique classes and 1 million different object instances. The train image folder consists of over 4000 satielle images 
where objects are labeled with a certain bounding box located in the geojson file. (Had to take out all elements of dataset that link to 1395.tif image
since that wasn't in the most current dataset. Also had to take out 10 or so objects that had incorrect bounding boxes. Wasn't able to get geojson of 
validation images, so that hasn't been adding in yet to datacard.)


## Dataset Structure

The dataset is structured as follows:
```py
DatasetDict({
    train: Dataset({
        features: ['index', 'image_id', 'image', 'width', 'height', 'objects'],
        num_rows: 846
    })
})
```

### Data Instances

An example of the data for one image is:
```py
{
 'index': 0,
 'image_id': '10.tif',
 'image': <PIL.TiffImagePlugin.TiffImageFile image mode=RGB size=3320x3228>,
 'width': 3320,
 'height': 3228,
 'objects':{['area', 'bbox', 'category', 'id']}
 ```
 
 With the type of each field being defined as:
 ```py
{
 'index': Integer,
 'image_id': String of image name,
 'image': <PIL.TiffImagePlugin.TiffImageFile image>,
 'width': Integer,
 'height': Integer,
 'objects': Dictionary containing 4 keys: ['area', 'bbox', 'category', 'id']
```
### Data Fields

The dataset has the following fields:

 - 'index': Index number of training Image
 - 'image_id': String of image name from train_images folder in xview dataset
 - 'image': Satellite image that is of type <PIL.TiffImagePlugin.TiffImageFile image>
 - 'width': Width size of image
 - 'height': Height size of image
 - 'objects': Dictionary that has python lists of following keys "area key: area of object from bbox, bbox key: xmin,ymin,xmax,ymax locations of object inside image,
              category key: label of object, id key: index value of object inside dataset"

### Data Splits

|                | Train  | Validation | Test |
|----------------|--------|------------|------|
| Images         | 846    | 281       | 0    |
| Bounding boxes | 601806 | 0       | 0    |

## Additional Information

### Licensing Information

Xview is licensed under a Creative Commons Attribution 4.0 International License.
