slamanigg's picture
Update README.md
4783d8f verified
---
license: cc-by-4.0
tags:
- vision
- object-detection
dataset_info:
- config_name: default
base_datasets:
- coco
---
## Use Case
This dataset is useful for demonstrations of how to train tiny vision models. The size of the dataset was reduced from ~25GB to ~300MB/900MB (grayscale/color) for quick and easy installation. This dataset focuses of the binary task of detecting a person in the image (similar to Visual Wake Words) but still contains all labels (needs to be manually relabelled to use for binary task).
## Dataset Description
This dataset is a derivative work based on the **Microsoft COCO (Common Objects in Context) Dataset** created by the COCO Consortium. It modifies the original dataset by [briefly describe your changes,
applying the preprocessing described below.
## Preprocessing
1. Official COCO 2017 dataset.
2. Removal of all images tagged as "person" that do not have bounding boxes provided.
3. Boundig-box-aware cropping of the images to 1:1 aspect ratio (prevents cutting out the target information).
4. Downsampling to 64x64.
5. Transformation to grayscale (pixel dtype = uint8).
6. Removal of all iamges tagged as "person" that have small bounding boxes (area < 32x32 px).
7. Compression with GZIP.
**NOTE:** The "easy" version removes all images tagged as "person" that have bounding boxes with area < `int(0.85*TARGET_SIZE)**2`. Also the images are downsampled to 32x32 for fast demonstrations.
## Size
```
Total images in raw COCO dataset (train+test+val): 163,957
Images discarded: 87,856
Images remaining: 76,101
```
## How To Use
````python
import os
import tensorflow as tf
from huggingface_hub import snapshot_download
# Define the repository details
REPO_ID = "slamanigg/tiny-presence-detection"
# Download into a local cache directory
repo_dir = snapshot_download(repo_id=REPO_ID, repo_type="dataset")
print(f"Repository files successfully downloaded to: {repo_dir}\n")
# Pick a version and load
CHOSEN_VERSION = "tiny_presence_64_CH_1"
version_path = os.path.join(repo_dir, CHOSEN_VERSION)
loaded_ds = tf.data.Dataset.load(version_path,bcompression='GZIP')
print(loaded_ds)
````
## Limitations
This dataset was exported in tensorflow (2.20.0) and can therefor only be loaded with tensorflow.
## Citation
If you use this dataset, please cite the following original COCO dataset papers:
```bibtex
@inproceedings{Lin2014COCO,
author = {Lin, Tsung-Yi and Maire, Michael and Belongie, Serge and Hays, James and Perona, Pietro and Ramanan, Deva and Doll{\'a}r, Piotr and Zitnick, C. Lawrence},
title = {Microsoft COCO: Common Objects in Context},
booktitle = {Computer Vision -- ECCV 2014},
year = {2014},
pages = {740--755},
publisher = {Springer}
}
@article{Chen2015COCOCaptions,
title = {Microsoft {COCO} Captions: Data Collection and Evaluation Server},
author = {Chen, Xinlei and Fang, Hao and Lin, Tsung-Yi and Vedantam, Ramakrishna and Gupta, Saurabh and Doll{\'a}r, Piotr and Zitnick, C. Lawrence},
journal = {arXiv preprint arXiv:1504.00325},
year = {2015}
}