Vai al contenuto

Set di dati VisDrone

The VisDrone Dataset is a large-scale benchmark created by the AISKYEYE team at the Lab of Machine Learning and Data Mining, Tianjin University, China. It contains carefully annotated ground truth data for various computer vision tasks related to drone-based image and video analysis.



Guarda: Come addestrare i modelli di Ultralytics YOLO sul dataset VisDrone per l'analisi delle immagini dei droni

VisDrone è composto da 288 video clip con 261.908 fotogrammi e 10.209 immagini statiche, catturate da varie telecamere montate su droni. Il set di dati copre un'ampia gamma di aspetti, tra cui la posizione (14 città diverse in Cina), l'ambiente (urbano e rurale), gli oggetti (pedoni, veicoli, biciclette, ecc.) e la densità (scene rade e affollate). Il set di dati è stato raccolto utilizzando varie piattaforme di droni in diversi scenari e condizioni atmosferiche e di illuminazione. Questi fotogrammi sono annotati manualmente con oltre 2,6 milioni di bounding box di obiettivi come pedoni, automobili, biciclette e tricicli. Vengono inoltre forniti attributi come la visibilità della scena, la classe dell'oggetto e l'occlusione per un migliore utilizzo dei dati.

Struttura del set di dati

Il set di dati VisDrone è organizzato in cinque sottoinsiemi principali, ognuno dei quali si concentra su un compito specifico:

  1. Compito 1: Rilevamento di oggetti nelle immagini
  2. Compito 2: Rilevamento di oggetti nei video
  3. Attività 3: Tracciamento di un singolo oggetto
  4. Attività 4: Tracciamento di più oggetti
  5. Attività 5: Conteggio delle folle

Applicazioni

The VisDrone dataset is widely used for training and evaluating deep learning models in drone-based computer vision tasks such as object detection, object tracking, and crowd counting. The dataset's diverse set of sensor data, object annotations, and attributes make it a valuable resource for researchers and practitioners in the field of drone-based computer vision.

Set di dati YAML

Un file YAML (Yet Another Markup Language) viene utilizzato per definire la configurazione del dataset. Contiene informazioni sui percorsi del dataset, sulle classi e altre informazioni rilevanti. Nel caso del set di dati Visdrone, il file VisDrone.yaml Il file viene mantenuto all'indirizzo https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/VisDrone.yaml.

ultralytics/cfg/datasets/VisDrone.yaml

# Ultralytics YOLO 🚀, AGPL-3.0 license
# VisDrone2019-DET dataset https://github.com/VisDrone/VisDrone-Dataset by Tianjin University
# Documentation: https://docs.ultralytics.com/datasets/detect/visdrone/
# Example usage: yolo train data=VisDrone.yaml
# parent
# ├── ultralytics
# └── datasets
#     └── VisDrone  ← downloads here (2.3 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: ../datasets/VisDrone # dataset root dir
train: VisDrone2019-DET-train/images # train images (relative to 'path')  6471 images
val: VisDrone2019-DET-val/images # val images (relative to 'path')  548 images
test: VisDrone2019-DET-test-dev/images # test images (optional)  1610 images

# Classes
names:
  0: pedestrian
  1: people
  2: bicycle
  3: car
  4: van
  5: truck
  6: tricycle
  7: awning-tricycle
  8: bus
  9: motor

# Download script/URL (optional) ---------------------------------------------------------------------------------------
download: |
  import os
  from pathlib import Path

  from ultralytics.utils.downloads import download

  def visdrone2yolo(dir):
      from PIL import Image
      from tqdm import tqdm

      def convert_box(size, box):
          # Convert VisDrone box to YOLO xywh box
          dw = 1. / size[0]
          dh = 1. / size[1]
          return (box[0] + box[2] / 2) * dw, (box[1] + box[3] / 2) * dh, box[2] * dw, box[3] * dh

      (dir / 'labels').mkdir(parents=True, exist_ok=True)  # make labels directory
      pbar = tqdm((dir / 'annotations').glob('*.txt'), desc=f'Converting {dir}')
      for f in pbar:
          img_size = Image.open((dir / 'images' / f.name).with_suffix('.jpg')).size
          lines = []
          with open(f, 'r') as file:  # read annotation.txt
              for row in [x.split(',') for x in file.read().strip().splitlines()]:
                  if row[4] == '0':  # VisDrone 'ignored regions' class 0
                      continue
                  cls = int(row[5]) - 1
                  box = convert_box(img_size, tuple(map(int, row[:4])))
                  lines.append(f"{cls} {' '.join(f'{x:.6f}' for x in box)}\n")
                  with open(str(f).replace(f'{os.sep}annotations{os.sep}', f'{os.sep}labels{os.sep}'), 'w') as fl:
                      fl.writelines(lines)  # write label.txt


  # Download
  dir = Path(yaml['path'])  # dataset root dir
  urls = ['https://github.com/ultralytics/assets/releases/download/v0.0.0/VisDrone2019-DET-train.zip',
          'https://github.com/ultralytics/assets/releases/download/v0.0.0/VisDrone2019-DET-val.zip',
          'https://github.com/ultralytics/assets/releases/download/v0.0.0/VisDrone2019-DET-test-dev.zip',
          'https://github.com/ultralytics/assets/releases/download/v0.0.0/VisDrone2019-DET-test-challenge.zip']
  download(urls, dir=dir, curl=True, threads=4)

  # Convert
  for d in 'VisDrone2019-DET-train', 'VisDrone2019-DET-val', 'VisDrone2019-DET-test-dev':
      visdrone2yolo(dir / d)  # convert VisDrone annotations to YOLO labels

Utilizzo

To train a YOLO11n model on the VisDrone 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.

Esempio di treno

from ultralytics import YOLO

# Load a model
model = YOLO("yolo11n.pt")  # load a pretrained model (recommended for training)

# Train the model
results = model.train(data="VisDrone.yaml", epochs=100, imgsz=640)
# Start training from a pretrained *.pt model
yolo detect train data=VisDrone.yaml model=yolo11n.pt epochs=100 imgsz=640

Dati di esempio e annotazioni

Il dataset VisDrone contiene una serie di immagini e video catturati da telecamere montate su droni. Ecco alcuni esempi di dati del dataset, insieme alle relative annotazioni:

Immagine campione del set di dati

  • Task 1: Object detection in images - This image demonstrates an example of object detection in images, where objects are annotated with bounding boxes. The dataset provides a wide variety of images taken from different locations, environments, and densities to facilitate the development of models for this task.

L'esempio mostra la varietà e la complessità dei dati del dataset VisDrone e sottolinea l'importanza dei dati dei sensori di alta qualità per le attività di computer vision basate sui droni.

Citazioni e ringraziamenti

Se utilizzi il set di dati VisDrone nel tuo lavoro di ricerca o sviluppo, cita il seguente documento:

@ARTICLE{9573394,
  author={Zhu, Pengfei and Wen, Longyin and Du, Dawei and Bian, Xiao and Fan, Heng and Hu, Qinghua and Ling, Haibin},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
  title={Detection and Tracking Meet Drones Challenge},
  year={2021},
  volume={},
  number={},
  pages={1-1},
  doi={10.1109/TPAMI.2021.3119563}}

We would like to acknowledge the AISKYEYE team at the Lab of Machine Learning and Data Mining, Tianjin University, China, for creating and maintaining the VisDrone dataset as a valuable resource for the drone-based computer vision research community. For more information about the VisDrone dataset and its creators, visit the VisDrone Dataset GitHub repository.

DOMANDE FREQUENTI

Che cos'è il VisDrone Dataset e quali sono le sue caratteristiche principali?

The VisDrone Dataset is a large-scale benchmark created by the AISKYEYE team at Tianjin University, China. It is designed for various computer vision tasks related to drone-based image and video analysis. Key features include:

  • Composition: 288 video clips with 261,908 frames and 10,209 static images.
  • Annotations: Over 2.6 million bounding boxes for objects like pedestrians, cars, bicycles, and tricycles.
  • Diversity: Collected across 14 cities, in urban and rural settings, under different weather and lighting conditions.
  • Tasks: Split into five main tasks—object detection in images and videos, single-object and multi-object tracking, and crowd counting.

How can I use the VisDrone Dataset to train a YOLO11 model with Ultralytics?

To train a YOLO11 model on the VisDrone dataset for 100 epochs with an image size of 640, you can follow these steps:

Esempio di treno

from ultralytics import YOLO

# Load a pretrained model
model = YOLO("yolo11n.pt")

# Train the model
results = model.train(data="VisDrone.yaml", epochs=100, imgsz=640)
# Start training from a pretrained *.pt model
yolo detect train data=VisDrone.yaml model=yolo11n.pt epochs=100 imgsz=640

Per ulteriori opzioni di configurazione, consulta la pagina di formazione del modello.

Quali sono i principali sottoinsiemi del set di dati VisDrone e le loro applicazioni?

The VisDrone dataset is divided into five main subsets, each tailored for a specific computer vision task:

  1. Task 1: Object detection in images.
  2. Task 2: Object detection in videos.
  3. Task 3: Single-object tracking.
  4. Task 4: Multi-object tracking.
  5. Task 5: Crowd counting.

These subsets are widely used for training and evaluating deep learning models in drone-based applications such as surveillance, traffic monitoring, and public safety.

Dove posso trovare il file di configurazione per il dataset VisDrone in Ultralytics?

Il file di configurazione per il set di dati VisDrone, VisDrone.yaml, si trova nel repository Ultralytics al seguente link: VisDrone.yaml.

Come posso citare il dataset VisDrone se lo utilizzo nella mia ricerca?

Se utilizzi il set di dati VisDrone nel tuo lavoro di ricerca o sviluppo, cita il seguente documento:

@ARTICLE{9573394,
  author={Zhu, Pengfei and Wen, Longyin and Du, Dawei and Bian, Xiao and Fan, Heng and Hu, Qinghua and Ling, Haibin},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
  title={Detection and Tracking Meet Drones Challenge},
  year={2021},
  volume={},
  number={},
  pages={1-1},
  doi={10.1109/TPAMI.2021.3119563}
}
📅 Created 11 months ago ✏️ Updated 22 days ago

Commenti