{"id":15031020,"url":"https://github.com/goatmessi8/rfbnet","last_synced_at":"2025-05-16T07:00:19.368Z","repository":{"id":39224038,"uuid":"111989231","full_name":"GOATmessi8/RFBNet","owner":"GOATmessi8","description":"Receptive Field Block Net for Accurate and Fast Object Detection, ECCV 2018","archived":false,"fork":false,"pushed_at":"2021-11-02T18:19:57.000Z","size":1916,"stargazers_count":1417,"open_issues_count":58,"forks_count":354,"subscribers_count":47,"default_branch":"master","last_synced_at":"2025-01-07T07:27:23.680Z","etag":null,"topics":["detection","mobilenet","pytorch","rfbnet"],"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/GOATmessi8.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-11-25T08:41:13.000Z","updated_at":"2024-12-16T07:20:28.000Z","dependencies_parsed_at":"2022-07-20T02:03:06.199Z","dependency_job_id":null,"html_url":"https://github.com/GOATmessi8/RFBNet","commit_stats":null,"previous_names":["ruinmessi/rfbnet","goatmessi7/rfbnet"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GOATmessi8%2FRFBNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GOATmessi8%2FRFBNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GOATmessi8%2FRFBNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GOATmessi8%2FRFBNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GOATmessi8","download_url":"https://codeload.github.com/GOATmessi8/RFBNet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254485025,"owners_count":22078764,"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":["detection","mobilenet","pytorch","rfbnet"],"created_at":"2024-09-24T20:14:44.548Z","updated_at":"2025-05-16T07:00:19.271Z","avatar_url":"https://github.com/GOATmessi8.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Receptive Field Block Net for Accurate and Fast Object Detection\n\nBy Songtao Liu, Di Huang, Yunhong Wang\n\n## Updatas (2021/07/23): YOLOX is [here!](https://github.com/Megvii-BaseDetection/YOLOX), stronger YOLO with ONNX, TensorRT, ncnn, and OpenVino supported!!\n## Updates: we propose a new method to get 42.4 mAP at 45 FPS on COCO, code is available [here](https://github.com/ruinmessi/ASFF)\n\n### Introduction\nInspired by the structure of Receptive Fields (RFs) in human visual systems, we propose a novel RF Block (RFB) module, which takes the relationship between the size and eccentricity of RFs into account, to enhance the discriminability and robustness of features. We further  assemble the RFB module to the top of SSD with a lightweight CNN model, constructing the RFB Net detector. You can use the code to train/evaluate the RFB Net for object detection. For more details, please refer to our [ECCV paper](https://eccv2018.org/openaccess/content_ECCV_2018/papers/Songtao_Liu_Receptive_Field_Block_ECCV_2018_paper.pdf). \n\n\u003cimg align=\"right\" src=\"https://github.com/ruinmessi/RFBNet/blob/master/doc/RFB.png\"\u003e\n\n\u0026nbsp;\n\u0026nbsp;\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.7** |**83** | \n| RFBNet512 (VGG16) | **82.2** | **38** | \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) | **30.3** |**15ms** | \n| RFBNet512 (VGG16) | **33.8** | **30ms** |\n| RFBNet512-E (VGG16) | **34.4** | **33ms** |  \n\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\n### Citing RFB Net\nPlease cite our paper in your publications if it helps your research:\n\n    @InProceedings{Liu_2018_ECCV,\n    author = {Liu, Songtao and Huang, Di and Wang, andYunhong},\n    title = {Receptive Field Block Net for Accurate and Fast Object Detection},\n    booktitle = {The European Conference on Computer Vision (ECCV)},\n    month = {September},\n    year = {2018}\n    }\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.4.0](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 [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 PyTorch-0.4.0 and Python 3+.\n- Compile the nms and coco tools:\n```Shell\n./make.sh\n```\n*Note*: Check you GPU architecture support in utils/build.py, line 131. Default is:\n``` \n'nvcc': ['-arch=sm_52',\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\nor 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_RFB.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  * If you want to reproduce the results in the paper, the VOC model should be trained about 240 epoches while the COCO version need 130 epoches.\n  \n## Evaluation\nTo evaluate a trained network:\n\n```Shell\npython test_RFB.py -d VOC -v RFB_vgg -s 300 --trained_model /path/to/model/weights\n```\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\n* 07+12 [RFB_Net300](https://drive.google.com/open?id=1apPyT3IkNwKhwuYyp432IJrTd0QHGbIN), [BaiduYun Driver](https://pan.baidu.com/s/1xOp3_FDk49YlJ-6C-xQfHw)\n* COCO [RFB_Net300](https://pan.baidu.com/s/1vL_oNwhj0ksK593nApqDLw)\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\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoatmessi8%2Frfbnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoatmessi8%2Frfbnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoatmessi8%2Frfbnet/lists"}