{"id":13788597,"url":"https://github.com/lyxok1/Tiny-DSOD","last_synced_at":"2025-05-12T03:30:41.411Z","repository":{"id":191012245,"uuid":"138247502","full_name":"lyxok1/Tiny-DSOD","owner":"lyxok1","description":"Tiny-DSOD: Lightweight Object Detection for Resource-Restricted Usage","archived":false,"fork":false,"pushed_at":"2019-06-07T15:37:46.000Z","size":16979,"stargazers_count":232,"open_issues_count":20,"forks_count":56,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-11-18T02:38:21.395Z","etag":null,"topics":["deep-learning","lightweight","object-detection"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lyxok1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-06-22T02:57:08.000Z","updated_at":"2024-11-06T03:01:12.000Z","dependencies_parsed_at":"2023-08-27T17:58:30.509Z","dependency_job_id":null,"html_url":"https://github.com/lyxok1/Tiny-DSOD","commit_stats":null,"previous_names":["lyxok1/tiny-dsod"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyxok1%2FTiny-DSOD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyxok1%2FTiny-DSOD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyxok1%2FTiny-DSOD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyxok1%2FTiny-DSOD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lyxok1","download_url":"https://codeload.github.com/lyxok1/Tiny-DSOD/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253667931,"owners_count":21944941,"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":["deep-learning","lightweight","object-detection"],"created_at":"2024-08-03T21:00:50.820Z","updated_at":"2025-05-12T03:30:36.396Z","avatar_url":"https://github.com/lyxok1.png","language":"C++","funding_links":[],"categories":["2.) Lightweight Structures"],"sub_categories":["**[Papers]**"],"readme":"# Tiny-DSOD: Lightweight Object Detection for Resource Restricted Usage\n\nThis repository releases the code for our paper\n\n**Tiny-DSOD: Lightweight Object Detection for Resource Restricted Usage (BMVC2018)**\n\n**Yuxi Li, [Jianguo Li](https://sites.google.com/site/leeplus/), Jiuwei Li and Weiyao Lin**\n\nThe code is based on the [SSD](https://github.com/weiliu89/caffe/tree/ssd) and [DSOD](https://github.com/szq0214/DSOD) framework.\n\n## Introduction\n\nTiny-DSOD tries to tackle the trade-off between detection accuracy and computation resource consumption. In this work, our tiny-model outperforms other small sized detection network (pelee, mobilenet-ssd or tiny-yolo) in the metrics of FLOPs, parameter size and accuracy. To be specific, on the dataset of PASCAL VOC2007, Tiny-DSOD achieves mAP of 72.1% with less than 1 million parameters (0.95M)\n\n![basic unit DDB](https://github.com/lyxok1/Tiny-DSOD/raw/master/image/DDB.png)\n\n![D-FPN](https://github.com/lyxok1/Tiny-DSOD/raw/master/image/front.png)\n\n## Preparation\n\n1. Install dependencies our caffe framework needs. You can visit the [caffe official website](http://caffe.berkeleyvision.org/installation.html) and follow the instructions there to install the dependent libraries and drivers correctly.\n\n2. Clone this repository and compile the code\n```Shell\ngit clone https://github.com/lyxok1/Tiny-DSOD.git\n\ncd Tiny-DSOD\n# visit the Makefile then modify the compile options and path to your library there\nmake -j8\n```\n\n3. Prepare corresponding dataset (if need training). Please see the document in [SSD](https://github.com/weiliu89/caffe/tree/ssd) detail \n\n## Train a model from scratch\n\nSuppose the code is runing under the main directory of caffe.\n\nFirst generate the model prototxt files\n```Shell\npython examples/DCOD/DCOD_pascal.py  # for voc training\n\npython examples/DCOD/DCOD_kitti.py # for kitti training\n\npython examples/DCOD/DCOD_coco.py # for coco training\n```\n\nAnd then use the binary `./build/tools/caffe` to train the generated network\n```Shell\n./jobs/DCOD300/${DATASET}/DCOD300_300x300/DCOD300_${DATASET}_DCOD300_300x300.sh\n# Alternatively, you can directly use the binary to train in command line\n\n./build/tools/caffe train -solver models/DCOD300/$DATASET/DCOD300_300x300/solver.prototxt -gpu all 2\u003e\u00261 | tee models/DCOD300/$DATASET/DCOD300_300x300/train.log\n\n```\n\n## Deploy a pre-trained model\n\nIf you want to directly deploy a pre-trained model, you can use the demo scripts we provide in the `example/DCOD/` directory\n\n- for image input detection, use the following command:\n```Shell\npython examples/DCOD/image_detection_demo.py \u003coption\u003e\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -model MODEL          path to model prototxt file\n  -weights WEIGHTS      path to weight file\n  -img_dir IMG_DIR      path to input image\n  -num NUM              number of images for detection\n  -gpu                  specifiy using GPU or not\n  -threshold THRESHOLD  threshold to filter bbox with low confidence\n```\n\n- for video input detection, use the following command:\n```Shell\npython examples/DCOD/video_detection_demo.py \u003coption\u003e\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -model MODEL          path to model prototxt file\n  -weights WEIGHTS      path to weight file\n  -video VIDEO          path to input video\n  -gpu                  specifiy using GPU or not\n  -threshold THRESHOLD  threshold to filter bbox with low confidence\n```\n\n## Results\n\n- Results on PASCAL VOC2007 (the models are trained on VOC07+12 trainval and test on VOC07 test)\n\n| Method | # Params | FLOPs | *mAP* |\n|:-------|:--------:|:-----:|:-----:|\n| Faster-RCNN | 134.70M | 181.12B | 73.2 |\n| SSD | 26.30M | 31.75B | 77.2 |\n| Tiny-YOLO | 15.12M | 6.97B | 57.1 |\n| MobileNet-SSD | 5.50M | 1.14B | 68.0|\n| DSOD-smallest | 5.90M | 5.29B | 73.6|\n| Pelee | 5.98M | 1.21B | 70.9 |\n| Tiny-DSOD | 0.95M | 1.06B | 72.1 |\n\n- Results on KITTI 2D Object Detction (the models are trained on half KITTI trainval and test on the other half)\n\n| Method | # Params | FLOPs | car | cyclist | pedestrain |*mAP* |\n|:-------|:--------:|:-----:|:---:|:-------:|:----------:|:----:|\n| MS-CNN | 80M | - | 85.0 | 75.2 | 75.3 | 78.5 |\n| FRCN | 121.2M | - | 86.0 | - | - | - |\n| SqueezeDet | 1.98M | 9.7B | 82.9 | 76.8 | 70.4 | 76.7 |\n| Tiny-DSOD | 0.85M | 4.1B | 88.3 | 73.6 | 69.1 | 77.0 |\n\n- Results on COCO (the models are trained on trainval 135k and test on test-dev 2015)\n\n| Method | # Params | FLOPs | *mAP(IOU 0.5:0.95)* |\n|:-------|:--------:|:-----:|:-----:|\n|MobileNet-v2+SSDLite| 4.30M | 0.80B | 22.1 |\n|Pelee | 5.98M | 1.29B | 22.4 |\n|Yolo-v2 | 67.43M | 34.36B | 21.6 |\n|Tiny-DSOD | 1.15M | 1.12B | 23.2 |\n\n## Released model\n\nWe released a model pretrained on VOC2007 on [Baidu Yun (3.8MB)](https://pan.baidu.com/s/1tNEZRWHwoVSOIuYwz2DlVQ) and [Google Drive](https://drive.google.com/file/d/1G28_oKPWILZ1hGCJ1tfEFEx2obu0SeMK/view?usp=sharing)\n\n## Example\n\n![kitti1](https://github.com/lyxok1/Tiny-DSOD/raw/master/image/kitti1.png)\n\n![kitti1](https://github.com/lyxok1/Tiny-DSOD/raw/master/image/kitti2.png)\n\n![kitti1](https://github.com/lyxok1/Tiny-DSOD/raw/master/image/kitti3.png)\n\n## Citation\n\nIf you think this work is helpful for your own research, please consider add following bibtex config in your latex file\n\n```Latex\n@inproceedings{li2018tiny,\n  title = {{Tiny-DSOD}: Lightweight Object Detection for Resource-restricted Usage},\n  author = {Yuxi Li, Jianguo Li, Jiuwei Li and Weiyao Lin},\n  booktitle = {BMVC},\n  year = {2018}\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyxok1%2FTiny-DSOD","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flyxok1%2FTiny-DSOD","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyxok1%2FTiny-DSOD/lists"}