Skip to content

Alxemade/caffe-faster-rcnn--py36-cpu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The origin py-faster-rcnn runs under Python2.7, now we want to run it under python3.6 CPU environment.

🔥 Faster-RCNN (Faster {R-CNN}: Towards Real-Time Object Detection with Region Proposal Networks) implemented (CPU) in Caffe 1.0 and Opencv3.2 . This is an unofficial implementation. 🔥

Contents

  1. Requirements: software
  2. Requirements: hardware
  3. Basic installation
  4. Demo
  5. References

Requirements: software

Prerequisites

The code is in python 3.6 CPU under the following dependencies:

  1. caffe 1.0.0
  2. opencv 3.2.0
  3. python 3.6
  4. easydict 1.9
  5. h5py (2.10.0)
  6. leveldb (0.201)
  7. leveldb (0.201)
  8. python-dateutil (2.1)
  9. scikit-image (0.17.2)

NOTE If you are having issues compiling and you are using a recent version of CUDA/cuDNN, please consult this issue for a workaround

  1. Requirements for Caffe and pycaffe (see: Caffe installation instructions)

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

# In your Makefile.config, make sure to have this line uncommented
WITH_PYTHON_LAYER := 1
# CPU-only switch (uncomment to build without GPU support).
CPU_ONLY := 1

You can download my [Makefile.config] in google drive (https://drive.google.com/file/d/1TC60laRbVU7ORep8oNM0zM8xE0flOQtn/view?usp=sharing) for reference. 2. Python packages you might not have: cython, python-opencv, easydict 3. [Optional] MATLAB is required for official PASCAL VOC evaluation only. The code now includes unofficial Python evaluation code.

Requirements: hardware

  1. smaller networks (ZF) for CPU with at least 4G of memory suffices.

Installation (sufficient for the demo)

  1. Clone the Faster R-CNN repository
# Make sure to clone with --recursive
git clone --recursive https://github.com/rbgirshick/py-faster-rcnn.git
  1. We'll call the directory that you cloned Faster R-CNN into FRCN_ROOT

    Ignore notes 1 and 2 if you followed step 1 above.

    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:

    git submodule update --init --recursive

    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.

  2. Build the Cython modules

    cd $FRCN_ROOT/lib
    make
  3. Build Caffe and pycaffe

    cd $FRCN_ROOT/caffe-fast-rcnn
    # 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:
    make -j8 && make pycaffe

Note :

  1. For install opencv3, ref my blog

  2. For install caffe-cpu, ref my blog

  3. Download pre-computed Faster R-CNN detectors

    cd $FRCN_ROOT
    ./data/scripts/fetch_faster_rcnn_models.sh

    This will populate the $FRCN_ROOT/data folder with faster_rcnn_models. See data/README.md for details. There will be two caffe pretrained model VGG16_faster_rcnn_final.caffemodel and ZF_faster_rcnn_final.caffemodel.

Demo

After successfully completing basic installation, you'll be ready to run the demo.

To run the demo, currently test on zf model.

cd $FRCN_ROOT
./demo.py --net zf --cpu 

The demo performs detection using a ZF network.

doing and going

  • Caffe-CPU
  • ZF
  • Caffe-GPU
  • Training on Image-Net

References

🍔

  1. caffe py3.6 faster-rcnn

About

The origin py-faster-rcnn runs under Python2.7, now we want to run it under python3.6 CPU environment.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published