{"id":26694501,"url":"https://github.com/deeplearnphysics/faster-rcnn","last_synced_at":"2025-04-13T00:35:25.847Z","repository":{"id":116515138,"uuid":"106302447","full_name":"DeepLearnPhysics/faster-rcnn","owner":"DeepLearnPhysics","description":null,"archived":false,"fork":false,"pushed_at":"2018-01-19T20:22:32.000Z","size":1508,"stargazers_count":8,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-04-13T00:35:16.447Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DeepLearnPhysics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-09T15:37:08.000Z","updated_at":"2022-05-11T13:53:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"a8bfcdeb-9015-466e-8200-c090cc3f8238","html_url":"https://github.com/DeepLearnPhysics/faster-rcnn","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/DeepLearnPhysics%2Ffaster-rcnn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepLearnPhysics%2Ffaster-rcnn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepLearnPhysics%2Ffaster-rcnn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepLearnPhysics%2Ffaster-rcnn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeepLearnPhysics","download_url":"https://codeload.github.com/DeepLearnPhysics/faster-rcnn/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650456,"owners_count":21139670,"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":[],"created_at":"2025-03-26T18:29:53.940Z","updated_at":"2025-04-13T00:35:25.831Z","avatar_url":"https://github.com/DeepLearnPhysics.png","language":"Python","readme":"# faster-rcnn\nA Tensorflow implementation of faster RCNN detection framework toward 3D object detection. This repository is based on the original python Caffe implementation of faster RCNN by Ross Girshick available [here](https://github.com/rbgirshick/py-faster-rcnn) and implementation to Tensorflow by Xinlei Chen available [here](https://github.com/endernewton/tf-faster-rcnn). While much of the code follows Xinlei's implementation, the reason why we did not fork is because we plan to extend further to 3D. This involves much reorganization of code/directory structures and departs from the goal of replicating py-caffe implementation. Note changes made by Xinlei (summarized in their paper [An Implementation of Faster RCNN with Study for Region Sampling](https://arxiv.org/pdf/1702.02138.pdf)) is inherited as is.\n\n**Note**:\nThis implementation followed Xinlei's method step by step, and may still lack some functionalities and/or performance.\nThe current goal is to reproduce the results in Xinlei's paper. The network does get trained with vgg implementation (resnet not yet tried).\n\n### Prerequisites\n  - Tensorflow: currently tested with v1.3. If concerned, Xinlei's Tensorflow [fork](https://github.com/endernewton/tensorflow) implements the original ROI pooling in py-caffe.\n  - Python packages: `cython`, `opencv-python`, `easydict`\n\n### Installation\n1. Clone the repository\n  ```Shell\n  git clone https://github.com/DeepLearnPhysics/faster-rcnn.git\n  ```\n2. Source configure script (you have to do this each time you login to a new shell).\n  ```Shell\n  cd faster-rcnn\n  source configure.sh\n  ```\n\n3. Update your -arch in setup script to match your GPU\n  ```Shell\n  # Change the GPU architecture (-arch) if necessary\n  vim setup.py\n  ```\n\n  | GPU model  | Architecture |\n  | ------------- | ------------- |\n  | TitanX (Maxwell/Pascal) | sm_52 |\n  | GTX 960M | sm_50 |\n  | GTX 1080 (Ti) | sm_61 |\n  | Grid K520 (AWS g2.2xlarge) | sm_30 |\n  | Tesla K80 (AWS p2.xlarge) | sm_37 |\n\n  **Note**: You are welcome to contribute the settings on your end if you have made the code work properly on other GPUs.\n\n4. Build the Cython modules\n  ```Shell\n  make clean\n  make\n  ```\n\n### Setup data for training (py-faster-rcnn has more detailed instructions [here](https://github.com/rbgirshick/py-faster-rcnn#beyond-the-demo-installation-for-training-and-testing-models))\n1. Download the training, validation, test data and VOCdevkit\n\n   ```Shell\n   wget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtrainval_06-Nov-2007.tar\n   wget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtest_06-Nov-2007.tar\n   wget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCdevkit_08-Jun-2007.tar\n   ```\n\n2. Extract all of these tars into one directory named `VOCdevkit`\n\n   ```Shell\n   tar xvf VOCtrainval_06-Nov-2007.tar\n   tar xvf VOCtest_06-Nov-2007.tar\n   tar xvf VOCdevkit_08-Jun-2007.tar\n   ```\n\n3. It should have this basic structure\n\n   ```Shell\n   $VOCdevkit/                           # development kit\n   $VOCdevkit/VOCcode/                   # VOC utility code\n   $VOCdevkit/VOC2007                    # image sets, annotations, etc.\n   # ... and several other directories ...\n   ```\n\n4. Create symlinks for the PASCAL VOC dataset\n\n   ```Shell\n    cd $FRCN_ROOT/data\n    ln -s $VOCdevkit VOCdevkit2007\n    ```\n    Using symlinks is a good idea because you will likely want to share the same PASCAL dataset installation between multiple projects.\n5. [Optional] follow similar steps to get PASCAL VOC 2010 and 2012\n6. [Optional] for coco data set see py-faster-rcnn instruction [here](https://github.com/rbgirshick/py-faster-rcnn/tree/master/data)\n\n### Train your own model\n1. Download pre-trained models and weights. The current code support VGG16. Pre-trained models are provided by slim, you can get the pre-trained models [here](https://github.com/tensorflow/models/tree/master/research/slim#Pretrained) and set them in the ``data`` folder. For example for VGG16 model, you can set up like:\n   ```Shell\n   cd data\n   wget -v http://download.tensorflow.org/models/vgg_16_2016_08_28.tar.gz\n   tar -xzvf vgg_16_2016_08_28.tar.gz\n   mv vgg_16.ckpt vgg16.ckpt\n   cd ..\n   ```\n2. Train (and test, evaluation)\n  ```Shell\n  python example/train_coco.py\n  ```\n\n3. Visualization with Tensorboard\n  ```Shell\n  tensorboard --logdir=tensorboard/log \u0026\n  ```\n\nBy default, trained networks are saved under:\n\n```\noutput/[NET]\n```\n\nTensorboard information for train and validation is saved under:\n\n```\ntensorboard/[NET]/\n```\n\n### Citation\nFor citation, please consider citing Xinlei's work\n\n    @article{chen17implementation,\n        Author = {Xinlei Chen and Abhinav Gupta},\n        Title = {An Implementation of Faster RCNN with Study for Region Sampling},\n        Journal = {arXiv preprint arXiv:1702.02138},\n        Year = {2017}\n    }\n\nas well as faster RCNN citation:\n\n    @inproceedings{renNIPS15fasterrcnn,\n        Author = {Shaoqing Ren and Kaiming He and Ross Girshick and Jian Sun},\n        Title = {Faster {R-CNN}: Towards Real-Time Object Detection\n                 with Region Proposal Networks},\n        Booktitle = {Advances in Neural Information Processing Systems ({NIPS})},\n        Year = {2015}\n    }\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeplearnphysics%2Ffaster-rcnn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeeplearnphysics%2Ffaster-rcnn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeplearnphysics%2Ffaster-rcnn/lists"}