Skip to main content

Detection Moving MNIST Dataset

Version Easy

Detection Moving MNIST Dataset (Easy) annotated video 1 Detection Moving MNIST Dataset (Easy) annotated video 2 Detection Moving MNIST Dataset (Easy) annotated video 3

Version Medium

annotated_video_medium_cp_3.gif annotated_video_medium_cp_3.gif annotated_video_medium_cp_3.gif annotated_video_medium_cp_3.gif annotated_video_medium_cp_3.gif annotated_video_medium_cp_3.gif annotated_video_medium_cp_3.gif annotated_video_medium_cp_3.gif annotated_video_medium_cp_3.gif annotated_video_medium_cp_3.gif

This dataset extends the original Moving MNIST dataset. A few variations on how digits move are added.

In this dataset, each frame is padded to have a resolution of image size 128x128. Each frame is also provided with annotations for object detection (center point detection).

Setup repository

conda create -n detection_moving_mnist python=3.11
conda activate detection_moving_mnist
pip install -r requirements.txt

How to generate torch-tensor-format datasets

python3 generate.py -h                    
usage: generate.py [-h] [--version VERSION] [--split SPLIT] [--num_frames_per_video NUM_FRAMES_PER_VIDEO] [--num_videos NUM_VIDEOS] [--num_videos_hard NUM_VIDEOS_HARD] [--whole_dataset] [--seed SEED] [--hf_videofolder_format] [--hf_arrow_format]

Generate Detection MovingMNIST dataset with specified parameters.

options:
  -h, --help            show this help message and exit
  --version VERSION     MMNIST version: easy
  --split SPLIT         Dataset splits: train, test
  --num_frames_per_video NUM_FRAMES_PER_VIDEO
                        Number of frames per video.
  --num_videos NUM_VIDEOS
                        Number of videos.
  --num_videos_hard NUM_VIDEOS_HARD
                        Number of videos hard limit used when whole_dataset is set.
  --whole_dataset       We make sure all MNIST digits are used for the dataset.
  --seed SEED           Seed.
  --hf_videofolder_format
                        Save in Hugging Face video folder format.
  --hf_arrow_format     Save in Hugging Face arrow format.

Example:

python3 generate.py --split train --version easy --num_frames_per_video 20 --num_videos 60000 --num_videos_hard 120000 --whole_dataset --hf_arrow_format

How to convert torch-tensor-format to huggingface videofolder format

python3 to_video.py -h                                                                                         
usage: to_video.py [-h] [--version VERSION] [--split SPLIT] [--in_place]

Convert torch-tensor-format to huggingface videofolder format.

options:
  -h, --help         show this help message and exit
  --version VERSION  MMNIST version: easy, medium, hard, random
  --split SPLIT      Dataset splits: train, test
  --in_place         Remove source files during conversion to save space

Example:

python3 to_video.py --version easy --split test

Video conversion uses a rate of 10 frames per second. This can be adjusted in src/utils/utils.py.

How to calculate dataset statistics (huggingface arrow format).

Important this script supports only huggingface videofolder format.

python3 calculate_dataset_statistics.py -h
usage: calculate_dataset_statistics.py [-h] --dataset_dir DATASET_DIR [--splits SPLITS [SPLITS ...]]

Calculate dataset statistics and create distribution histograms

options:
  -h, --help            show this help message and exit
  --dataset_dir DATASET_DIR
                        Root directory of dataset in Hugging Face videofolder format
  --splits SPLITS [SPLITS ...]
                        Dataset splits to process (e.g., train,test)

Example:

python3 calculate_dataset_statistics.py --dataset_dir mmnist-dataset/huggingface-arrow-format/mmnist-easy

Acknowledgements

This project is based on and modified from the repository:

We extend our gratitude to the original author @YichengShen for their work.

Metadata

Release files for detection-moving-mnist 0.4.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for detection-moving-mnist 0.4.3
File Size Uploaded
detection_moving_mnist-0.4.3.tar.gz 18.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for detection-moving-mnist 0.4.3
File Interpreter ABI Platform
detection_moving_mnist-0.4.3-py3-none-any.whl Python 3 none any Details

Total release size: 36.9 kB

Release files / detection_moving_mnist-0.4.3.tar.gz

Download URL detection_moving_mnist-0.4.3.tar.gz
Size 18.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6049edd1ba30a0983cf5b6d50f4f296c1237a6ac324f6b8539d40519c7101b89
BLAKE2b-256 checksum
How to use checksums
bf56beb9ef04e76006edacd8169cfe686df8224b39fdb87399724b487737e6ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / detection_moving_mnist-0.4.3-py3-none-any.whl

Download URL detection_moving_mnist-0.4.3-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a30da3345ece067087b3838333df09ccbbbd8ce185fd2fe12d00acae01e991ef
BLAKE2b-256 checksum
How to use checksums
a3dd19fc7dee1cbc41cce71547395bea4feced4802170479d879927f6f723dc4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release history Release notifications | RSS feed

This release

0.4.3 This release

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page