{"id":13755110,"url":"https://github.com/UCAS-GYX/YouTube-GDD","last_synced_at":"2025-05-10T00:31:39.176Z","repository":{"id":181211393,"uuid":"467092958","full_name":"UCAS-GYX/YouTube-GDD","owner":"UCAS-GYX","description":"YouTube-GDD: A challenging gun detection dataset with rich contextual information","archived":false,"fork":false,"pushed_at":"2024-09-25T13:02:52.000Z","size":2998,"stargazers_count":33,"open_issues_count":1,"forks_count":7,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-16T09:33:56.363Z","etag":null,"topics":["datasets","deep-learning","object-detection"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UCAS-GYX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-03-07T12:52:23.000Z","updated_at":"2024-10-09T11:12:29.000Z","dependencies_parsed_at":"2024-01-15T02:30:20.872Z","dependency_job_id":"d184b1ba-97f2-4e11-aa50-d990b050ba01","html_url":"https://github.com/UCAS-GYX/YouTube-GDD","commit_stats":null,"previous_names":["ucas-gyx/youtube-gdd"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UCAS-GYX%2FYouTube-GDD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UCAS-GYX%2FYouTube-GDD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UCAS-GYX%2FYouTube-GDD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UCAS-GYX%2FYouTube-GDD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UCAS-GYX","download_url":"https://codeload.github.com/UCAS-GYX/YouTube-GDD/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253346488,"owners_count":21894264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["datasets","deep-learning","object-detection"],"created_at":"2024-08-03T10:00:45.926Z","updated_at":"2025-05-10T00:31:36.422Z","avatar_url":"https://github.com/UCAS-GYX.png","language":"Python","funding_links":[],"categories":["Image Processing"],"sub_categories":["Gun Detection"],"readme":"# YouTube-GDD: A challenging gun detection dataset with rich contextual information [[arXiv]](https://arxiv.org/pdf/2203.04129.pdf) [[Project Page]](https://www.researchgate.net/project/YouTube-GDD)\n\n## Overview\nTo promote the development of security, this work presents a new challenging dataset called YouTube Gun Detection Dataset ([YouTube-GDD](https://arxiv.org/pdf/2203.04129.pdf)). Our dataset is collected from **343** high-definition YouTube videos and contains **5000** well-chosen images, in which **16064** instances of gun and **9046** instances of person are annotated. Compared to other datasets, YouTube-GDD is \"dynamic\", containing rich contextual information and recording shape changes of the gun during shooting. To build a baseline for gun detection, we evaluate [YOLOv5](https://github.com/ultralytics/yolov5) on YouTube-GDD and analyze the influence of additional related annotated information on gun detection.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./assert/example.png\"/\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n## Dates\n- [x] Release Training and validation sets. [2022-04]\n- [x] Release test images. [2022-04]\n- [ ] Open the evaluation server to the public. [to be confirmed]\n- [ ] Augment dataset volumn to the level of ten thousand. [to be confirmed]\n\n## Description\n1. All images are captured from [YouTube videos](https://www.youtube.com/results?search_query=gun).\n\n2. All annotations are labeled in [YOLO](https://roboflow.com/formats/yolo-darknet-txt) format with [labelImg](https://github.com/tzutalin/labelImg).\n\n3. YouTube-GDD contains two categories, namely **\"person\"** and **\"gun\"**, corresponding to category ids **0** and **1**, respectively.\n\n4. The name format of each image file and the corresponding label file is set as **\"YouTube id_original frame rate_split frame rate_ID\"**.\n\n## Statistics\nFirstly, we split the entire dataset into 10 nonoverlapping folds by [filename](https://github.com/UCAS-GYX/YouTube-GDD/blob/main/configs/imagelist_10flod.npy), each containing 500 images. Secondly, we compute the ratio of different scales in the entire dataset as the probability distribution, and then compute the scale distribution of each fold. The two folds with the lowest **JS divergence** are chosen as test set and validation set, i.e., **fold7** is chosen as the **test set** and **fold6** is chosen as the **validation set** while the rest folds are adopted as the training set.\n\n\u003ctable\u003e\n   \u003ctr\u003e\n      \u003cth rowspan=\"2\" valign=\"center\"\u003eSplit\u003c/th\u003e\n      \u003cth rowspan=\"2\" valign=\"center\"\u003eImages\u003c/th\u003e\n      \u003cth rowspan=\"2\" valign=\"center\"\u003eVideos\u003c/th\u003e\n      \u003cth colspan=\"2\" align=\"center\"\u003eCategory\u003c/th\u003e\n      \u003cth colspan=\"3\" aligin=\"center\"\u003eScale\u003c/th\u003e\n   \u003c/tr\u003e\n   \u003ctr\u003e\n      \u003cth align=\"center\"\u003eperson\u003c/th\u003e\n      \u003cth align=\"center\"\u003egun\u003c/th\u003e\n      \u003cth align=\"center\"\u003esmall\u003c/th\u003e\n      \u003cth align=\"center\"\u003emedium\u003c/th\u003e\n      \u003cth align=\"center\"\u003elarge\u003c/th\u003e\n   \u003c/tr\u003e\n   \u003ctr\u003e\n      \u003cth align=\"center\"\u003efold1\u003c/th\u003e\n      \u003ctd align=\"center\"\u003e500\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e35\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e467\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e1265\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e373\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e235\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e1124\u003c/td\u003e\n   \u003c/tr\u003e\n   \u003ctr\u003e\n      \u003cth align=\"center\"\u003efold2\u003c/th\u003e\n      \u003ctd align=\"center\"\u003e500\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e34\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e430\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e620\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e4\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e84\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e962\u003c/td\u003e\n   \u003c/tr\u003e\n   \u003ctr\u003e\n      \u003cth align=\"center\"\u003efold3\u003c/th\u003e\n      \u003ctd align=\"center\"\u003e500\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e31\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e466\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e905\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e39\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e259\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e1073\u003c/td\u003e\n   \u003c/tr\u003e\n   \u003ctr\u003e\n      \u003cth align=\"center\"\u003efold4\u003c/th\u003e\n      \u003ctd align=\"center\"\u003e500\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e31\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e427\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e751\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e5\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e124\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e1049\u003c/td\u003e\n   \u003c/tr\u003e\n   \u003ctr\u003e\n      \u003cth align=\"center\"\u003efold5\u003c/th\u003e\n      \u003ctd align=\"center\"\u003e500\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e36\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e471\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e716\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e11\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e120\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e1056\u003c/td\u003e\n   \u003c/tr\u003e\n   \u003ctr\u003e\n      \u003cth align=\"center\"\u003efold6\u003c/th\u003e\n      \u003ctd align=\"center\"\u003e500\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e43\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e415\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e718\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e13\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e122\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e998\u003c/td\u003e\n   \u003c/tr\u003e\n   \u003ctr\u003e\n      \u003cth align=\"center\"\u003efold7\u003c/th\u003e\n      \u003ctd align=\"center\"\u003e500\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e42\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e394\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e879\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e67\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e193\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e1013\u003c/td\u003e\n   \u003c/tr\u003e\n   \u003ctr\u003e\n      \u003cth align=\"center\"\u003efold8\u003c/th\u003e\n      \u003ctd align=\"center\"\u003e500\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e34\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e475\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e636\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e1\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e60\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e1050\u003c/td\u003e\n   \u003c/tr\u003e\n   \u003ctr\u003e\n      \u003cth align=\"center\"\u003efold9\u003c/th\u003e\n      \u003ctd align=\"center\"\u003e500\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e33\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e460\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e589\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e3\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e57\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e989\u003c/td\u003e\n   \u003c/tr\u003e\n   \u003ctr\u003e\n      \u003cth align=\"center\"\u003efold10\u003c/th\u003e\n      \u003ctd align=\"center\"\u003e500\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e32\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e518\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e953\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e37\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e281\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e1151\u003c/td\u003e\n   \u003c/tr\u003e\n   \u003ctr\u003e\n      \u003cth align=\"center\"\u003eall\u003c/th\u003e\n      \u003ctd align=\"center\"\u003e5000\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e343\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e9046\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e16064\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e1106\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e3070\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e20934\u003c/td\u003e\n   \u003c/tr\u003e\n\u003c/table\u003e\n\n**Table Note:** Frames captured from the same video may be assigned into two adjacent folds, causing the video to be repeatedly counted.\n\n## Construct YouTube-GDD from Source Videos\n**[Update 18th April]** We thank [a2515919](https://github.com/a2515919) who is also working on the dataset and willing to share the pre-processed images: [Google Drive Link](https://drive.google.com/file/d/1TH6kSx7WoFRrUPbxcDGYBrFrYUI1ReWa/view).\n\nHere, three scripts are provided for constructing YouTube-GDD from source videos step by step.\n\n+ Download videos.\n```bash\ncd /path/to/YouTube-GDD/\npython ./tools/download.py --videolist ./configs/videolist.txt  --videopath /path/to/videos\n```\n+ Extract frames.\n```bash\ncd /path/to/YouTube-GDD/\npython ./tools/extract.py  --videopath /path/to/videos  --framepath /path/to/frames\n```\n+ Select images.\n```bash\ncd /path/to/YouTube-GDD/\npython ./tools/select.py  --imagelist  ./configs/imagelist.npy  --framepath /path/to/frames --imagepath /path/to/images\n```\n\nAfter collecting images, unzip [labels.zip](https://github.com/UCAS-GYX/YouTube-GDD/blob/main/labels.zip) to the parent root of imagepath and **the expected dataset structure** should be organized as follows, which also meets the dataset structure requirement of [YOLOv5](https://github.com/ultralytics/yolov5).\n```\nYouTube-GDD/\n  images/\n      train/\n      val/\n      test/\n  labels/\n      train/\n      val/\n```\n\n## Baseline\n\u003ctable\u003e\n   \u003ctr\u003e\n      \u003cth rowspan=\"2\" valign=\"center\"\u003eMethod\u003c/th\u003e\n      \u003cth rowspan=\"2\" valign=\"center\"\u003ew/ TL\u003c/th\u003e\n      \u003cth rowspan=\"2\" valign=\"center\"\u003ew/ AoP\u003c/th\u003e\n      \u003cth rowspan=\"2\" align=\"center\"\u003eFLOPs\u003c/th\u003e\n      \u003cth rowspan=\"2\" aligin=\"center\"\u003eParams\u003c/th\u003e\n      \u003cth colspan=\"2\" aligin=\"center\"\u003eGun\u003c/th\u003e\n      \u003cth colspan=\"2\" aligin=\"center\"\u003ePerson\u003c/th\u003e\n   \u003c/tr\u003e\n   \u003ctr\u003e\n      \u003cth align=\"center\"\u003eAP\u003csub\u003e50\u003c/sub\u003e\u003c/th\u003e\n      \u003cth align=\"center\"\u003eAP\u003c/th\u003e\n      \u003cth align=\"center\"\u003eAP\u003csub\u003e50\u003c/sub\u003e\u003c/th\u003e\n      \u003cth align=\"center\"\u003eAP\u003c/th\u003e\n   \u003c/tr\u003e\n\u003ctr\u003e\n        \u003cth rowspan=\"4\" valign=\"center\"\u003e\u003ca href=https://github.com/ultralytics/yolov5/blob/master/models/yolov5s.yaml\u003eYOLOv5s\u003c/a\u003e\u003c/th\u003e\n        \u003ctd align=\"center\"\u003e\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e15.80G\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e7.01M\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e67.7\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e41.0\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e-\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e-\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd align=\"center\"\u003e\u003c/td\u003e\n        \u003ctd align=\"center\"\u003eyes\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e15.81G\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e7.02M\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e67.9\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e41.3\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e90.3\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e75.0\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd align=\"center\"\u003eyes\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e15.80G\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e7.01M\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e75.0\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e52.0\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e-\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e-\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd align=\"center\"\u003eyes\u003c/td\u003e\n        \u003ctd align=\"center\"\u003eyes\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e15.81G\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e7.02M\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e77.3\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e52.1\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e92.4\u003c/td\u003e\n        \u003ctd align=\"center\"\u003e81.2\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\n**Table Note:** TL means Transfer Learning and AoP means Annotations of Person.\n\n## Contact\nIf you have any general question, feel free to email us at `guyongxiang19@mails.ucas.ac.cn`. If you have dataset-related or implementation-related questions, please feel free to send emails to us or open an issue in this codebase (We recommend that you open an issue in this codebase, because your questions may help others). \n\n## Citation\nIf you find our work inspiring or use our dataset in your research, please cite our work.\n```\n@article{gu2022youtube-gdd,\n  title={YouTube-GDD: A challenging gun detection dataset with rich contextual information},\n  author={Gu Yongxiang and Liao Xingbin and Qin Xiaolin},\n  journal={arXiv preprint arXiv:2203.04129},\n  year={2022}\n}\n```\n\n## Thanks\nWe thank Lab students, namely Mingfei Li, Jingyang Shan, Qianlei Wang, Siqi Zhang, Xu Liao, Yuncong Peng, Gang Luo, Xin Lan, Boyi Fu and Yangge Qian, for their suggestions about improving the YouTube-GDD dataset.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUCAS-GYX%2FYouTube-GDD","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FUCAS-GYX%2FYouTube-GDD","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUCAS-GYX%2FYouTube-GDD/lists"}