<commit_before># *Fast* R-CNN: Fast Region-based Convolutional Networks for object detection

Created by <NAME> at Microsoft Research, Redmond.

### Introduction

**Fast R-CNN** is a fast framework for object detection with deep ConvNets. Fast R-CNN
 - trains state-of-the-art models, like VGG16, 9x faster than traditional R-CNN and 3x faster than SPPnet,
 - runs 200x faster than R-CNN and 10x faster than SPPnet at test-time,
 - has a significantly higher mAP on PASCAL VOC than both R-CNN and SPPnet,
 - and is written in Python and C++/Caffe.

Fast R-CNN was initially described in an [arXiv tech report](http://arxiv.org/abs/1504.08083).

### License

Fast R-CNN is released under the MIT License (refer to the LICENSE file for details).

### Citing Fast R-CNN

If you find Fast R-CNN useful in your research, please consider citing:

    @article{girshick15fastrcnn,
        Author = {<NAME>},
        Title = {Fast R-CNN},
        Journal = {arXiv preprint arXiv:1504.08083},
        Year = {2015}
    }
    
### Contents
1. [Requirements: software](#requirements-software)
2. [Requirements: hardware](#requirements-hardware)
3. [Basic installation](#installation-sufficient-for-the-demo)
4. [Demo](#demo)
5. [Beyond the demo: training and testing](#beyond-the-demo-installation-for-training-and-testing-models)
6. [Usage](#usage)
7. [Extra downloads](#extra-downloads)

### Requirements: software

1. Requirements for `Caffe` and `pycaffe` (see: [Caffe installation instructions](http://caffe.berkeleyvision.org/installation.html))

  **Note:** Caffe *must* be built with support for Python layers!

  ```make
  # In your Makefile.config, make sure to have this line uncommented
  WITH_PYTHON_LAYER := 1
  ```

  You can download my [Makefile.config](http://www.cs.berkeley.edu/~rbg/fast-rcnn-data/Makefile.config) for reference.
2. Python packages you might not have: `cython`, `python-opencv`, `easydict`
3. [optional] MATLAB (required for PASCAL VOC evaluation only)

### Requirements: hardware

1. For training smaller networks (CaffeNet, VGG_CNN_M_1024) a good GPU (e.g., Titan, K20, K40, ...) with at least 3G of memory suffices
2. For training with VGG16, you'll need a K40 (~11G of memory)

### Installation (sufficient for the demo)
1. Clone the Fast R-CNN repository
  ```Shell
  # Make sure to clone without --recursive, since we manually clone the `caffe-fast-rcnn` repository
  git clone https://github.com/rbgirshick/fast-rcnn.git
  ```

  **Note:**We'll call the directory that you cloned Fast R-CNN into `FRCN_ROOT` and the caffe impelementation of Fast R-CNN int `CAFF_FRCN_ROOT`
  
  ```Shell
  cd fast-rcnn
  rm -r caffe-fast-rcnn
  ```

2. Install Caffe implemetation of the Fast R-CNN repository
  ```Shell
  git clone https://github.com/rbgirshick/caffe-fast-rcnn.git
  cd caffe-fast-rcnn
  git checkout bcd9b4eadc7d8fbc433aeefd564e82ec63aaf69c  
  ```

3. Make symbolic link of caffe in `FRCN_ROOT`
  ```Shell
  cd $FRCN_ROOT 
  ln -s $CAFFE_FRCN_ROOT caffe-fast-rcnn
  ```

4. Build the Cython modules
    ```Shell
    cd $FRCN_ROOT/lib
    make
    ```
    
5. Build Caffe and pycaffe
    ```Shell
    cd $FRCN_ROOT/caffe-fast-rcnn
    # You should locate via above path, not via $CAFFE_FRCN_ROOT 
    #
    # Now follow the Caffe installation instructions here:
    #   http://caffe.berkeleyvision.org/installation.html

    # If you're experienced with Caffe and have all of the requirements installed
    # and your Makefile.config in place, then simply do:
    cd $CAFFE_FRCN_ROOT
    make -j8 && make pycaffe
    ```
  **Note:** If you got an error message `./include/caffe/util/cudnn.hpp:8:34: fatal error: caffe/proto/caffe.pb.h: No such file or directory`, then you need to manually generate `caffe.ph.h` using `protoc` as follows; 

  ```Shell
  cd $CAFFE_FRCN_ROOT
  protoc src/caffe/proto/caffe.proto --cpp_out=.
  mkdir include/caffe/proto
  mv src/caffe/proto/caffe.pb.h include/caffe/proto 
  ```
  (See https://github.com/muupan/dqn-in-the-caffe/issues/3 for details)
    
6. Download pre-computed Fast R-CNN detectors
    ```Shell
    cd $FRCN_ROOT
    ./data/scripts/fetch_fast_rcnn_models.sh
    ```

    This will populate the `$FRCN_ROOT/data` folder with `fast_rcnn_models`. See `data/README.md` for details.

### Demo<commit_msg>a minor modification in installation instruction<commit_after># *Fast* R-CNN: Fast Region-based Convolutional Networks for object detection

Created by <NAME> at Microsoft Research, Redmond.

### Introduction

**Fast R-CNN** is a fast framework for object detection with deep ConvNets. Fast R-CNN
 - trains state-of-the-art models, like VGG16, 9x faster than traditional R-CNN and 3x faster than SPPnet,
 - runs 200x faster than R-CNN and 10x faster than SPPnet at test-time,
 - has a significantly higher mAP on PASCAL VOC than both R-CNN and SPPnet,
 - and is written in Python and C++/Caffe.

Fast R-CNN was initially described in an [arXiv tech report](http://arxiv.org/abs/1504.08083).

### License

Fast R-CNN is released under the MIT License (refer to the LICENSE file for details).

### Citing Fast R-CNN

If you find Fast R-CNN useful in your research, please consider citing:

    @article{girshick15fastrcnn,
        Author = {<NAME>},
        Title = {Fast R-CNN},
        Journal = {arXiv preprint arXiv:1504.08083},
        Year = {2015}
    }
    
### Contents
1. [Requirements: software](#requirements-software)
2. [Requirements: hardware](#requirements-hardware)
3. [Basic installation](#installation-sufficient-for-the-demo)
4. [Demo](#demo)
5. [Beyond the demo: training and testing](#beyond-the-demo-installation-for-training-and-testing-models)
6. [Usage](#usage)
7. [Extra downloads](#extra-downloads)

### Requirements: software

1. Requirements for `Caffe` and `pycaffe` (see: [Caffe installation instructions](http://caffe.berkeleyvision.org/installation.html))

  **Note:** Caffe *must* be built with support for Python layers!

  ```make
  # In your Makefile.config, make sure to have this line uncommented
  WITH_PYTHON_LAYER := 1
  ```

  You can download my [Makefile.config](http://www.cs.berkeley.edu/~rbg/fast-rcnn-data/Makefile.config) for reference.
2. Python packages you might not have: `cython`, `python-opencv`, `easydict`
3. [optional] MATLAB (required for PASCAL VOC evaluation only)

### Requirements: hardware

1. For training smaller networks (CaffeNet, VGG_CNN_M_1024) a good GPU (e.g., Titan, K20, K40, ...) with at least 3G of memory suffices
2. For training with VGG16, you'll need a K40 (~11G of memory)

### Installation (sufficient for the demo)
1. Clone the Fast R-CNN repository
  ```Shell
  # Make sure to clone without --recursive, since we manually clone the `caffe-fast-rcnn` repository
  git clone https://github.com/rbgirshick/fast-rcnn.git
  ```

  **Note:**We'll call the directory that you cloned Fast R-CNN into `FRCN_ROOT` and the caffe impelementation of Fast R-CNN int `CAFF_FRCN_ROOT`
  
  ```Shell
  cd fast-rcnn
  rm -r caffe-fast-rcnn
  ```

2. Install Caffe implemetation of the Fast R-CNN repository
  ```Shell
  git clone https://github.com/rbgirshick/caffe-fast-rcnn.git
  cd caffe-fast-rcnn
  git checkout bcd9b4eadc7d8fbc433aeefd564e82ec63aaf69c  
  ```

3. Make symbolic link of caffe in `FRCN_ROOT`
  ```Shell
  cd $FRCN_ROOT 
  ln -s $CAFFE_FRCN_ROOT caffe-fast-rcnn
  ```

4. Build the Cython modules
    ```Shell
    cd $FRCN_ROOT/lib
    make
    ```
    
5. Build Caffe and pycaffe
    ```Shell
    cd $FRCN_ROOT/caffe-fast-rcnn
    # You should locate via the above path, not via $CAFFE_FRCN_ROOT
    # If you don't, roi_data_layer will not be compiled
    #
    # Now follow the Caffe installation instructions here:
    #   http://caffe.berkeleyvision.org/installation.html

    # If you're experienced with Caffe and have all of the requirements installed
    # and your Makefile.config in place, then simply do:
    cd $CAFFE_FRCN_ROOT
    make -j8 && make pycaffe
    ```
  **Note:** If you got an error message `./include/caffe/util/cudnn.hpp:8:34: fatal error: caffe/proto/caffe.pb.h: No such file or directory`, then you need to manually generate `caffe.ph.h` using `protoc` as follows; 

  ```Shell
  cd $CAFFE_FRCN_ROOT
  protoc src/caffe/proto/caffe.proto --cpp_out=.
  mkdir include/caffe/proto
  mv src/caffe/proto/caffe.pb.h include/caffe/proto 
  ```
  (See https://github.com/muupan/dqn-in-the-caffe/issues/3 for details)
    
6. Download pre-computed Fast R-CNN detectors
    ```Shell
    cd $FRCN_ROOT
    ./data/scripts/fetch_fast_rcnn_models.sh
    ```

    This will populate the `$FRCN_ROOT/data` folder with `fast_rcnn_models`. See `data/README.md` for details.

### Demo
{'fraction_non_alphanumeric': 0.11207294552169898, 'fraction_numerical': 0.020313942751615882, 'mean_word_length': 3.6361690743713218, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '437792', 'n_tokens_mistral': 3126, 'n_tokens_neox': 2846, 'n_words': 941}