{"id":18273991,"url":"https://github.com/longcw/faster_rcnn_pytorch","last_synced_at":"2025-04-08T04:14:21.166Z","repository":{"id":42188085,"uuid":"80437367","full_name":"longcw/faster_rcnn_pytorch","owner":"longcw","description":"Faster RCNN with PyTorch","archived":false,"fork":false,"pushed_at":"2021-09-25T16:46:09.000Z","size":618,"stargazers_count":1739,"open_issues_count":71,"forks_count":465,"subscribers_count":51,"default_branch":"master","last_synced_at":"2025-04-01T03:34:27.963Z","etag":null,"topics":["computer-vision","detection","faster-rcnn","pytorch"],"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/longcw.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-01-30T16:06:12.000Z","updated_at":"2025-03-31T07:16:03.000Z","dependencies_parsed_at":"2022-09-17T16:11:20.928Z","dependency_job_id":null,"html_url":"https://github.com/longcw/faster_rcnn_pytorch","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/longcw%2Ffaster_rcnn_pytorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longcw%2Ffaster_rcnn_pytorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longcw%2Ffaster_rcnn_pytorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longcw%2Ffaster_rcnn_pytorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/longcw","download_url":"https://codeload.github.com/longcw/faster_rcnn_pytorch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247773719,"owners_count":20993639,"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":["computer-vision","detection","faster-rcnn","pytorch"],"created_at":"2024-11-05T12:08:17.547Z","updated_at":"2025-04-08T04:14:21.146Z","avatar_url":"https://github.com/longcw.png","language":"Python","funding_links":[],"categories":["Paper implementations｜论文实现","Model Deployment library","Paper implementations"],"sub_categories":["Other libraries｜其他库:","PyTorch \u003ca name=\"pytorch\"/\u003e","Other libraries:"],"readme":"# Faster RCNN with PyTorch\n**Note:** I re-implemented faster rcnn in this project when I started learning PyTorch. Then I use PyTorch in all of my projects. I still remember it costed one week for me to figure out how to build cuda code as a pytorch layer :).\nBut actually this is not a good implementation and I didn't achieve the same mAP as the original caffe code. \n\n**This project is no longer maintained and may not compatible with the newest pytorch (after 0.4.0). So I suggest:**\n- You can still read and study this code if you want to re-implement faster rcnn by yourself;\n- You can use the better PyTorch implementation by [ruotianluo](https://github.com/ruotianluo/pytorch-faster-rcnn) \nor [Detectron.pytorch](https://github.com/roytseng-tw/Detectron.pytorch) if you want to train  faster rcnn with your own data;\n\nThis is a [PyTorch](https://github.com/pytorch/pytorch)\nimplementation of Faster RCNN. \nThis project is mainly based on [py-faster-rcnn](https://github.com/rbgirshick/py-faster-rcnn)\nand [TFFRCNN](https://github.com/CharlesShang/TFFRCNN).\n\nFor details about R-CNN please refer to the [paper](https://arxiv.org/abs/1506.01497) \nFaster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks \nby Shaoqing Ren, Kaiming He, Ross Girshick, Jian Sun.\n\n### Progress\n\n- [x] Forward for detecting\n- [x] RoI Pooling layer with C extensions on CPU (only forward)\n- [x] RoI Pooling layer on GPU (forward and backward)\n- [x] Training on VOC2007\n- [x] TensroBoard support\n- [x] Evaluation\n\n### Installation and demo\n0. Install the requirements (you can use pip or [Anaconda](https://www.continuum.io/downloads)):\n\n    ```\n    conda install pip pyyaml sympy h5py cython numpy scipy\n    conda install -c menpo opencv3\n    pip install easydict\n    ```\n\n\n1. Clone the Faster R-CNN repository\n    ```bash\n    git clone git@github.com:longcw/faster_rcnn_pytorch.git\n    ```\n\n2. Build the Cython modules for nms and the roi_pooling layer\n    ```bash\n    cd faster_rcnn_pytorch/faster_rcnn\n    ./make.sh\n    ```\n3. Download the trained model [VGGnet_fast_rcnn_iter_70000.h5 (updated)](https://drive.google.com/file/d/0B4pXCfnYmG1WOXdpYVFybWxiZFE/view?usp=sharing\u0026resourcekey=0-vQAoz7bipn_4rjvGhwoqlw) \nand set the model path in `demo.py`\n3. Run demo `python demo.py`\n\n### Training on Pascal VOC 2007\n\nFollow [this project (TFFRCNN)](https://github.com/CharlesShang/TFFRCNN)\nto download and prepare the training, validation, test data \nand the VGG16 model pre-trained on ImageNet. \n\nSince the program loading the data in `faster_rcnn_pytorch/data` by default,\nyou can set the data path as following.\n```bash\ncd faster_rcnn_pytorch\nmkdir data\ncd data\nln -s $VOCdevkit VOCdevkit2007\n```\n\nThen you can set some hyper-parameters in `train.py` and training parameters in the `.yml` file.\n\nNow I got a 0.661 mAP on VOC07 while the origin paper got a 0.699 mAP.\nYou may need to tune the loss function defined in `faster_rcnn/faster_rcnn.py` by yourself.\n\n### Training with TensorBoard\nWith the aid of [Crayon](https://github.com/torrvision/crayon),\nwe can access the visualisation power of TensorBoard for any \ndeep learning framework.\n\nTo use the TensorBoard, install Crayon (https://github.com/torrvision/crayon)\nand set `use_tensorboard = True` in `faster_rcnn/train.py`.\n\n### Evaluation\nSet the path of the trained model in `test.py`.\n```bash\ncd faster_rcnn_pytorch\nmkdir output\npython test.py\n```\n\nLicense: MIT license (MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongcw%2Ffaster_rcnn_pytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flongcw%2Ffaster_rcnn_pytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongcw%2Ffaster_rcnn_pytorch/lists"}