cppe5

Code for our paper CPPE - 5 (Medical Personal Protective Equipment), a new challenging object detection dataset

https://github.com/rishit-dagli/cppe-dataset

Science Score: 41.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.8%) to scientific vocabulary

Keywords

artificial-intelligence computer-vision cppe5 data dataset deep-learning machine-learning models object-detection pretrained-models pytorch tensorflow vision
Last synced: 6 months ago · JSON representation ·

Repository

Code for our paper CPPE - 5 (Medical Personal Protective Equipment), a new challenging object detection dataset

Basic Info
Statistics
  • Stars: 69
  • Watchers: 2
  • Forks: 14
  • Open Issues: 0
  • Releases: 2
Topics
artificial-intelligence computer-vision cppe5 data dataset deep-learning machine-learning models object-detection pretrained-models pytorch tensorflow vision
Created almost 5 years ago · Last pushed over 1 year ago
Metadata Files
Readme Contributing License Citation Codeowners

README.md

CPPE - 5 Twitter

GitHub Repo stars arXiv Models TF Hub

PyPI Code style: black

CPPE - 5 (Medical Personal Protective Equipment) is a new challenging dataset with the goal to allow the study of subordinate categorization of medical personal protective equipments, which is not possible with other popular data sets that focus on broad level categories.

Accompanying paper: CPPE - 5: Medical Personal Protective Equipment Dataset

by Rishit Dagli and Ali Mustufa Shaikh.

Some features of this dataset are: - high quality images and annotations (~4.6 bounding boxes per image) - real-life images unlike any current such dataset - majority of non-iconic images (allowing easy deployment to real-world environments) - >15 pre-trained models in the model zoo availaible to directly use (also for mobile and edge devices)

Updates

Get the data

We strongly recommend you use either the downlaoder script or the Python package to download the dataset however you could also download and extract it manually.

| Name | Size | Drive | wget Link | MD5 checksum | |:----:|:----:|:----:|:----:|:------------:| | dataset.tar.gz | ~230 MB | Download | Download | f4e043f983cff94ef82ef7d57a879212 |

Downloader Script

The easiest way to download the dataset is to use the downloader script:

bash git clone https://github.com/Rishit-dagli/CPPE-Dataset.git cd CPPE-Dataset bash tools/download_data.sh

Python package

You can also use the Python package to get the dataset:

bash pip install cppe5

python import cppe5 cppe5.download_data()

Data Loaders

We provide PyTorch and TensorFlow data loaders in this repository, the dataset can also be loaded from Hugging Face Datasets. To use the data loaders in this repository you would need to install the Python package first:

bash pip install cppe5

Hugging Face Datasets

Install the datasets library first:

bash pip install datasets

```py from datasets import load_dataset

dataset = load_dataset("cppe-5") ```

PyTorch DataLoader

A ready to run Google Colab example can be found at notebooks/pytorch_loader.ipynb.

```py import cppe5 from cppe5.torch import data_loader import os

cppe5.downloaddata() os.chdir("..") dataloader = cppe5.torch.data_loader() # torch.utils.data.DataLoader

Fetch all images and annotations

device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")

DataLoader is iterable over Dataset

for imgs, annotations in data_loader: imgs = list(img.to(device) for img in imgs) annotations = [{k: v.to(device) for k, v in t.items()} for t in annotations] ```

TensorFlow Loader

A ready to run Google Colab example can be found at notebooks/tensorflow_loader.ipynb.

```py import cppe5 from cppe5.tensorflow import data_loader

cppe5.download_tfrecords() os.chdir("..")

dataset = cppe5.tensorflow.data_loader() # tf.data.Dataset iter(dataset).next() ```

Labels

The dataset contains the following labels:

| Label | Description | |:----:|:-------------| | 1 | Coverall | | 2 | Face_Shield | | 3 | Gloves | | 4 | Goggles | | 5 | Mask |

Model Zoo

More information about the pre-trained models (like modlel complexity or FPS benchmark) could be found in MODEL_ZOO.md and LITEMODELZOO.md includes models ready for deployment on mobile and edge devices.

Baseline Models

This section contains the baseline models that are trained on the CPPE-5 dataset . More information about how these are trained could be found in the original paper and the config files.

| Method | APbox | AP50box | AP75box | APSbox | APMbox | APLbox | Configs | TensorBoard.dev | PyTorch model | TensorFlow model | |:-----------:|:--------------------------:|:---------------------------------------:|:---------------------------------------:|:----------------------------------------:|:----------------------------------------:|:----------------------------------------:|:-------:|:------:|:-------:|:------:| | SSD | 29.50 | 57.0 | 24.9 | 32.1 | 23.1 | 34.6 | config | tb.dev | bucket | bucket | | YOLO | 38.5 | 79.4 | 35.3 | 23.1 | 28.4 | 49.0 | config | tb.dev | bucket | bucket | | Faster RCNN | 44.0 | 73.8 | 47.8 | 30.0 | 34.7 | 52.5 | config | tb.dev | bucket | bucket |

SoTA Models

This section contains the SoTA models that are trained on the CPPE-5 dataset . More information about how these are trained could be found in the original paper and the config files.

| Method | APbox | AP50box | AP75box | APSbox | APMbox | APLbox | Configs | TensorBoard.dev | PyTorch model | TensorFlow model | |:--------------------------:|:----------:|:-----------------:|:-----------------:|:----------------:|:----------------:|:----------------:|:------------:|:----------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------------------:|:------------------------------------------------------------------------------------------------:| | RepPoints | 43.0 | 75.9 | 40.1 | 27.3 | 36.7 | 48.0 | config | tb.dev | bucket | - | | Sparse RCNN | 44.0 | 69.6 | 44.6 | 30.0 | 30.6 | 54.7 | config | tb.dev | bucket | - | | FCOS | 44.4 | 79.5 | 45.9 | 36.7 | 39.2 | 51.7 | config | tb.dev | bucket | bucket | | Grid RCNN | 47.5 | 77.9 | 50.6 | 43.4 | 37.2 | 54.4 | config | tb.dev | bucket | - | | Deformable DETR | 48.0 | 76.9 | 52.8 | 36.4 | 35.2 | 53.9 | config | tb.dev | bucket | - | | FSAF | 49.2 | 84.7 | 48.2 | 45.3 | 39.6 | 56.7 | config | tb.dev | bucket | bucket | | Localization Distillation | 50.9 | 76.5 | 58.8 | 45.8 | 43.0 | 59.4 | config | tb.dev | bucket | - | | VarifocalNet | 51.0 | 82.6 | 56.7 | 39.0 | 42.1 | 58.8 | config | tb.dev | bucket | - | | RegNet | 51.3 | 85.3 | 51.8 | 35.7 | 41.1 | 60.5 | config | tb.dev | bucket | bucket | | Double Heads | 52.0 | 87.3 | 55.2 | 38.6 | 41.0 | 60.8 | config | tb.dev | bucket | - | | DCN | 51.6 | 87.1 | 55.9 | 36.3 | 41.4 | 61.3 | config | tb.dev | bucket | - | | Empirical Attention | 52.5 | 86.5 | 54.1 | 38.7 | 43.4 | 61.0 | config | tb.dev | bucket | - | | TridentNet | 52.9 | 85.1 | 58.3 | 42.6 | 41.3 | 62.6 | config | tb.dev | bucket | bucket |

Tools

We also include the following tools in this repository to make working with the dataset a lot easier:

  • Download data
  • Download TF Record files
  • Convert PNG images in dataset to JPG Images
  • Converting Pascal VOC to COCO format
  • Update dataset to use relative paths

More information about each tool can be found in the tools/README.md file.

Tutorials

We also present some tutorials on how to use the dataset in this repository as Colab notebooks:

In this notebook we will load the CPPE - 5 dataset in PyTorch and also see a quick example of fine-tuning the Faster RCNN model with torchvision on this dataset.

In this notebook we will load the CPPE - 5 dataset through TF Record files in TensorFlow.

In this notebook, we will visualize the CPPE-5 dataset, which could be really helpful to see some sample images and annotations from the dataset.

Citation

If you use this work, please cite the following paper:

BibTeX:

bibtex @misc{dagli2021cppe5, title={CPPE-5: Medical Personal Protective Equipment Dataset}, author={Rishit Dagli and Ali Mustufa Shaikh}, year={2021}, eprint={2112.09569}, archivePrefix={arXiv}, primaryClass={cs.CV} }

MLA:

Dagli, Rishit, and Ali Mustufa Shaikh. ‘CPPE-5: Medical Personal Protective Equipment Dataset’. ArXiv:2112.09569 [Cs], Dec. 2021. arXiv.org, http://arxiv.org/abs/2112.09569.

Acknoweldgements

The authors would like to thank Google for supporting this work by providing Google Cloud credits. The authors would also like to thank Google TPU Research Cloud (TRC) program for providing access to TPUs. The authors are also grateful to Omkar Agrawal for help with verifying the difficult annotations.

Want to Contribute 🙋‍♂️?

Awesome! If you want to contribute to this project, you're always welcome! See Contributing Guidelines. You can also take a look at open issues for getting more information about current or upcoming tasks.

Want to discuss? 💬

Have any questions, doubts or want to present your opinions, views? You're always welcome. You can start discussions.

Have you used this work in your paper, blog, experiments, or more please share it with us by making a discussion under the Show and Tell category.

Owner

  • Name: Rishit Dagli
  • Login: Rishit-dagli
  • Kind: user
  • Location: Toronto, CA
  • Company: UofT, @nvidia

learning algorithms researcher: vision, graphics, machine learning

Citation (CITATION.bib)

@misc{dagli2021cppe5,
      title={CPPE-5: Medical Personal Protective Equipment Dataset}, 
      author={Rishit Dagli and Ali Mustufa Shaikh},
      year={2021},
      eprint={2112.09569},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

GitHub Events

Total
  • Watch event: 3
  • Issue comment event: 1
  • Fork event: 1
Last Year
  • Watch event: 3
  • Issue comment event: 1
  • Fork event: 1

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 90
  • Total Committers: 4
  • Avg Commits per committer: 22.5
  • Development Distribution Score (DDS): 0.044
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Rishit Dagli r****i@g****m 86
Shaikh Ali Mustufa a****4@g****m 2
Michael I Chen m****0@g****m 1
Daniel Syahputra 5****3 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 8
  • Total pull requests: 5
  • Average time to close issues: about 2 years
  • Average time to close pull requests: 8 months
  • Total issue authors: 7
  • Total pull request authors: 4
  • Average comments per issue: 1.63
  • Average comments per pull request: 0.0
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • pgy1go (2)
  • Angelo2707 (1)
  • abhi-kumar (1)
  • matciotola (1)
  • albertvillanova (1)
  • wqangzuoshuai (1)
  • MMB019 (1)
Pull Request Authors
  • imgbot[bot] (2)
  • michen00 (2)
  • danielsyahputra (2)
  • ialimustufa (1)
Top Labels
Issue Labels
enhancement (4) bug (3) question (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 22 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 2
  • Total maintainers: 2
pypi.org: cppe5

A library to easily download, load and work with the CPPE-5 dataset.

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 22 Last month
Rankings
Stargazers count: 8.5%
Forks count: 9.6%
Dependent packages count: 10.0%
Average: 15.7%
Dependent repos count: 21.7%
Downloads: 28.9%
Maintainers (2)
Last synced: 6 months ago

Dependencies

setup.py pypi
  • gdown *