XAMI-dataset / README.md
iulia-elisa's picture
Update README.md
bda3c82 verified
|
raw
history blame
4.78 kB
metadata
size_categories:
  - 1K<N<10K
source_datasets:
  - original
task_categories:
  - image-segmentation
task_ids:
  - instance-segmentation
pretty_name: XAMI-dataset
tags:
  - COCO format
  - Astronomy
  - XMM-Newton
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
      - split: validation
        path: data/valid-*
dataset_info:
  features:
    - name: observation id
      dtype: string
    - name: segmentation
      dtype: image
    - name: bbox
      dtype: image
    - name: label
      dtype: string
    - name: area
      dtype: string
    - name: image shape
      dtype: string
  splits:
    - name: train
      num_bytes: 66654394
      num_examples: 105
    - name: validation
      num_bytes: 74471782
      num_examples: 126
  download_size: 141102679
  dataset_size: 141126176

XAMI-dataset

The Git repository for this dataset can be found here.

The XAMI dataset contains 1000 annotated images of observations from diverse sky regions of the XMM-Newton Optical Monitor (XMM-OM) image catalog. An additional 50 images with no annotations are included to help decrease the amount of False Positives or Negatives that may be caused by complex objects (e.g., large galaxies, clusters, nebulae).

Artefacts

A particularity of our XAMI dataset compared to every-day images datasets are the locations where artefacts usually appear. Examples of an image with multiple artefacts.

Here are some examples of common artefacts in the dataset:

Examples of common artefacts in the OM observations.

Annotation platforms

The images have been annotated using the following projects:

The dataset format

The dataset is splited into train and validation categories and contains annotated artefacts in COCO format for Instance Segmentation. We use multilabel Stratified K-fold technique (k=4) to balance class distributions across splits. We choose to work with a single dataset splits version (out of 4), but also provide means to work with all 4 versions.

Please check Dataset Structure for a more detailed structure of our dataset in COCO and YOLOv8-Seg format.

Downloading the dataset

The dataset repository can be found on HuggingFace and Github.

Downloading the dataset archive from HuggingFace:

from huggingface_hub import hf_hub_download
import pandas as pd

dataset_name = 'dataset_archive' # the dataset name of Huggingface
images_dir = '.' # the output directory of the dataset images
annotations_path = os.path.join(images_dir, dataset_name, '_annotations.coco.json')

for filename in [dataset_name, utils_filename]:
  hf_hub_download(
    repo_id="iulia-elisa/XAMI-dataset", # the Huggingface repo ID
    repo_type='dataset', 
    filename=filename, 
    local_dir=images_dir
  );

# Unzip file
!unzip "dataset_archive.zip"

# Read the json annotations file
with open(annotations_path) as f:
    data_in = json.load(f)

or

- using a CLI command:
```bash
huggingface-cli download iulia-elisa/XAMI-dataset dataset_archive.zip --repo-type dataset --local-dir '/path/to/local/dataset/dir'

Cloning the repository for more visualization tools

Clone the repository locally:

# Github
git clone https://github.com/ESA-Datalabs/XAMI-dataset.git
cd XAMI-dataset

or

# HuggingFace
git clone https://huggingface.co/datasets/iulia-elisa/XAMI-dataset.git
cd XAMI-dataset

Dataset Split with SKF (Optional)

  • The below method allows for dataset splitting, using the pre-generated splits in CSV files. This step is useful when training multiple dataset splits versions to gain mor generalised view on metrics.
import utils

# run multilabel SKF split with the standard k=4
csv_files = ['mskf_0.csv', 'mskf_1.csv', 'mskf_2.csv', 'mskf_3.csv'] 

for idx, csv_file in enumerate(csv_files):
    mskf = pd.read_csv(csv_file)
    utils.create_directories_and_copy_files(images_dir, data_in, mskf, idx)

Licence

...