Skip to content

An arrow dataset for collaborative and federated learning experiments

Notifications You must be signed in to change notification settings

mohahf19/arrow-dataset

Repository files navigation

The Arrow Dataset

About

This repository contains scripts that generate the arrow dataset. This dataset contains images that are constructed as follows:

  • A background images are selected from the red_caps dataset.
  • The arrows are taken from here.

Then we sample n images from the red_caps dataset and overlay the m arrows on top of them. Each arrow is overlayed on each image at a position and random angle k times. This creates a dataset of n * m * k images.

We select n=1000, m=10, and k=4 to create a dataset of 40,000 images.

Samples

Here are some samples from the dataset:

samples

Usage

First, create the virtual environment:

micromamba create -f environment.yml

then activate and run the script:

micromamba activate arrow-dataset
python generate_dataset.py [-h] [--n N] [--k K] [--arrow-dir ARROW_DIR] [--background-dir BACKGROUND_DIR] [--output-dir OUTPUT_DIR]

where the usage is:

usage: generate_dataset.py [-h] [--n N] [--k K] [--arrow-dir ARROW_DIR] [--background-dir BACKGROUND_DIR] [--output-dir OUTPUT_DIR]

Generate the arrow dataset for training

options:
  -h, --help            show this help message and exit
  --n N                 Number of background images to to use
  --k K                 Number of arrows to place on each background image
  --arrow-dir ARROW_DIR
                        Directory containing arrow images
  --background-dir BACKGROUND_DIR
                        Directory to download the background images to
  --output-dir OUTPUT_DIR
                        Directory to save the generated dataset

About

An arrow dataset for collaborative and federated learning experiments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published