Package: cppe5
CPPE - 5CPPE - 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 Datasetby 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 datasetmajority 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)Updates06/01/2022 - Many thanks to@mariosaskofor creating aHugging Face Datasets loader.05/01/2022 - This paper got featured on Google Research TRC'spublication section20/12/2021 - First public release of the CPPE - 5 dataset on arXivGet the dataWe 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.NameSizeDriveBucketMD5 checksumdataset.tar.gz~230 MBDownloadDownloadf4e043f983cff94ef82ef7d57a879212Downloader ScriptThe easiest way to download the dataset is to use the downloader script:gitclonehttps://github.com/Rishit-dagli/CPPE-Dataset.gitcdCPPE-Dataset
bashtools/download.shPython packageYou can also use the Python package to get the dataset:pipinstallcppe5importcppe5cppe5.download_data()Data LoadersWe provide PyTorch and TensorFlow data loaders in this repository, the
dataset can also be loaded fromHugging Face Datasets. To use the data
loaders in this repository you would need to install the Python package
first:pipinstallcppe5Hugging Face DatasetsInstall the datasets library first:pipinstalldatasetsfromdatasetsimportload_datasetdataset=load_dataset("cppe-5")PyTorchDataLoaderA ready to run Google Colab example can be found atnotebooks/pytorch_loader.ipynb.importcppe5fromcppe5.torchimportdata_loaderimportoscppe5.download_data()os.chdir("..")data_loader=cppe5.torch.data_loader()# torch.utils.data.DataLoader# Fetch all images and annotationsdevice=torch.device("cuda")iftorch.cuda.is_available()elsetorch.device("cpu")# DataLoader is iterable over Datasetforimgs,annotationsindata_loader:imgs=list(img.to(device)forimginimgs)annotations=[{k:v.to(device)fork,vint.items()}fortinannotations]TensorFlow LoaderA ready to run Google Colab example can be found atnotebooks/tensorflow_loader.ipynb.importcppe5fromcppe5.tensorflowimportdata_loadercppe5.download_tfrecords()os.chdir("..")dataset=cppe5.tensorflow.data_loader()# tf.data.Datasetiter(dataset).next()LabelsThe dataset contains the following labels:LabelDescription1Coverall2Face_Shield3Gloves4Goggles5MaskModel ZooMore information about the pre-trained models (like modlel complexity or FPS benchmark) could be found inMODEL_ZOO.mdandLITE_MODEL_ZOO.mdincludes models ready for deployment
on mobile and edge devices.Baseline ModelsThis 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.MethodAPboxAP50boxAP75boxAPSboxAPMboxAPLboxConfigsTensorBoard.devPyTorch modelTensorFlow modelSSD29.5057.024.932.123.134.6configtb.devbucketbucketYOLO38.579.435.323.128.449.0configtb.devbucketbucketFaster RCNN44.073.847.830.034.752.5configtb.devbucketbucketSoTA ModelsThis 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.MethodAPboxAP50boxAP75boxAPSboxAPMboxAPLboxConfigsTensorBoard.devPyTorch modelTensorFlow modelRepPoints43.075.940.127.336.748.0configtb.devbucket-Sparse RCNN44.069.644.630.030.654.7configtb.devbucket-FCOS44.479.545.936.739.251.7configtb.devbucketbucketGrid RCNN47.577.950.643.437.254.4configtb.devbucket-Deformable DETR48.076.952.836.435.253.9configtb.devbucket-FSAF49.284.748.245.339.656.7configtb.devbucketbucketLocalization Distillation50.976.558.845.843.059.4configtb.devbucket-VarifocalNet51.082.656.739.042.158.8configtb.devbucket-RegNet51.385.351.835.741.160.5configtb.devbucketbucketDouble Heads52.087.355.238.641.060.8configtb.devbucket-DCN51.687.155.936.341.461.3configtb.devbucket-Empirical Attention52.586.554.138.743.461.0configtb.devbucket-TridentNet52.985.158.342.641.362.6configtb.devbucketbucketToolsWe also include the following tools in this repository to make working with the dataset
a lot easier:Download dataDownload TF Record filesConvert PNG images in dataset to JPG ImagesConverting Pascal VOC to COCO formatUpdate dataset to use relative pathsMore information about each tool can be found in thetools/README.mdfile.TutorialsWe also present some tutorials on how to use the dataset in this repository as
Colab notebooks:pytorch_loader.ipynbIn  this notebook we will load the CPPE - 5 dataset in PyTorch and also see a quick example of fine-tuning the Faster RCNN model withtorchvisionon this dataset.tensorflow_loader.ipynbIn this notebook we will load the CPPE - 5 dataset through TF Record files in TensorFlow.visualize.ipynbIn this notebook, we will visualize the CPPE-5 dataset, which could be really helpful to see some sample images and annotations from the dataset.CitationIf you use this work, please cite the following paper: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.AcknoweldgementsThe 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! SeeContributing Guidelines. You can also take a look atopen issuesfor 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 canstart discussions.Have you used this work in your paper, blog, experiments, or more please share it with us by making a discussion under theShow and Tell category.