File size: 4,385 Bytes
fabbb7e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e46d2ee
fabbb7e
 
e46d2ee
fabbb7e
1777cc6
e46d2ee
1777cc6
 
e46d2ee
fabbb7e
 
 
 
 
 
 
1777cc6
 
e46d2ee
 
 
 
 
fabbb7e
e46d2ee
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
edeba93
 
e46d2ee
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
---
dataset_info:
  features:
  - name: image_id
    dtype: int64
  - name: image
    dtype: image
  - name: width
    dtype: int64
  - name: height
    dtype: int64
  - name: objects
    sequence:
    - name: bbox_id
      dtype: int64
    - name: category
      dtype:
        class_label:
          names:
            '0': Airplane
            '1': Airport
            '2': Baseball field
            '3': Basketball court
            '4': Bridge
            '5': Chimney
            '6': Dam
            '7': Expressway service area
            '8': Expressway toll station
            '9': Golf course
            '10': Ground track field
            '11': Harbor
            '12': Overpass
            '13': Ship
            '14': Stadium
            '15': Storage tank
            '16': Tennis court
            '17': Train station
            '18': Vehicle
            '19': Wind mill
    - name: bbox
      sequence: int64
      length: 4
    - name: area
      dtype: int64
  splits:
  - name: train
    num_bytes: 5902685454
    num_examples: 18000
  - name: test
    num_bytes: 1150035824
    num_examples: 3463
  - name: validation
    num_bytes: 645393741
    num_examples: 2000
  download_size: 7626168863
  dataset_size: 7698115019
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: test
    path: data/test-*
  - split: validation
    path: data/validation-*
task_categories:
- object-detection
language:
- en
pretty_name: DIOR
---
# DIOR Hugging Face-Ready Vision Dataset

This dataset is a restructured version of the DIOR (Object Detection in Optical Remote Sensing Images), specifically designed to simplify object detection workflows. By converting them to the COCO format, this project provides an easier way to use DIOR with popular computer vision frameworks. Additionally, the dataset is formatted for seamless integration with Hugging Face datasets, unlocking new possibilities for training and experimentation.

## 📂 Dataset Structure
### COCO Format
The dataset follows the COCO dataset structure, making it straightforward to work with:

```plaintext
dior/  
├── annotations/  
│   ├── instances_train.json  
│   ├── instances_val.json  
│   └── instances_test.json  
├── train/
├── val/
├── test/
```
### Hugging Face Format
The dataset is compatible with the datasets library. You can load it directly using:

```python
from datasets import load_dataset  

dataset = load_dataset("HichTala/dior")
```

## 🖼️ Sample Visualizations

Above: An example of resized images with bounding boxes in COCO format.

## 🚀 Getting Started
### Install Required Libraries

- Install datasets for Hugging Face compatibility:

```bash
pip install datasets  
```
- Use any object detection framework supporting COCO format for training.

### Load the Dataset
#### Hugging Face:

```python
from datasets import load_dataset  

dataset = load_dataset("HichTala/dior")  
train_data = dataset["train"]  
```

#### Custom Script for COCO-Compatible Frameworks:
```python
import json  
from pycocotools.coco import COCO

coco = COCO("annotations/train.json")
```

see demo notebook [here](https://github.com/cocodataset/cocoapi/blob/master/PythonAPI/pycocoDemo.ipynb) for more details.

## 📚 Used in Research

This processed version of DIOR has been used in the paper:\
📄 [LoRA for Cross-Domain Few-Shot Object Detection](https://huggingface.co/papers/2504.06330)\
The dataset served as a target domain for evaluating the generalization capabilities of diffusion-based object detectors in low-data regimes.

## 📝 How to Cite
If you use this dataset, please consider citing the original DIOR dataset:

```plaintext
@article{Li_2020,
   title={Object detection in optical remote sensing images: A survey and a new benchmark},
   volume={159},
   ISSN={0924-2716},
   url={http://dx.doi.org/10.1016/j.isprsjprs.2019.11.023},
   DOI={10.1016/j.isprsjprs.2019.11.023},
   journal={ISPRS Journal of Photogrammetry and Remote Sensing},
   publisher={Elsevier BV},
   author={Li, Ke and Wan, Gang and Cheng, Gong and Meng, Liqiu and Han, Junwei},
   year={2020},
   month=jan, pages={296–307}}
```

Additionally, you can mention this repository for the resized COCO and Hugging Face formats.


Enjoy using DIOR in coco format for your object detection experiments! 🚀