怎么配置fast R-CNN,注意几个坑

    xiaoxiao2021-12-12  4

    前提是已经配置好Caffe,opencv,Python

    教程:

    https://github.com/735545856/py-faster-rcnn#disclaimer

    指导:

    Clone the Faster R-CNN repository

    # Make sure to clone with --recursive git clone --recursive https://github.com/rbgirshick/py-faster-rcnn.git

    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 thecaffe-fast-rcnn submodule:

    git submodule update --init --recursive

    Note 2: The caffe-fast-rcnn submodule needs to be on thefaster-rcnn branch (or equivalent detached state). This will happen automaticallyif you followed step 1 instructions.

    Build the Cython modules

    cd $FRCN_ROOT/lib make

    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

                这个有点问题, 需将配置好的caffe-master目录下,有makefile和makefile.config ,将其拷贝到caffe-fast-rcnn 下(原来的请备份好),运行 make -j8 && make pycaffe

               5. 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. Seedata/README.md for details.These models were trained on VOC 2007 trainval.

                这个有点问题, 到这个指定的目录下,进行如下命令:  chmod +x fetch_faster_rcnn_models.sh,  然后运行:  ./fetch_faster_rcnn_models.sh

    至此,告一段落。为了运行demo效果,还要做如下工作。

    Beyond the demo: installation for training and testing models

    Download the training, validation, test data and VOCdevkit

    wget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtrainval_06-Nov-2007.tar wget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtest_06-Nov-2007.tar wget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCdevkit_08-Jun-2007.tar

    Extract all of these tars into one directory named VOCdevkit

    tar xvf VOCtrainval_06-Nov-2007.tar tar xvf VOCtest_06-Nov-2007.tar tar xvf VOCdevkit_08-Jun-2007.tar

    It should have this basic structure

    $VOCdevkit/ # development kit $VOCdevkit/VOCcode/ # VOC utility code $VOCdevkit/VOC2007 # image sets, annotations, etc. # ... and several other directories ...

    Create symlinks for the PASCAL VOC dataset

    cd $FRCN_ROOT/data ln -s $VOCdevkit VOCdevkit2007

              5. To run the demo

    cd $FRCN_ROOT ./tools/demo.py

    即可运行demo

    主要参考: https://github.com/735545856/py-faster-rcnn#disclaimer

    转载请注明原文地址: https://ju.6miu.com/read-900138.html

    最新回复(0)