You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The official Faster R-CNN code (written in MATLAB) is available [here](https://github.com/ShaoqingRen/faster_rcnn).
4
-
If your goal is to reproduce the results in our NIPS 2015 paper, please use the [official code](https://github.com/ShaoqingRen/faster_rcnn).
5
-
6
-
This repository contains a Python *reimplementation* of the MATLAB code.
7
-
This Python implementation is built on a fork of [Fast R-CNN](https://github.com/rbgirshick/fast-rcnn).
8
-
There are slight differences between the two implementations.
9
-
In particular, this Python port
10
-
- is ~10% slower at test-time, because some operations execute on the CPU in Python layers (e.g., 220ms / image vs. 200ms / image for VGG16)
11
-
- gives similar, but not exactly the same, mAP as the MATLAB version
12
-
- is *not compatible* with models trained using the MATLAB code due to the minor implementation differences
13
-
-**includes approximate joint training** that is 1.5x faster than alternating optimization (for VGG16) -- see these [slides](https://www.dropbox.com/s/xtr4yd4i5e0vw8g/iccv15_tutorial_training_rbg.pdf?dl=0) for more information
14
-
15
-
# *Faster* R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
16
-
17
-
By Shaoqing Ren, Kaiming He, Ross Girshick, Jian Sun (Microsoft Research)
18
-
19
-
This Python implementation contains contributions from Sean Bell (Cornell) written during an MSR internship.
20
-
21
-
Please see the official [README.md](https://github.com/ShaoqingRen/faster_rcnn/blob/master/README.md) for more details.
22
-
23
-
Faster R-CNN was initially described in an [arXiv tech report](http://arxiv.org/abs/1506.01497) and was subsequently published in NIPS 2015.
24
-
25
-
### License
26
-
27
-
Faster R-CNN is released under the MIT License (refer to the LICENSE file for details).
28
-
29
-
### Citing Faster R-CNN
30
-
31
-
If you find Faster R-CNN useful in your research, please consider citing:
32
-
33
-
@inproceedings{renNIPS15fasterrcnn,
34
-
Author = {Shaoqing Ren and Kaiming He and Ross Girshick and Jian Sun},
35
-
Title = {Faster {R-CNN}: Towards Real-Time Object Detection
36
-
with Region Proposal Networks},
37
-
Booktitle = {Advances in Neural Information Processing Systems ({NIPS})},
38
-
Year = {2015}
39
-
}
1
+
# CPG
2
+
Object-Aware Spatial Constraint for Weakly Supervised Detection
2. We'll call the directory that you cloned Faster R-CNN into `FRCN_ROOT`
39
+
2. We'll call the directory that you cloned CPG into `CPG_ROOT`
81
40
82
41
*Ignore notes 1 and 2 if you followed step 1 above.*
83
42
84
-
**Note 1:** If you didn't clone Faster R-CNN with the `--recursive` flag, then you'll need to manually clone the `caffe-fast-rcnn` submodule:
43
+
**Note 1:** If you didn't clone CPG with the `--recursive` flag, then you'll need to manually clone the `caffe-wsl` submodule:
85
44
```Shell
86
45
git submodule update --init --recursive
87
46
```
88
-
**Note 2:** The `caffe-fast-rcnn` submodule needs to be on the `faster-rcnn` branch (or equivalent detached state). This will happen automatically *if you followed step 1 instructions*.
47
+
**Note 2:** The `caffe-wsl` submodule needs to be on the `wsl` branch (or equivalent detached state). This will happen automatically *if you followed step 1 instructions*.
89
48
90
49
3. Build the Cython modules
91
50
```Shell
92
-
cd$FRCN_ROOT/lib
51
+
cd$CPG_ROOT/lib
93
52
make
94
53
```
95
54
96
55
4. Build Caffe and pycaffe
97
56
```Shell
98
-
cd$FRCN_ROOT/caffe-fast-rcnn
57
+
cd$CPG_ROOT/caffe-wsl
99
58
# Now follow the Caffe installation instructions here:
Pre-trained ImageNet models can be downloaded forthe three networks describedin the paper: ZF and VGG16.
167
111
168
112
```Shell
169
-
cd$FRCN_ROOT
113
+
cd$CPG_ROOT
170
114
./data/scripts/fetch_imagenet_models.sh
171
115
```
172
-
VGG16 comes from the [Caffe Model Zoo](https://github.com/BVLC/caffe/wiki/Model-Zoo), but is provided here for your convenience.
173
-
ZF was trained at MSRA.
174
116
175
117
### Usage
176
118
177
-
To train and test a Faster R-CNN detector using the **alternating optimization** algorithm from our NIPS 2015 paper, use `experiments/scripts/faster_rcnn_alt_opt.sh`.
178
-
Output is written underneath `$FRCN_ROOT/output`.
119
+
To train and test a CPG detector, use `experiments/scripts/cpg.sh`.
This method trains the RPN module jointly with the Fast R-CNN network, rather than alternating between training the two. It results infaster (~ 1.5x speedup) training times and similar detection accuracy. See these [slides](https://www.dropbox.com/s/xtr4yd4i5e0vw8g/iccv15_tutorial_training_rbg.pdf?dl=0) for more details.
137
+
This will reproduction the VGG16 result inpaper.
204
138
205
-
Artifacts generated by the scripts in`tools` are written in this directory.
206
-
207
-
Trained Fast R-CNN networks are saved under:
139
+
Trained CPG networks are saved under:
208
140
209
141
```
210
142
output/<experiment directory>/<dataset name>/
@@ -215,3 +147,26 @@ Test outputs are saved under:
0 commit comments