{"id":13788658,"url":"https://github.com/lzx1413/PytorchSSD","last_synced_at":"2025-05-12T03:30:37.557Z","repository":{"id":55613780,"uuid":"114252768","full_name":"lzx1413/PytorchSSD","owner":"lzx1413","description":"pytorch version of SSD and it's enhanced methods such as RFBSSD,FSSD and RefineDet","archived":false,"fork":false,"pushed_at":"2020-03-27T10:35:05.000Z","size":724,"stargazers_count":709,"open_issues_count":44,"forks_count":238,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-11-18T02:38:23.334Z","etag":null,"topics":["fssd","pytorch","refinedet","rfb","ssd"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lzx1413.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}},"created_at":"2017-12-14T13:17:03.000Z","updated_at":"2024-09-24T02:35:39.000Z","dependencies_parsed_at":"2022-08-15T04:30:58.734Z","dependency_job_id":null,"html_url":"https://github.com/lzx1413/PytorchSSD","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lzx1413%2FPytorchSSD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lzx1413%2FPytorchSSD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lzx1413%2FPytorchSSD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lzx1413%2FPytorchSSD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lzx1413","download_url":"https://codeload.github.com/lzx1413/PytorchSSD/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":["fssd","pytorch","refinedet","rfb","ssd"],"created_at":"2024-08-03T21:00:51.594Z","updated_at":"2025-05-12T03:30:36.771Z","avatar_url":"https://github.com/lzx1413.png","language":"Python","funding_links":[],"categories":["2.) Lightweight Structures"],"sub_categories":["**[Papers]**"],"readme":"# Pytorch SSD Series\n## Pytorch 4.1 is suppoted on branch 0.4 now.\n## Support Arc:\n* SSD [SSD: Single Shot Multibox  Detector](https://arxiv.org/abs/1512.02325)\n* FSSD [FSSD: Feature Fusion Single Shot Multibox Detector](https://arxiv.org/abs/1712.00960)\n* RFB-SSD[Receptive Field Block Net for Accurate and Fast Object Detection](https://arxiv.org/abs/1711.07767)\n* RefineDet[Single-Shot Refinement Neural Network for Object Detection](https://arxiv.org/pdf/1711.06897.pdf)\n\n### VOC2007 Test\n| System                                   |  *mAP*   | **FPS** (Titan X Maxwell) |\n| :--------------------------------------- | :------: | :-----------------------: |\n| [Faster R-CNN (VGG16)](https://github.com/ShaoqingRen/faster_rcnn) |   73.2   |             7             |\n| [YOLOv2 (Darknet-19)](http://pjreddie.com/darknet/yolo/) |   78.6   |            40             |\n| [R-FCN (ResNet-101)](https://github.com/daijifeng001/R-FCN) |   80.5   |             9             |\n| [SSD300* (VGG16)](https://github.com/weiliu89/caffe/tree/ssd) |   77.2   |            46             |\n| [SSD512* (VGG16)](https://github.com/weiliu89/caffe/tree/ssd) |   79.8   |            19             |\n| RFBNet300 (VGG16)                        | **80.5** |            83             |\n| RFBNet512 (VGG16)                        | **82.2** |            38             |\n| SSD300 (VGG)                             |   77.8   |     **150 (1080Ti)**      |\n| FSSD300 (VGG)                            |   78.8   |       120 (1080Ti)        |\n\n### COCO \n| System                                   | *test-dev mAP* | **Time** (Titan X Maxwell) |\n| :--------------------------------------- | :------------: | :------------------------: |\n| [Faster R-CNN++ (ResNet-101)](https://github.com/KaimingHe/deep-residual-networks) |      34.9      |           3.36s            |\n| [YOLOv2 (Darknet-19)](http://pjreddie.com/darknet/yolo/) |      21.6      |            25ms            |\n| [SSD300* (VGG16)](https://github.com/weiliu89/caffe/tree/ssd) |      25.1      |            22ms            |\n| [SSD512* (VGG16)](https://github.com/weiliu89/caffe/tree/ssd) |      28.8      |            53ms            |\n| [RetinaNet500 (ResNet-101-FPN)](https://arxiv.org/pdf/1708.02002.pdf) |      34.4      |            90ms            |\n| RFBNet300 (VGG16)                        |    **29.9**    |         **15ms\\***         |\n| RFBNet512 (VGG16)                        |    **33.8**    |         **30ms\\***         |\n| RFBNet512-E (VGG16)                      |    **34.4**    |         **33ms\\***         |\n| [SSD512 (HarDNet68)](https://github.com/PingoLH/PytorchSSD-HarDNet) |      31.7      |          TBD (12.9ms\\*\\*)  |\n| [SSD512 (HarDNet85)](https://github.com/PingoLH/PytorchSSD-HarDNet) |      35.1      |          TBD (15.9ms\\*\\*)  |\n| RFBNet512 (HarDNet68)                    |      33.9      |          TBD (16.7ms\\*\\*)  |\n| RFBNet512 (HarDNet85)                    |      36.8      |          TBD (19.3ms\\*\\*)  |\n\n*Note*: **\\*** The speed here is tested on the newest pytorch and cudnn version (0.2.0 and cudnnV6), which is obviously faster than the speed reported in the paper (using pytorch-0.1.12 and cudnnV5).\n\n*Note*: **\\*\\*** HarDNet results are measured on Titan V with pytorch 1.0.1\nfor detection only (NMS is NOT included, which is 13~18ms in general cases).\nFor reference, the measurement of SSD-vgg on the same environment is 15.7ms\n(also detection only).\n\n### MobileNet\n| System                                   | COCO *minival mAP* | **\\#parameters** |\n| :--------------------------------------- | :----------------: | :--------------: |\n| [SSD MobileNet](https://arxiv.org/abs/1704.04861) |        19.3        |       6.8M       |\n| RFB MobileNet                            |       20.7\\*       |       7.4M       |\n\n\\*: slightly better than the original ones in the paper (20.5).\n\n### Contents\n1. [Installation](#installation)\n2. [Datasets](#datasets)\n3. [Training](#training)\n4. [Evaluation](#evaluation)\n5. [Models](#models)\n\n## Installation\n- Install [PyTorch-0.2.0-0.3.1](http://pytorch.org/) by selecting your environment on the website and running the appropriate command.\n- Clone this repository. This repository is mainly based on[RFBNet](https://github.com/ruinmessi/RFBNet), [ssd.pytorch](https://github.com/amdegroot/ssd.pytorch) and [Chainer-ssd](https://github.com/Hakuyume/chainer-ssd), a huge thank to them.\n  * Note: We currently only support Python 3+.\n- Compile the nms and coco tools:\n```Shell\n./make.sh\n```\nNote*: Check you GPU architecture support in utils/build.py, line 131. Default is:\n\n``` \n'nvcc': ['-arch=sm_52',\n```\n- Install [pyinn](https://github.com/szagoruyko/pyinn) for MobileNet backbone:\n```Shell\npip install git+https://github.com/szagoruyko/pyinn.git@master\n```\n- Then download the dataset by following the [instructions](#download-voc2007-trainval--test) below and install opencv. \n```Shell\nconda install opencv\n```\nNote: For training, we currently  support [VOC](http://host.robots.ox.ac.uk/pascal/VOC/) and [COCO](http://mscoco.org/). \n\n## Datasets\nTo make things easy, we provide simple VOC and COCO dataset loader that inherits `torch.utils.data.Dataset` making it fully compatible with the `torchvision.datasets` [API](http://pytorch.org/docs/torchvision/datasets.html).\n\n### VOC Dataset\n##### Download VOC2007 trainval \u0026 test\n\n```Shell\n# specify a directory for dataset to be downloaded into, else default is ~/data/\nsh data/scripts/VOC2007.sh # \u003cdirectory\u003e\n```\n\n##### Download VOC2012 trainval\n\n```Shell\n# specify a directory for dataset to be downloaded into, else default is ~/data/\nsh data/scripts/VOC2012.sh # \u003cdirectory\u003e\n```\n### COCO Dataset\nInstall the MS COCO dataset at /path/to/coco from [official website](http://mscoco.org/), default is ~/data/COCO. Following the [instructions](https://github.com/rbgirshick/py-faster-rcnn/blob/77b773655505599b94fd8f3f9928dbf1a9a776c7/data/README.md) to prepare *minival2014* and *valminusminival2014* annotations. All label files (.json) should be under the COCO/annotations/ folder. It should have this basic structure\n```Shell\n$COCO/\n$COCO/cache/\n$COCO/annotations/\n$COCO/images/\n$COCO/images/test2015/\n$COCO/images/train2014/\n$COCO/images/val2014/\n```\n*UPDATE*: The current COCO dataset has released new *train2017* and *val2017* sets which are just new splits of the same image sets. \n\n## Training\n- First download the fc-reduced [VGG-16](https://arxiv.org/abs/1409.1556) PyTorch base network weights at:    https://s3.amazonaws.com/amdegroot-models/vgg16_reducedfc.pth\n  or from our [BaiduYun Driver](https://pan.baidu.com/s/1jIP86jW) \n- MobileNet pre-trained basenet is ported from [MobileNet-Caffe](https://github.com/shicai/MobileNet-Caffe), which achieves slightly better accuracy rates than the original one reported in the [paper](https://arxiv.org/abs/1704.04861), weight file is available at: https://drive.google.com/open?id=13aZSApybBDjzfGIdqN1INBlPsddxCK14 or [BaiduYun Driver](https://pan.baidu.com/s/1dFKZhdv).\n\n- By default, we assume you have downloaded the file in the `RFBNet/weights` dir:\n```Shell\nmkdir weights\ncd weights\nwget https://s3.amazonaws.com/amdegroot-models/vgg16_reducedfc.pth\n```\n\n- To train RFBNet using the train script simply specify the parameters listed in `train_RFB.py` as a flag or manually change them.\n```Shell\npython train_test.py -d VOC -v RFB_vgg -s 300 \n```\n- Note:\n  * -d: choose datasets, VOC or COCO.\n  * -v: choose backbone version, RFB_VGG, RFB_E_VGG or RFB_mobile.\n  * -s: image size, 300 or 512.\n  * You can pick-up training from a checkpoint by specifying the path as one of the training parameters (again, see `train_RFB.py` for options)\n\n## Evaluation\nThe test frequency can be found in the train_test.py\nBy default, it will directly output the mAP results on VOC2007 *test* or COCO *minival2014*. For VOC2012 *test* and COCO *test-dev* results, you can manually change the datasets in the `test_RFB.py` file, then save the detection results and submitted to the server. \n\n## Models\n* ImageNet [mobilenet](https://drive.google.com/open?id=11VqerLerDkFzN_fkwXG4Vm1CIU2G5Gtm)\n* 07+12 [RFB_Net300](https://drive.google.com/open?id=1V3DjLw1ob89G8XOuUn7Jmg_o-8k_WM3L), [BaiduYun Driver](https://pan.baidu.com/s/1bplRosf),[FSSD300](https://drive.google.com/open?id=1xhgdxCF_HuC3SP6ALhhTeC5RTmuoLzgC),[SSD300](https://drive.google.com/open?id=10sM_yWSN8vRZdh6Sf0CILyMfcoJiCNtn)\n* COCO [RFB_Net512_E](https://drive.google.com/open?id=1pHDc6Xg9im3affOr7xaimXaRNOHtbaPM), [BaiduYun Driver](https://pan.baidu.com/s/1o8dxrom)\n* COCO [RFB_Mobile Net300](https://drive.google.com/open?id=1vmbTWWgeMN_qKVWOeDfl1EN9c7yHPmOe), [BaiduYun Driver](https://pan.baidu.com/s/1bp4ik1L)\n\n## Update (Sep 29, 2019)\n* Add SSD and RFBNet with [Harmonic DenseNet (HarDNet)](https://github.com/PingoLH/Pytorch-HarDNet) as backbone models.\n* Pretrained backbone models: \n[hardnet68_base_bridge.pth](https://ping-chao.com/hardnet/hardnet68_base_bridge.pth) | \n[hardnet85_base.pth](https://ping-chao.com/hardnet/hardnet85_base.pth) \n* Pretrained models for COCO dataset:\n[SSD512-HarDNet68](https://ping-chao.com/hardnet/SSD512_HarDNet68_COCO.pth) | \n[SSD512-HarDNet85](https://ping-chao.com/hardnet/SSD512_HarDNet85_COCO.pth) | \n[RFBNet512-HarDNet68](https://ping-chao.com/hardnet/RFB512_HarDNet68_COCO.pth) | \n[RFBNet512-HarDNet85](https://ping-chao.com/hardnet/RFB512_HarDNet85_COCO.pth)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flzx1413%2FPytorchSSD","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flzx1413%2FPytorchSSD","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flzx1413%2FPytorchSSD/lists"}