Coder Social home page Coder Social logo

charlesshang / tffrcnn Goto Github PK

View Code? Open in Web Editor NEW
873.0 52.0 421.0 3.86 MB

FastER RCNN built on tensorflow

License: MIT License

Shell 0.72% Python 90.77% Makefile 0.01% C++ 6.74% Cuda 0.61% C 1.15%
detection rcnn tensorflow pvanet faster-rcnn pedestrian

tffrcnn's Introduction

TFFRCNN

This is an experimental Tensor Flow implementation of Faster RCNN (TFFRCNN), mainly based on the work of smallcorgi and rbgirshick. I have re-organized the libraries under lib path, making each of python modules independent to each other, so you can understand, re-write the code easily.

For details about R-CNN please refer to the paper Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks by Shaoqing Ren, Kaiming He, Ross Girshick, Jian Sun.

What's New

  • Resnet networks support
  • KITTI object detection dataset support
  • Position Sensitive ROI Pooling (psroi_pooling), not testing yet
  • Hard Example Mining
  • Data Augment
  • PVANet
  • Tensorflow 1.0
  • R-FCN
  • Multi-layer Architecture (HyperNet)
  • more hacks...

Acknowledgments:

  1. py-faster-rcnn

  2. Faster-RCNN_TF

  3. ROI pooling

Requirements: software

  1. Requirements for Tensorflow (see: Tensorflow)

  2. Python packages you might not have: cython, python-opencv, easydict (recommend to install: Anaconda)

Requirements: hardware

  1. For training the end-to-end version of Faster R-CNN with VGG16, 3G of GPU memory is sufficient (using CUDNN)

Installation (sufficient for the demo)

  1. Clone the Faster R-CNN repository
git clone https://github.com/CharlesShang/TFFRCNN.git
  1. Build the Cython modules
    cd TFFRCNN/lib
    make # compile cython and roi_pooling_op, you may need to modify make.sh for your platform

Demo

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

To run the demo

cd $TFFRCNN
python ./faster_rcnn/demo.py --model model_path

The demo performs detection using a VGG16 network trained for detection on PASCAL VOC 2007.

Download list

  1. VGG16 trained on ImageNet

  2. VGG16 - TFFRCNN (0.689 mAP on VOC07).

  3. VGG16 - TFFRCNN (0.748 mAP on VOC07)

  4. Resnet50 trained on ImageNet

  5. Resnet50 - TFFRCNN (0.712 mAP on VOC07)

  6. PVANet trained on ImageNet, converted from caffemodel

Training on Pascal VOC 2007

  1. 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
  2. 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
  3. It should have this basic structure

    $VOCdevkit/                           # development kit
    $VOCdevkit/VOCcode/                   # VOC utility code
    $VOCdevkit/VOC2007                    # image sets, annotations, etc.
    # ... and several other directories ...
  4. Create symlinks for the PASCAL VOC dataset

    cd $TFFRCNN/data
    ln -s $VOCdevkit VOCdevkit2007
  5. Download pre-trained model VGG16 and put it in the path ./data/pretrain_model/VGG_imagenet.npy

  6. Run training scripts

    cd $TFFRCNN
    python ./faster_rcnn/train_net.py --gpu 0 --weights ./data/pretrain_model/VGG_imagenet.npy --imdb voc_2007_trainval --iters 70000 --cfg  ./experiments/cfgs/faster_rcnn_end2end.yml --network VGGnet_train --set EXP_DIR exp_dir
  7. Run a profiling

    cd $TFFRCNN
    # install a visualization tool
    sudo apt-get install graphviz  
    ./experiments/profiling/run_profiling.sh 
    # generate an image ./experiments/profiling/profile.png

Training on KITTI detection dataset

  1. Download the KITTI detection dataset

    http://www.cvlibs.net/datasets/kitti/eval_object.php
    
  2. Extract all of these tar into ./TFFRCNN/data/ and the directory structure looks like this:

    KITTI
        |-- training
                |-- image_2
                    |-- [000000-007480].png
                |-- label_2
                    |-- [000000-007480].txt
        |-- testing
                |-- image_2
                    |-- [000000-007517].png
                |-- label_2
                    |-- [000000-007517].txt
    
  3. Convert KITTI into Pascal VOC format

    cd $TFFRCNN
    ./experiments/scripts/kitti2pascalvoc.py \
    --kitti $TFFRCNN/data/KITTI --out $TFFRCNN/data/KITTIVOC
  4. The output directory looks like this:

    KITTIVOC
        |-- Annotations
                |-- [000000-007480].xml
        |-- ImageSets
                |-- Main
                    |-- [train|val|trainval].txt
        |-- JPEGImages
                |-- [000000-007480].jpg
    
  5. Training on KITTIVOC is just like on Pascal VOC 2007

    python ./faster_rcnn/train_net.py \
    --gpu 0 \
    --weights ./data/pretrain_model/VGG_imagenet.npy \
    --imdb kittivoc_train \
    --iters 160000 \
    --cfg ./experiments/cfgs/faster_rcnn_kitti.yml \
    --network VGGnet_train

tffrcnn's People

Contributors

charlesshang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tffrcnn's Issues

saver.restore(sess, args.model) in demo

args.model is ' ',When I run the demo,I meet many problems,such as make lib,I look others issues solve those proplems.
but ,when I run "saver.restore(sess, args.model)" this words,the program error and stop,I found there is no model ,may be it has existed just I do not know where ,may be it is not exist and need me to get the model by some way.
I do not know what to do , Is there someone can tell me what should I do , now I am studying tf . thank you very muck .

Not compatible with CUDA 8.0?

I am trying to run the demo. I have already successfully built the Cython modules, but when I run the demo as the code in README:

python ./faster_rcnn/demo.py --model model_path

I receive an exception like this:

I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.so.8.0 locally                                                   
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcudnn.so.5 locally                                                      
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcufft.so.8.0 locally                                                    
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcuda.so.1 locally                                                       
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcurand.so.8.0 locally                                                   
                                                                                                                                                            
Traceback (most recent call last):                                                                                                                          
  File "demo.py", line 12, in <module>                                                                                                                      
    from lib.networks.factory import get_network                                                                                                            
  File "/home/zhup/Desktop/TFFRCNN/lib/networks/__init__.py", line 8, in <module>                                                                           
    from .VGGnet_train import VGGnet_train                                                                                                                  
  File "/home/zhup/Desktop/TFFRCNN/lib/networks/VGGnet_train.py", line 2, in <module>                                                                       
    from network import Network                                                                                                                             
  File "/home/zhup/Desktop/TFFRCNN/lib/networks/network.py", line 5, in <module>                                                                            
    from ..roi_pooling_layer import roi_pooling_op as roi_pool_op                                                                                           
  File "/home/zhup/Desktop/TFFRCNN/lib/roi_pooling_layer/__init__.py", line 7, in <module>                                                                  
    import roi_pooling_op                                                                                                                                   
  File "/home/zhup/Desktop/TFFRCNN/lib/roi_pooling_layer/roi_pooling_op.py", line 5, in <module>                                                            
    _roi_pooling_module = tf.load_op_library(filename)                                                                                                      
  File "/home/zhup/anaconda3/envs/frcnn-tf/lib/python2.7/site-packages/tensorflow/python/framework/load_library.py", line 64, in load_op_library            
    None, None, error_msg, error_code)                                                                                                                      
tensorflow.python.framework.errors_impl.NotFoundError: libcudart.so.7.5: cannot open shared object file: No such file or directory

It seems the program is importing CUDA library of version 7.5, but I am using CUDA 8.0. My Tensorflow version is 1.0.1. Did anyone meet this kind of problem? Is this script incompatible with CUDA 8.0?

Thank you!

Running demo on CPU

Is it possible to run the demo script on a machine without a gpu? As in, without CUDA or CUDNN?

Question about the mAP of VGG?

Hi,
I saw your trained model of VGGnet with two different mAP numbers as below,
VGG16 - TFFRCNN (0.689 mAP on VOC07)
VGG16 - TFFRCNN (0.748 mAP on VOC07)

The first one is align with the numbers reported in the original paper. The second one is much higher than the original paper. I am wondered what you had changed for this version? Thanks

Tensor name "conv4_2/biases" not found in checkpoint files /home/user/workspace/liuhao/5_TFFRCNN/TFFRCNN/Resnet_iter_200000.ckpt

Environment :
tensorflow 1.0
cuda 8.0+cudnn 5.1
GPU: new titan x *2

python ./faster_rcnn/demo.py  --model /home/user/workspace/liuhao/5_TFFRCNN/TFFRCNN/Resnet_iter_200000.ckpt 
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcurand.so.8.0 locally
./faster_rcnn
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
I tensorflow/core/common_runtime/gpu/gpu_device.cc:885] Found device 0 with properties: 
name: TITAN X (Pascal)
major: 6 minor: 1 memoryClockRate (GHz) 1.531
pciBusID 0000:02:00.0
Total memory: 11.90GiB
Free memory: 11.35GiB
W tensorflow/stream_executor/cuda/cuda_driver.cc:590] creating context when one is currently active; existing: 0x33471a0
I tensorflow/core/common_runtime/gpu/gpu_device.cc:885] Found device 1 with properties: 
name: TITAN X (Pascal)
major: 6 minor: 1 memoryClockRate (GHz) 1.531
pciBusID 0000:82:00.0
Total memory: 11.90GiB
Free memory: 11.75GiB
I tensorflow/core/common_runtime/gpu/gpu_device.cc:777] Peer access not supported between device ordinals 0 and 1
I tensorflow/core/common_runtime/gpu/gpu_device.cc:777] Peer access not supported between device ordinals 1 and 0
I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] DMA: 0 1 
I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 0:   Y N 
I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 1:   N Y 
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: TITAN X (Pascal), pci bus id: 0000:02:00.0)
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:1) -> (device: 1, name: TITAN X (Pascal), pci bus id: 0000:82:00.0)
Tensor("Placeholder:0", shape=(?, ?, ?, 3), dtype=float32)
Tensor("conv5_3/conv5_3:0", shape=(?, ?, ?, 512), dtype=float32)
Tensor("rpn_conv/3x3/rpn_conv/3x3:0", shape=(?, ?, ?, 512), dtype=float32)
Tensor("rpn_cls_score/rpn_cls_score:0", shape=(?, ?, ?, 18), dtype=float32)
Tensor("rpn_cls_prob:0", shape=(?, ?, ?, ?), dtype=float32)
Tensor("Reshape_2:0", shape=(?, ?, ?, 18), dtype=float32)
Tensor("rpn_bbox_pred/rpn_bbox_pred:0", shape=(?, ?, ?, 36), dtype=float32)
Tensor("Placeholder_1:0", shape=(?, 3), dtype=float32)
Tensor("conv5_3/conv5_3:0", shape=(?, ?, ?, 512), dtype=float32)
Tensor("rois:0", shape=(?, 5), dtype=float32)
[<tf.Tensor 'conv5_3/conv5_3:0' shape=(?, ?, ?, 512) dtype=float32>, <tf.Tensor 'rois:0' shape=(?, 5) dtype=float32>]
Tensor("fc7/fc7:0", shape=(?, 4096), dtype=float32)
W tensorflow/core/framework/op_kernel.cc:993] Not found: Tensor name "conv4_2/biases" not found in checkpoint files /home/user/workspace/liuhao/5_TFFRCNN/TFFRCNN/Resnet_iter_200000.ckpt
	 [[Node: save/RestoreV2_20 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_20/tensor_names, save/RestoreV2_20/shape_and_slices)]]
W tensorflow/core/framework/op_kernel.cc:993] Not found: Tensor name "conv4_2/biases" not found in checkpoint files /home/user/workspace/liuhao/5_TFFRCNN/TFFRCNN/Resnet_iter_200000.ckpt
	 [[Node: save/RestoreV2_20 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_20/tensor_names, save/RestoreV2_20/shape_and_slices)]]
W tensorflow/core/framework/op_kernel.cc:993] Not found: Tensor name "conv4_2/biases" not found in checkpoint files /home/user/workspace/liuhao/5_TFFRCNN/TFFRCNN/Resnet_iter_200000.ckpt
	 [[Node: save/RestoreV2_20 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_20/tensor_names, save/RestoreV2_20/shape_and_slices)]]
W tensorflow/core/framework/op_kernel.cc:993] Not found: Tensor name "conv4_2/biases" not found in checkpoint files /home/user/workspace/liuhao/5_TFFRCNN/TFFRCNN/Resnet_iter_200000.ckpt
	 [[Node: save/RestoreV2_20 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_20/tensor_names, save/RestoreV2_20/shape_and_slices)]]
W tensorflow/core/framework/op_kernel.cc:993] Not found: Tensor name "conv4_2/biases" not found in checkpoint files /home/user/workspace/liuhao/5_TFFRCNN/TFFRCNN/Resnet_iter_200000.ckpt
	 [[Node: save/RestoreV2_20 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_20/tensor_names, save/RestoreV2_20/shape_and_slices)]]
W tensorflow/core/framework/op_kernel.cc:993] Not found: Tensor name "conv4_2/biases" not found in checkpoint files /home/user/workspace/liuhao/5_TFFRCNN/TFFRCNN/Resnet_iter_200000.ckpt
	 [[Node: save/RestoreV2_20 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_20/tensor_names, save/RestoreV2_20/shape_and_slices)]]
W tensorflow/core/framework/op_kernel.cc:993] Not found: Tensor name "conv4_2/biases" not found in checkpoint files /home/user/workspace/liuhao/5_TFFRCNN/TFFRCNN/Resnet_iter_200000.ckpt
	 [[Node: save/RestoreV2_20 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_20/tensor_names, save/RestoreV2_20/shape_and_slices)]]
W tensorflow/core/framework/op_kernel.cc:993] Not found: Tensor name "conv4_2/biases" not found in checkpoint files /home/user/workspace/liuhao/5_TFFRCNN/TFFRCNN/Resnet_iter_200000.ckpt
	 [[Node: save/RestoreV2_20 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_20/tensor_names, save/RestoreV2_20/shape_and_slices)]]
W tensorflow/core/framework/op_kernel.cc:993] Not found: Tensor name "conv4_2/biases" not found in checkpoint files /home/user/workspace/liuhao/5_TFFRCNN/TFFRCNN/Resnet_iter_200000.ckpt
	 [[Node: save/RestoreV2_20 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_20/tensor_names, save/RestoreV2_20/shape_and_slices)]]
Loading network VGGnet_test... 
Traceback (most recent call last):
  File "./faster_rcnn/demo.py", line 124, in <module>
    saver.restore(sess, args.model)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1439, in restore
    {self.saver_def.filename_tensor_name: save_path})
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 767, in run
    run_metadata_ptr)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 965, in _run
    feed_dict_string, options, run_metadata)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1015, in _do_run
    target_list, options, run_metadata)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1035, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.NotFoundError: Tensor name "conv4_2/biases" not found in checkpoint files /home/user/workspace/liuhao/5_TFFRCNN/TFFRCNN/Resnet_iter_200000.ckpt
	 [[Node: save/RestoreV2_20 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_20/tensor_names, save/RestoreV2_20/shape_and_slices)]]

Caused by op u'save/RestoreV2_20', defined at:
  File "./faster_rcnn/demo.py", line 123, in <module>
    saver = tf.train.Saver()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1051, in __init__
    self.build()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1081, in build
    restore_sequentially=self._restore_sequentially)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 675, in build
    restore_sequentially, reshape)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 402, in _AddRestoreOps
    tensors = self.restore_op(filename_tensor, saveable, preferred_shard)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 242, in restore_op
    [spec.tensor.dtype])[0])
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_io_ops.py", line 668, in restore_v2
    dtypes=dtypes, name=name)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 763, in apply_op
    op_def=op_def)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2395, in create_op
    original_op=self._default_original_op, op_def=op_def)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1264, in __init__
    self._traceback = _extract_stack()

NotFoundError (see above for traceback): Tensor name "conv4_2/biases" not found in checkpoint files /home/user/workspace/liuhao/5_TFFRCNN/TFFRCNN/Resnet_iter_200000.ckpt
	 [[Node: save/RestoreV2_20 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_20/tensor_names, save/RestoreV2_20/shape_and_slices)]]


KeyError: 'max_overlaps'

I got ResourceExhaustedError when running train_net.py with original PASCAL VOC 2007,
so I reduced the number of Images and Annotations to 1000.
Then I tried to run train_net.py again, and got an error below.

What should I do for solving this error?
Could you please let me know any solution for this?

Computing bounding-box regression targets...
Traceback (most recent call last):
File "./faster_rcnn/train_net.py", line 109, in
restore=bool(int(args.restore)))
File "./faster_rcnn/../lib/fast_rcnn/train.py", line 394, in train_net
sw = SolverWrapper(sess, network, imdb, roidb, output_dir, logdir= log_dir, pretrained_model=pretrained_model)
File "./faster_rcnn/../lib/fast_rcnn/train.py", line 44, in init
self.bbox_means, self.bbox_stds = rdl_roidb.add_bbox_regression_targets(roidb)
File "./faster_rcnn/../lib/roi_data_layer/roidb.py", line 65, in add_bbox_regression_targets
max_overlaps = roidb[im_i]['max_overlaps']
KeyError: 'max_overlaps'

Stuck on test

When I run the test code:

python ./faster_rcnn/test_net.py --gpu 0 --weights ./output/faster_rcnn_end2end_resnet_voc/voc_2007_trainval/Resnet50_iter_70000.ckpt --imdb voc_2007_test --cfg ./experiments/cfgs/faster_rcnn_end2end_resnet.yml --network Resnet50_test

It stuck on

Waiting for ./output/faster_rcnn_end2end_resnet_voc/voc_2007_trainval/Resnet50_iter_70000.ckpt to exist...

make error in lib (on mac os 10.11.6 El Capitan)

When running make in lib directory, I am getting the error

ndefined symbols for architecture x86_64:
"tensorflow::DEVICE_CPU", referenced from:
___cxx_global_var_init.15 in roi_pooling_op-db8872.o
___cxx_global_var_init.18 in roi_pooling_op-db8872.o
"tensorflow::DEVICE_GPU", referenced from:
___cxx_global_var_init.20 in roi_pooling_op-db8872.o
___cxx_global_var_init.22 in roi_pooling_op-db8872.o
"tensorflow::GetNodeAttr(tensorflow::AttrSlice const&, tensorflow::StringPiece, float*)", referenced from:
tensorflow::Status tensorflow::OpKernelConstruction::GetAttr(tensorflow::StringPiece, float*) const in roi_pooling_op-db8872.o
"tensorflow::GetNodeAttr(tensorflow::AttrSlice const&, tensorflow::StringPiece, int*)", referenced from:
tensorflow::Status tensorflow::OpKernelConstruction::GetAttr(tensorflow::StringPiece, int*) const in roi_pooling_op-db8872.o
"tensorflow::TensorShape::SlowCopyFrom(tensorflow::TensorShape const&)", referenced from:
tensorflow::TensorShape::TensorShape(tensorflow::TensorShape const&) in roi_pooling_op-db8872.o
"tensorflow::TensorShape::DestructorOutOfLine()", referenced from:
tensorflow::TensorShape::~TensorShape() in roi_pooling_op-db8872.o
"tensorflow::TensorShape::TensorShape()", referenced from:
RoiPoolOp<Eigen::ThreadPoolDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::GpuDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
"tensorflow::register_op::OpDefBuilderReceiver::OpDefBuilderReceiver(tensorflow::register_op::OpDefBuilderWrapper const&)", referenced from:
___cxx_global_var_init in roi_pooling_op-db8872.o
___cxx_global_var_init.11 in roi_pooling_op-db8872.o
"tensorflow::OpDefBuilder::Attr(tensorflow::StringPiece)", referenced from:
tensorflow::register_op::OpDefBuilderWrapper::Attr(tensorflow::StringPiece) in roi_pooling_op-db8872.o
"tensorflow::OpDefBuilder::Input(tensorflow::StringPiece)", referenced from:
tensorflow::register_op::OpDefBuilderWrapper::Input(tensorflow::StringPiece) in roi_pooling_op-db8872.o
"tensorflow::OpDefBuilder::Output(tensorflow::StringPiece)", referenced from:
tensorflow::register_op::OpDefBuilderWrapper::Output(tensorflow::StringPiece) in roi_pooling_op-db8872.o
"tensorflow::OpDefBuilder::OpDefBuilder(tensorflow::StringPiece)", referenced from:
tensorflow::register_op::OpDefBuilderWrapper::OpDefBuilderWrapper(char const*) in roi_pooling_op-db8872.o
"tensorflow::kernel_factory::OpKernelRegistrar::InitInternal(tensorflow::KernelDef const*, tensorflow::StringPiece, tensorflow::OpKernel* ()(tensorflow::OpKernelConstruction))", referenced from:
tensorflow::kernel_factory::OpKernelRegistrar::OpKernelRegistrar(tensorflow::KernelDef const*, tensorflow::StringPiece, tensorflow::OpKernel* ()(tensorflow::OpKernelConstruction)) in roi_pooling_op-db8872.o
"tensorflow::OpKernelContext::CtxFailure(tensorflow::Status)", referenced from:
RoiPoolOp<Eigen::ThreadPoolDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::GpuDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolGradOp<Eigen::GpuDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
"tensorflow::OpKernelContext::allocate_output(int, tensorflow::TensorShape const&, tensorflow::Tensor**)", referenced from:
RoiPoolingKernel(tensorflow::OpKernelContext*, tensorflow::Tensor const*, tensorflow::Tensor const*, float, int, int, int, int, int, int, tensorflow::TensorShape const&) in roi_pooling_op-db8872.o
RoiPoolingGradKernel(tensorflow::OpKernelContext*, tensorflow::Tensor const*, tensorflow::Tensor const*, tensorflow::Tensor const*, tensorflow::Tensor const*, float, int, int, int, int, int, int, int, tensorflow::TensorShape const&) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
"tensorflow::OpKernelContext::CtxFailureWithWarning(tensorflow::Status)", referenced from:
RoiPoolingKernel(tensorflow::OpKernelContext*, tensorflow::Tensor const*, tensorflow::Tensor const*, float, int, int, int, int, int, int, tensorflow::TensorShape const&) in roi_pooling_op-db8872.o
RoiPoolingGradKernel(tensorflow::OpKernelContext*, tensorflow::Tensor const*, tensorflow::Tensor const*, tensorflow::Tensor const*, tensorflow::Tensor const*, float, int, int, int, int, int, int, int, tensorflow::TensorShape const&) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
"tensorflow::OpKernelContext::input(int)", referenced from:
RoiPoolOp<Eigen::ThreadPoolDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::GpuDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolGradOp<Eigen::GpuDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
"tensorflow::KernelDefBuilder::TypeConstraint(char const*, tensorflow::DataType)", referenced from:
tensorflow::KernelDefBuilder& tensorflow::KernelDefBuilder::TypeConstraint(char const*) in roi_pooling_op-db8872.o
tensorflow::KernelDefBuilder& tensorflow::KernelDefBuilder::TypeConstraint(char const*) in roi_pooling_op-db8872.o
"tensorflow::KernelDefBuilder::Device(char const*)", referenced from:
___cxx_global_var_init.15 in roi_pooling_op-db8872.o
___cxx_global_var_init.18 in roi_pooling_op-db8872.o
___cxx_global_var_init.20 in roi_pooling_op-db8872.o
___cxx_global_var_init.22 in roi_pooling_op-db8872.o
"tensorflow::KernelDefBuilder::KernelDefBuilder(char const*)", referenced from:
tensorflow::register_kernel::Name::Name(char const*) in roi_pooling_op-db8872.o
"tensorflow::TensorShapeUtils::MakeShape(int const*, long long, tensorflow::TensorShape*)", referenced from:
RoiPoolOp<Eigen::ThreadPoolDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::GpuDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
"tensorflow::OpKernelConstruction::CtxFailure(tensorflow::Status)", referenced from:
RoiPoolOp<Eigen::ThreadPoolDevice, float>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::GpuDevice, float>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolGradOp<Eigen::GpuDevice, float>::RoiPoolGradOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
"tensorflow::OpKernelConstruction::CtxFailureWithWarning(tensorflow::Status)", referenced from:
RoiPoolOp<Eigen::ThreadPoolDevice, float>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::GpuDevice, float>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolGradOp<Eigen::GpuDevice, float>::RoiPoolGradOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
"tensorflow::OpDef::~OpDef()", referenced from:
tensorflow::OpRegistrationData::~OpRegistrationData() in roi_pooling_op-db8872.o
"tensorflow::Status::Status(tensorflow::error::Code, tensorflow::StringPiece)", referenced from:
tensorflow::Status tensorflow::errors::InvalidArgument<char const*, int>(char const*, int) in roi_pooling_op-db8872.o
tensorflow::Status tensorflow::errors::InvalidArgument<char const*>(char const*) in roi_pooling_op-db8872.o
"tensorflow::strings::FastInt32ToBufferLeft(int, char*)", referenced from:
tensorflow::strings::AlphaNum::AlphaNum(int) in roi_pooling_op-db8872.o
"tensorflow::strings::StrCat(tensorflow::strings::AlphaNum const&)", referenced from:
tensorflow::Status tensorflow::errors::InvalidArgument<char const*>(char const*) in roi_pooling_op-db8872.o
"tensorflow::strings::StrCat(tensorflow::strings::AlphaNum const&, tensorflow::strings::AlphaNum const&)", referenced from:
tensorflow::Status tensorflow::errors::InvalidArgument<char const*, int>(char const*, int) in roi_pooling_op-db8872.o
"tensorflow::OpKernel::OpKernel(tensorflow::OpKernelConstruction*)", referenced from:
RoiPoolOp<Eigen::ThreadPoolDevice, float>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::GpuDevice, float>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolGradOp<Eigen::GpuDevice, float>::RoiPoolGradOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
"tensorflow::OpKernel::~OpKernel()", referenced from:
RoiPoolOp<Eigen::ThreadPoolDevice, float>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, float>::~RoiPoolOp() in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::~RoiPoolOp() in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::GpuDevice, float>::RoiPoolOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::GpuDevice, float>::~RoiPoolOp() in roi_pooling_op-db8872.o
RoiPoolGradOp<Eigen::GpuDevice, float>::RoiPoolGradOp(tensorflow::OpKernelConstruction*) in roi_pooling_op-db8872.o
...
"tensorflow::internal::LogMessageFatal::LogMessageFatal(char const*, int)", referenced from:
tensorflow::core::RefCounted::~RefCounted() in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
void tensorflow::Tensor::FillDimsAndValidateCompatibleShape<1ul>(std::__1::array<long, 1ul>, tensorflow::gtl::ArraySlice) const in roi_pooling_op-db8872.o
tensorflow::TensorShape::dims() const in roi_pooling_op-db8872.o
void tensorflow::Tensor::FillDimsAndValidateCompatibleShape<1ul>(tensorflow::gtl::ArraySlice, std::__1::array<long, 1ul>
) const in roi_pooling_op-db8872.o
tensorflow::KernelDefBuilder::~KernelDefBuilder() in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
...
"tensorflow::internal::LogMessageFatal::~LogMessageFatal()", referenced from:
tensorflow::core::RefCounted::~RefCounted() in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
void tensorflow::Tensor::FillDimsAndValidateCompatibleShape<1ul>(std::__1::array<long, 1ul>, tensorflow::gtl::ArraySlice) const in roi_pooling_op-db8872.o
tensorflow::TensorShape::dims() const in roi_pooling_op-db8872.o
void tensorflow::Tensor::FillDimsAndValidateCompatibleShape<1ul>(tensorflow::gtl::ArraySlice, std::__1::array<long, 1ul>
) const in roi_pooling_op-db8872.o
tensorflow::KernelDefBuilder::~KernelDefBuilder() in roi_pooling_op-db8872.o
RoiPoolOp<Eigen::ThreadPoolDevice, double>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-db8872.o
...
"tensorflow::internal::CheckOpMessageBuilder::ForVar2()", referenced from:
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<int, int>(int const&, int const&, char const*) in roi_pooling_op-db8872.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<unsigned long, unsigned long>(unsigned long const&, unsigned long const&, char const*) in roi_pooling_op-db8872.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<long long, long long>(long long const&, long long const&, char const*) in roi_pooling_op-db8872.o
"tensorflow::internal::CheckOpMessageBuilder::NewString()", referenced from:
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<int, int>(int const&, int const&, char const*) in roi_pooling_op-db8872.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<unsigned long, unsigned long>(unsigned long const&, unsigned long const&, char const*) in roi_pooling_op-db8872.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<long long, long long>(long long const&, long long const&, char const*) in roi_pooling_op-db8872.o
"tensorflow::internal::CheckOpMessageBuilder::CheckOpMessageBuilder(char const*)", referenced from:
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<int, int>(int const&, int const&, char const*) in roi_pooling_op-db8872.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<unsigned long, unsigned long>(unsigned long const&, unsigned long const&, char const*) in roi_pooling_op-db8872.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<long long, long long>(long long const&, long long const&, char const*) in roi_pooling_op-db8872.o
"tensorflow::internal::CheckOpMessageBuilder::~CheckOpMessageBuilder()", referenced from:
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<int, int>(int const&, int const&, char const*) in roi_pooling_op-db8872.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<unsigned long, unsigned long>(unsigned long const&, unsigned long const&, char const*) in roi_pooling_op-db8872.o
std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >* tensorflow::internal::MakeCheckOpString<long long, long long>(long long const&, long long const&, char const*) in roi_pooling_op-db8872.o
"tensorflow::AttrSlice::AttrSlice(tensorflow::NodeDef const&)", referenced from:
tensorflow::Status tensorflow::OpKernelConstruction::GetAttr(tensorflow::StringPiece, int*) const in roi_pooling_op-db8872.o
tensorflow::Status tensorflow::OpKernelConstruction::GetAttr(tensorflow::StringPiece, float*) const in roi_pooling_op-db8872.o
"tensorflow::TensorShape::dim_size(int) const", referenced from:
tensorflow::Tensor::dim_size(int) const in roi_pooling_op-db8872.o
"Eigen::GpuDevice const& tensorflow::OpKernelContext::eigen_deviceEigen::GpuDevice() const", referenced from:
RoiPoolingKernel(tensorflow::OpKernelContext*, tensorflow::Tensor const*, tensorflow::Tensor const*, float, int, int, int, int, int, int, tensorflow::TensorShape const&) in roi_pooling_op-db8872.o
RoiPoolingGradKernel(tensorflow::OpKernelContext*, tensorflow::Tensor const*, tensorflow::Tensor const*, tensorflow::Tensor const*, tensorflow::Tensor const*, float, int, int, int, int, int, int, int, tensorflow::TensorShape const&) in roi_pooling_op-db8872.o
"tensorflow::Tensor::CheckTypeAndIsAligned(tensorflow::DataType) const", referenced from:
tensorflow::TTypes<float, 1ul, long>::ConstTensor tensorflow::Tensor::shaped<float, 1ul>(tensorflow::gtl::ArraySlice) const in roi_pooling_op-db8872.o
tensorflow::TTypes<float, 1ul, long>::Tensor tensorflow::Tensor::shaped<float, 1ul>(tensorflow::gtl::ArraySlice) in roi_pooling_op-db8872.o
tensorflow::TTypes<int, 1ul, long>::Tensor tensorflow::Tensor::shaped<int, 1ul>(tensorflow::gtl::ArraySlice) in roi_pooling_op-db8872.o
tensorflow::TTypes<double, 1ul, long>::ConstTensor tensorflow::Tensor::shaped<double, 1ul>(tensorflow::gtl::ArraySlice) const in roi_pooling_op-db8872.o
tensorflow::TTypes<double, 1ul, long>::Tensor tensorflow::Tensor::shaped<double, 1ul>(tensorflow::gtl::ArraySlice) in roi_pooling_op-db8872.o
tensorflow::TTypes<int, 1ul, long>::ConstTensor tensorflow::Tensor::shaped<int, 1ul>(tensorflow::gtl::ArraySlice) const in roi_pooling_op-db8872.o
"typeinfo for tensorflow::OpKernel", referenced from:
typeinfo for RoiPoolOp<Eigen::ThreadPoolDevice, float> in roi_pooling_op-db8872.o
typeinfo for RoiPoolOp<Eigen::ThreadPoolDevice, double> in roi_pooling_op-db8872.o
typeinfo for RoiPoolOp<Eigen::GpuDevice, float> in roi_pooling_op-db8872.o
typeinfo for RoiPoolGradOp<Eigen::GpuDevice, float> in roi_pooling_op-db8872.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Seems to me cython created so is having problem linking up.
any help? thanks.

Resnet101 error

Today I tried Resnet101 in CharlesShang/TFFRCNN (pulled latest codes as of
today from master branch), saw following error in training:

Traceback (most recent call last):
File "./faster_rcnn/train_net.py", line 109, in
restore=bool(int(args.restore)))
File "./faster_rcnn/../lib/fast_rcnn/train.py", line 397, in train_net
sw.train_model(sess, max_iters, restore=restore)
File "./faster_rcnn/../lib/fast_rcnn/train.py", line 108, in train_model
self.net.build_loss(ohem=cfg.TRAIN.OHEM)
File "./faster_rcnn/../lib/networks/network.py", line 446, in build_loss
cls_score = self.get_output('cls_score') # (R, C+1)
File "./faster_rcnn/../lib/networks/network.py", line 80, in get_output
raise KeyError('Unknown layer name fed: %s'%layer)
KeyError: 'Unknown layer name fed: cls_score'

In original https://github.com/miraclebiu/TFFRCN_resnet50, resnet101 works fine (though no accuracy improvement).

I run into this issue during compilation : error: psroi_pooling_op.cu.o: No such file or directory

Detailed traceback:



2 errors detected in the compilation of "/tmp/tmpxft_00002821_00000000-7_roi_pooling_op_gpu.cu.cpp1.ii".
g++: error: roi_pooling_op.cu.o: No such file or directory
/usr/lib/gcc/x86_64-linux-gnu/5/include/mwaitxintrin.h(36): error: identifier "__builtin_ia32_monitorx" is undefined

/usr/lib/gcc/x86_64-linux-gnu/5/include/mwaitxintrin.h(42): error: identifier "__builtin_ia32_mwaitx" is undefined

2 errors detected in the compilation of "/tmp/tmpxft_0000282b_00000000-7_psroi_pooling_op_gpu.cu.cpp1.ii".
g++: error: psroi_pooling_op.cu.o: No such file or directory

My .bashrc looks like this (I tried all I could :) ):

export CUDA_HOME=/usr/local/cuda
export CUDAHOME=/usr/local/cuda
export PATH=$PATH:/usr/local/cuda/bin
export PATH=$PATH:/usr/local/cuda-8.0/bin
export PATH=$PATH:/usr/local/cuda

Can you help me with this error?

ImportError: No module named lib.networks.factory

I can build pass, but when i run demo.py it reports error:

scopeserver@scopephotos:~/RaidDisk/DeepLearning/mwang/tensorflow/TFFRCNN$ python ./faster_rcnn/demo.py
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.so locally
./faster_rcnn
Traceback (most recent call last):
File "./faster_rcnn/demo.py", line 12, in
from lib.networks.factory import get_network
ImportError: No module named lib.networks.factory


but i can clearly see the folder is there.

Assert error : invalid boxes found

I try to train the net on my own dataset. And I got this error in /lib/fast_rcnn/bbox_transform.

image: COCO_train2014_000000120718.jpg
Traceback (most recent call last):
File "/home/slade/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/ops/script_ops.py", line 85, in call
ret = func(*args)
File "./faster_rcnn/../lib/rpn_msr/proposal_target_layer_tf.py", line 78, in proposal_target_layer
rois_per_image, _num_classes)
File "./faster_rcnn/../lib/rpn_msr/proposal_target_layer_tf.py", line 182, in _sample_rois
rois[:, 1:5], gt_boxes[gt_assignment[keep_inds], :4], labels)
File "./faster_rcnn/../lib/rpn_msr/proposal_target_layer_tf.py", line 224, in _compute_targets
targets = bbox_transform(ex_rois, gt_rois)
File "./faster_rcnn/../lib/fast_rcnn/bbox_transform.py", line 25, in bbox_transform
format(ex_rois[np.argmin(ex_widths), :], ex_rois[np.argmin(ex_heights), :])
AssertionError: Invalid boxes found: [ 81557.203125 205.16482544 -285.29534912 257.66482544] [ 1.25 280. 95. 297.5 ]

I compared your work with smallcorgi. Found that you added the assertion in the code.
Any idea why this error occurred?I tried to change the RNG_SEED in config.py, also tried to lower
learning rate. but this error still exist. Looking forward to your answers. Thanks a lot.

ckpt file for demo.py after training

After running training, ie
python ./faster_rcnn/train_net.py --gpu 0 --weights ./data/pretrain_model/VGG_imagenet.npy --imdb voc_2007_trainval --iters 70000 --cfg ./experiments/cfgs/faster_rcnn_end2end.yml --network VGGnet_train --set EXP_DIR exp_dir
The last line in log prints
Wrote snapshot to: /xxxx/VGGnet_fast_rcnn_iter_70000.ckpt done solving
But I see three files
VGGnet_fast_rcnn_iter_70000.ckpt.data-00000-of-00001 VGGnet_fast_rcnn_iter_70000.ckpt.index VGGnet_fast_rcnn_iter_70000.ckpt.meta
I then trying to run demo. none of them works with
python ./faster_rcnn/demo.py --model model_path
how can i get single ckpt file similar to the one that can downloaded (https://github.com/CharlesShang/TFFRCNN#download-list) VGGnet_fast_rcnn_iter_150000.ckpt as per the instructions in readme ?

InternalError (see above for traceback): Blas SGEMM launch failed with Demo.py

Thanks for the great effort in sharing this user friendly version, I have run it on python2 and see the same error. After spending 2 days of sparetime to change it to python3 versions, I still see the same error...any idea why seeing "Blas SGEMM launch failed"?

~/TFFRCNN3/faster_rcnn$ python3 demo.py --model "/home/jeffreynghm/TFFRCNN3/data/pretrain_model/VGGnet_fast_rcnn_iter_70000.ckpt"
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcurand.so.8.0 locally

W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:910] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
I tensorflow/core/common_runtime/gpu/gpu_device.cc:885] Found device 0 with properties: 
name: GeForce 940M
major: 5 minor: 0 memoryClockRate (GHz) 1.176
pciBusID 0000:01:00.0
Total memory: 1.96GiB
Free memory: 1.63GiB
I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] DMA: 0 
I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 0:   Y 
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce 940M, pci bus id: 0000:01:00.0)
Tensor("Placeholder:0", shape=(?, ?, ?, 3), dtype=float32)
Tensor("conv5_3/Relu:0", shape=(?, ?, ?, 512), dtype=float32)
Tensor("rpn_conv/3x3/Relu:0", shape=(?, ?, ?, 512), dtype=float32)
Tensor("rpn_cls_score/BiasAdd:0", shape=(?, ?, ?, 18), dtype=float32)
Tensor("rpn_cls_prob:0", shape=(?, ?, ?, ?), dtype=float32)
Tensor("Reshape_2:0", shape=(?, ?, ?, 18), dtype=float32)
Tensor("rpn_bbox_pred/BiasAdd:0", shape=(?, ?, ?, 36), dtype=float32)
Tensor("Placeholder_1:0", shape=(?, 3), dtype=float32)
Tensor("conv5_3/Relu:0", shape=(?, ?, ?, 512), dtype=float32)
Tensor("rois:0", shape=(?, 5), dtype=float32)
[<tf.Tensor 'conv5_3/Relu:0' shape=(?, ?, ?, 512) dtype=float32>, <tf.Tensor 'rois:0' shape=(?, 5) dtype=float32>]
Tensor("fc7/fc7:0", shape=(?, 4096), dtype=float32)
Loading network VGGnet_test...   done.
W tensorflow/core/common_runtime/bfc_allocator.cc:217] Ran out of memory trying to allocate 791.02MiB. The caller indicates that this is not a failure, but may mean that there could be performance gains if more memory is available.
W tensorflow/core/common_runtime/bfc_allocator.cc:217] Ran out of memory trying to allocate 554.92MiB. The caller indicates that this is not a failure, but may mean that there could be performance gains if more memory is available.
W tensorflow/core/common_runtime/bfc_allocator.cc:217] Ran out of memory trying to allocate 1.08GiB. The caller indicates that this is not a failure, but may mean that there could be performance gains if more memory is available.
W tensorflow/core/common_runtime/bfc_allocator.cc:217] Ran out of memory trying to allocate 1.08GiB. The caller indicates that this is not a failure, but may mean that there could be performance gains if more memory is available.
E tensorflow/stream_executor/cuda/cuda_blas.cc:372] failed to create cublas handle: CUBLAS_STATUS_NOT_INITIALIZED
W tensorflow/stream_executor/stream.cc:1390] attempting to perform BLAS operation using StreamExecutor without BLAS support
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 1022, in _do_call
    return fn(*args)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 1004, in _run_fn
    status, run_metadata)
  File "/usr/lib/python3.4/contextlib.py", line 66, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status
    pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.InternalError: Blas SGEMM launch failed : m=1369, n=18, k=512
	 [[Node: rpn_cls_score/Conv2D = Conv2D[T=DT_FLOAT, data_format="NHWC", padding="VALID", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/gpu:0"](rpn_conv/3x3/Relu, rpn_cls_score/weights/read)]]
	 [[Node: bbox_pred/bbox_pred/_89 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/cpu:0", send_device="/job:localhost/replica:0/task:0/gpu:0", send_device_incarnation=1, tensor_name="edge_292_bbox_pred/bbox_pred", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "demo.py", line 132, in <module>
    _, _ = im_detect(sess, net, im)
  File "/home/jeffreynghm/TFFRCNN3/lib/fast_rcnn/test.py", line 176, in im_detect
    feed_dict=feed_dict)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 767, in run
    run_metadata_ptr)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 965, in _run
    feed_dict_string, options, run_metadata)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 1015, in _do_run
    target_list, options, run_metadata)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/client/session.py", line 1035, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InternalError: Blas SGEMM launch failed : m=1369, n=18, k=512
	 [[Node: rpn_cls_score/Conv2D = Conv2D[T=DT_FLOAT, data_format="NHWC", padding="VALID", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/gpu:0"](rpn_conv/3x3/Relu, rpn_cls_score/weights/read)]]
	 [[Node: bbox_pred/bbox_pred/_89 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/cpu:0", send_device="/job:localhost/replica:0/task:0/gpu:0", send_device_incarnation=1, tensor_name="edge_292_bbox_pred/bbox_pred", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]

Caused by op 'rpn_cls_score/Conv2D', defined at:
  File "demo.py", line 122, in <module>
    net = get_network(args.demo_net)
  File "/home/jeffreynghm/TFFRCNN3/lib/networks/factory.py", line 27, in get_network
    return VGGnet_test()
  File "/home/jeffreynghm/TFFRCNN3/lib/networks/VGGnet_test.py", line 16, in __init__
    self.setup()
  File "/home/jeffreynghm/TFFRCNN3/lib/networks/VGGnet_test.py", line 46, in setup
    .conv(1, 1, len(anchor_scales) * 3 * 2, 1, 1, padding='VALID', relu=False, name='rpn_cls_score'))
  File "/home/jeffreynghm/TFFRCNN3/lib/networks/network.py", line 38, in layer_decorated
    layer_output = op(self, layer_input, *args, **kwargs)
  File "/home/jeffreynghm/TFFRCNN3/lib/networks/network.py", line 148, in conv
    conv = convolve(input, kernel)
  File "/home/jeffreynghm/TFFRCNN3/lib/networks/network.py", line 138, in <lambda>
    convolve = lambda i, k: tf.nn.conv2d(i, k, [1, s_h, s_w, 1], padding=padding)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/ops/gen_nn_ops.py", line 396, in conv2d
    data_format=data_format, name=name)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/op_def_library.py", line 763, in apply_op
    op_def=op_def)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/ops.py", line 2327, in create_op
    original_op=self._default_original_op, op_def=op_def)
  File "/usr/local/lib/python3.4/dist-packages/tensorflow/python/framework/ops.py", line 1226, in __init__
    self._traceback = _extract_stack()

InternalError (see above for traceback): Blas SGEMM launch failed : m=1369, n=18, k=512

'NoneType' object has no attribute 'model_checkpoint_path'

When I tried to run training scripts written on "README.md", I got an Error message below.
Could you please let me know how to solve this issue?

python ./faster_rcnn/train_net.py --gpu 0 --weights ./data/pretrain_model/VGG_imagenet.npy --imdb voc_2007_trainval --iters 70000 --cfg ./experiments/cfgs/faster_rcnn_end2end.yml --network VGGnet_train --set EXP_DIR exp_dir
                    ⇩⇩⇩

Solving...
/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gradients.py:90: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
"Converting sparse IndexedSlices to a dense Tensor of unknown shape. "
Traceback (most recent call last):
File "./faster_rcnn/train_net.py", line 109, in
restore=bool(int(args.restore)))
File "./faster_rcnn/../lib/fast_rcnn/train.py", line 396, in train_net
sw.train_model(sess, max_iters, restore=restore)
File "./faster_rcnn/../lib/fast_rcnn/train.py", line 167, in train_model
raise 'Check your pretrained {:s}'.format(ckpt.model_checkpoint_path)
AttributeError: 'NoneType' object has no attribute 'model_checkpoint_path'

My developing environment is below
Tensorflow:0.11.0
GPU/CPU:GPU
Python:2.7.6

make failed with " error: no matching function for call to '_nms'" on osx sierra

nms/gpu_nms.cpp:1879:3: error: no matching function for call to '_nms'
  _nms((&(*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int32_t *, __pyx_pybuffernd_kee...
  ^~~~
nms/gpu_nms.hpp:1:6: note: candidate function not viable: no known conversion from
      '__pyx_t_5numpy_int32_t *' (aka 'long *') to 'int *' for 1st argument
void _nms(int* keep_out, int* num_out, const float* boxes_host, int boxes_num,
     ^
1 warning and 1 error generated.
error: command 'cc' failed with exit status 1
make: *** [all] Error 1

cuda 8.0

✘ $: gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

cudaCheckError() failed : invalid device function

I run python faster_rcnn/demo.py --model model/VGGnet_fast_rcnn_iter_70000.ckpt,it is error.
and I run python faster_rcnn/demo.py --model model/VGGnet_fast_rcnn_iter_70000.ckpt --gpu 0,it is also error. I don't know how to solver it

Error on Training on Pascal VOC 2007

I have got an error when I train on Pascal VOC 2007 according to the README.md:

Traceback (most recent call last):
File "./faster_rcnn/train_net.py", line 109, in <module>
    restore=bool(int(args.restore)))
File "./faster_rcnn/../lib/fast_rcnn/train.py", line 400, in train_net
    sw.train_model(sess, max_iters, restore=restore)
File "./faster_rcnn/../lib/fast_rcnn/train.py", line 171, in train_model
    raise 'Check your pretrained {:s}'.format(ckpt.model_checkpoint_path)
AttributeError: 'NoneType' object has no attribute 'model_checkpoint_path'

I don't know what it exactly means and what I should do

An error when training on VOC

Hi Charles,
Thanks for sharing your code. After run the demo successfully, I run the command for training the faster-rccn on VOC and run into this error:
File "./faster_rcnn/train_net.py", line 109, in
restore=bool(int(args.restore)))
File "./faster_rcnn/../lib/fast_rcnn/train.py", line 400, in train_net
sw.train_model(sess, max_iters, restore=restore)
File "./faster_rcnn/../lib/fast_rcnn/train.py", line 171, in train_model
raise 'Check your pretrained {:s}'.format(ckpt.model_checkpoint_path)
AttributeError: 'NoneType' object has no attribute 'model_checkpoint_path'
Do you have any ideas how to fix it?

Thanks.

Using Resnet50 for FRCN

Sorry to bother you again, I have tried to repalce the VGG to Resnet50 ,so I add two layers: add_layer and batch_normalization layer:

@layer 
def add(self,input,name):
    return tf.add(input[0],input[1])

@layer
def batch_normalization(self,input,name,relu=True,is_training=False):
    if relu:
        temp_layer=tf.contrib.layers.batch_norm(input,scale=True,center=True,is_training=is_training,scope=name)
        return tf.nn.relu(temp_layer)
    else:
        return tf.contrib.layers.batch_norm(input,scale=True,center=True,is_training=is_training,scope=name)

the model file is convert from the caffe-tensorflow project on the github(you can search this on the github), and I convert the bn_layer's data in the caffe to the moving_average and so on , but the result is really really bad ,map is about 55% , and I don't the reason ,maybe the model is not convert right?

Have you tried to replace VGG to resnet50

below is the resnet50_train.py:

class Resnet50_train(Network):
def init(self, trainable=True):
self.inputs = []
self.data = tf.placeholder(tf.float32, shape=[None, None, None, 3], name='data')
self.im_info = tf.placeholder(tf.float32, shape=[None, 3], name='im_info')
self.gt_boxes = tf.placeholder(tf.float32, shape=[None, 5], name='gt_boxes')
self.gt_ishard = tf.placeholder(tf.int32, shape=[None], name='gt_ishard')
self.dontcare_areas = tf.placeholder(tf.float32, shape=[None, 4], name='dontcare_areas')
self.keep_prob = tf.placeholder(tf.float32)
self.layers = dict({'data':self.data, 'im_info':self.im_info, 'gt_boxes':self.gt_boxes,
'gt_ishard': self.gt_ishard, 'dontcare_areas': self.dontcare_areas})
self.trainable = trainable
self.setup()

def setup(self):

    n_classes = cfg.NCLASSES
    # anchor_scales = [8, 16, 32]
    anchor_scales = cfg.ANCHOR_SCALES
    _feat_stride = [16, ]
    (self.feed('data')
         .conv(7, 7, 64, 2, 2, relu=False, name='conv1')
         .batch_normalization(relu=True, name='bn_conv1', is_training=False)
         .max_pool(3, 3, 2, 2, padding='VALID',name='pool1')
         .conv(1, 1, 256, 1, 1, biased=False, relu=False, name='res2a_branch1')
         .batch_normalization(name='bn2a_branch1',is_training=False,relu=False))

    (self.feed('pool1')
         .conv(1, 1, 64, 1, 1, biased=False, relu=False, name='res2a_branch2a')
         .batch_normalization(relu=True, name='bn2a_branch2a',is_training=False)
         .conv(3, 3, 64, 1, 1, biased=False, relu=False, name='res2a_branch2b')
         .batch_normalization(relu=True, name='bn2a_branch2b',is_training=False)
         .conv(1, 1, 256, 1, 1, biased=False, relu=False, name='res2a_branch2c')
         .batch_normalization(name='bn2a_branch2c',is_training=False,relu=False))

    (self.feed('bn2a_branch1', 
               'bn2a_branch2c')
         .add(name='res2a')
         .relu(name='res2a_relu')
         .conv(1, 1, 64, 1, 1, biased=False, relu=False, name='res2b_branch2a')
         .batch_normalization(relu=True, name='bn2b_branch2a',is_training=False)
         .conv(3, 3, 64, 1, 1, biased=False, relu=False, name='res2b_branch2b')
         .batch_normalization(relu=True, name='bn2b_branch2b',is_training=False)
         .conv(1, 1, 256, 1, 1, biased=False, relu=False, name='res2b_branch2c')
         .batch_normalization(name='bn2b_branch2c',is_training=False,relu=False))

    (self.feed('res2a_relu', 
               'bn2b_branch2c')
         .add(name='res2b')
         .relu(name='res2b_relu')
         .conv(1, 1, 64, 1, 1, biased=False, relu=False, name='res2c_branch2a')
         .batch_normalization(relu=True, name='bn2c_branch2a',is_training=False)
         .conv(3, 3, 64, 1, 1, biased=False, relu=False, name='res2c_branch2b')
         .batch_normalization(relu=True, name='bn2c_branch2b',is_training=False)
         .conv(1, 1, 256, 1, 1, biased=False, relu=False, name='res2c_branch2c')
         .batch_normalization(name='bn2c_branch2c',is_training=False,relu=False))

    (self.feed('res2b_relu', 
               'bn2c_branch2c')
         .add(name='res2c')
         .relu(name='res2c_relu')
         .conv(1, 1, 512, 2, 2, biased=False, relu=False, name='res3a_branch1', padding='VALID')
         .batch_normalization(name='bn3a_branch1',is_training=False,relu=False))

    (self.feed('res2c_relu')
         .conv(1, 1, 128, 2, 2, biased=False, relu=False, name='res3a_branch2a', padding='VALID')
         .batch_normalization(relu=True, name='bn3a_branch2a',is_training=False)
         .conv(3, 3, 128, 1, 1, biased=False, relu=False, name='res3a_branch2b')
         .batch_normalization(relu=True, name='bn3a_branch2b',is_training=False)
         .conv(1, 1, 512, 1, 1, biased=False, relu=False, name='res3a_branch2c')
         .batch_normalization(name='bn3a_branch2c',is_training=False,relu=False))

    (self.feed('bn3a_branch1', 
               'bn3a_branch2c')
         .add(name='res3a')
         .relu(name='res3a_relu')
         .conv(1, 1, 128, 1, 1, biased=False, relu=False, name='res3b_branch2a')
         .batch_normalization(relu=True, name='bn3b_branch2a',is_training=False)
         .conv(3, 3, 128, 1, 1, biased=False, relu=False, name='res3b_branch2b')
         .batch_normalization(relu=True, name='bn3b_branch2b',is_training=False)
         .conv(1, 1, 512, 1, 1, biased=False, relu=False, name='res3b_branch2c')
         .batch_normalization(name='bn3b_branch2c',is_training=False,relu=False))

    (self.feed('res3a_relu', 
               'bn3b_branch2c')
         .add(name='res3b')
         .relu(name='res3b_relu')
         .conv(1, 1, 128, 1, 1, biased=False, relu=False, name='res3c_branch2a')
         .batch_normalization(relu=True, name='bn3c_branch2a',is_training=False)
         .conv(3, 3, 128, 1, 1, biased=False, relu=False, name='res3c_branch2b')
         .batch_normalization(relu=True, name='bn3c_branch2b',is_training=False)
         .conv(1, 1, 512, 1, 1, biased=False, relu=False, name='res3c_branch2c')
         .batch_normalization(name='bn3c_branch2c',is_training=False,relu=False))

    (self.feed('res3b_relu', 
               'bn3c_branch2c')
         .add(name='res3c')
         .relu(name='res3c_relu')
         .conv(1, 1, 128, 1, 1, biased=False, relu=False, name='res3d_branch2a')
         .batch_normalization(relu=True, name='bn3d_branch2a',is_training=False)
         .conv(3, 3, 128, 1, 1, biased=False, relu=False, name='res3d_branch2b')
         .batch_normalization(relu=True, name='bn3d_branch2b',is_training=False)
         .conv(1, 1, 512, 1, 1, biased=False, relu=False, name='res3d_branch2c')
         .batch_normalization(name='bn3d_branch2c',is_training=False,relu=False))

    (self.feed('res3c_relu', 
               'bn3d_branch2c')
         .add(name='res3d')
         .relu(name='res3d_relu')
         .conv(1, 1, 1024, 2, 2, biased=False, relu=False, name='res4a_branch1', padding='VALID')
         .batch_normalization(name='bn4a_branch1',is_training=False,relu=False))

    (self.feed('res3d_relu')
         .conv(1, 1, 256, 2, 2, biased=False, relu=False, name='res4a_branch2a', padding='VALID')
         .batch_normalization(relu=True, name='bn4a_branch2a',is_training=False)
         .conv(3, 3, 256, 1, 1, biased=False, relu=False, name='res4a_branch2b')
         .batch_normalization(relu=True, name='bn4a_branch2b',is_training=False)
         .conv(1, 1, 1024, 1, 1, biased=False, relu=False, name='res4a_branch2c')
         .batch_normalization(name='bn4a_branch2c',is_training=False,relu=False))

    (self.feed('bn4a_branch1', 
               'bn4a_branch2c')
         .add(name='res4a')
         .relu(name='res4a_relu')
         .conv(1, 1, 256, 1, 1, biased=False, relu=False, name='res4b_branch2a')
         .batch_normalization(relu=True, name='bn4b_branch2a',is_training=False)
         .conv(3, 3, 256, 1, 1, biased=False, relu=False, name='res4b_branch2b')
         .batch_normalization(relu=True, name='bn4b_branch2b',is_training=False)
         .conv(1, 1, 1024, 1, 1, biased=False, relu=False, name='res4b_branch2c')
         .batch_normalization(name='bn4b_branch2c',is_training=False,relu=False))

    (self.feed('res4a_relu', 
               'bn4b_branch2c')
         .add(name='res4b')
         .relu(name='res4b_relu')
         .conv(1, 1, 256, 1, 1, biased=False, relu=False, name='res4c_branch2a')
         .batch_normalization(relu=True, name='bn4c_branch2a',is_training=False)
         .conv(3, 3, 256, 1, 1, biased=False, relu=False, name='res4c_branch2b')
         .batch_normalization(relu=True, name='bn4c_branch2b',is_training=False)
         .conv(1, 1, 1024, 1, 1, biased=False, relu=False, name='res4c_branch2c')
         .batch_normalization(name='bn4c_branch2c',is_training=False,relu=False))

    (self.feed('res4b_relu', 
               'bn4c_branch2c')
         .add(name='res4c')
         .relu(name='res4c_relu')
         .conv(1, 1, 256, 1, 1, biased=False, relu=False, name='res4d_branch2a')
         .batch_normalization(relu=True, name='bn4d_branch2a',is_training=False)
         .conv(3, 3, 256, 1, 1, biased=False, relu=False, name='res4d_branch2b')
         .batch_normalization(relu=True, name='bn4d_branch2b',is_training=False)
         .conv(1, 1, 1024, 1, 1, biased=False, relu=False, name='res4d_branch2c')
         .batch_normalization(name='bn4d_branch2c',is_training=False,relu=False))

    (self.feed('res4c_relu', 
               'bn4d_branch2c')
         .add(name='res4d')
         .relu(name='res4d_relu')
         .conv(1, 1, 256, 1, 1, biased=False, relu=False, name='res4e_branch2a')
         .batch_normalization(relu=True, name='bn4e_branch2a',is_training=False)
         .conv(3, 3, 256, 1, 1, biased=False, relu=False, name='res4e_branch2b')
         .batch_normalization(relu=True, name='bn4e_branch2b',is_training=False)
         .conv(1, 1, 1024, 1, 1, biased=False, relu=False, name='res4e_branch2c')
         .batch_normalization(name='bn4e_branch2c',is_training=False,relu=False))

    (self.feed('res4d_relu', 
               'bn4e_branch2c')
         .add(name='res4e')
         .relu(name='res4e_relu')
         .conv(1, 1, 256, 1, 1, biased=False, relu=False, name='res4f_branch2a')
         .batch_normalization(relu=True, name='bn4f_branch2a',is_training=False)
         .conv(3, 3, 256, 1, 1, biased=False, relu=False, name='res4f_branch2b')
         .batch_normalization(relu=True, name='bn4f_branch2b',is_training=False)
         .conv(1, 1, 1024, 1, 1, biased=False, relu=False, name='res4f_branch2c')
         .batch_normalization(name='bn4f_branch2c',is_training=False,relu=False))

    (self.feed('res4e_relu', 
               'bn4f_branch2c')
         .add(name='res4f')
         .relu(name='res4f_relu'))

    

    #========= RPN ============
    (self.feed('res4f_relu')
         .conv(3,3,512,1,1,name='rpn_conv/3x3')
         .conv(1,1,len(anchor_scales)*3*2 ,1 , 1, padding='VALID', relu = False, name='rpn_cls_score'))

    (self.feed('rpn_cls_score', 'gt_boxes', 'gt_ishard', 'dontcare_areas', 'im_info')
         .anchor_target_layer(_feat_stride, anchor_scales, name = 'rpn-data' ))
    # Loss of rpn_cls & rpn_boxes

    (self.feed('rpn_conv/3x3')
         .conv(1,1,len(anchor_scales)*3*4, 1, 1, padding='VALID', relu = False, name='rpn_bbox_pred'))

    #========= RoI Proposal ============
    (self.feed('rpn_cls_score')
         .spatial_reshape_layer(2, name = 'rpn_cls_score_reshape')
         .spatial_softmax(name='rpn_cls_prob'))

    (self.feed('rpn_cls_prob')
         .spatial_reshape_layer(len(anchor_scales)*3*2, name = 'rpn_cls_prob_reshape'))

    (self.feed('rpn_cls_prob_reshape','rpn_bbox_pred','im_info')
         .proposal_layer(_feat_stride, anchor_scales, 'TRAIN',name = 'rpn_rois'))

    (self.feed('rpn_rois','gt_boxes', 'gt_ishard', 'dontcare_areas')
         .proposal_target_layer(n_classes,name = 'roi-data'))

    #========= RCNN ============        
    (self.feed('res4f_relu','roi-data')
         .roi_pool(7,7,1.0/16,name='res5a_branch2a_roipooling')
         .conv(1, 1, 512, 2, 2, biased=False, relu=False, name='res5a_branch2a', padding='VALID')
         .batch_normalization(relu=True, name='bn5a_branch2a',is_training=False)
         .conv(3, 3, 512, 1, 1, biased=False, relu=False, name='res5a_branch2b')
         .batch_normalization(relu=True, name='bn5a_branch2b',is_training=False)
         .conv(1, 1, 2048, 1, 1, biased=False, relu=False, name='res5a_branch2c')
         .batch_normalization(name='bn5a_branch2c',is_training=False,relu=False))

    (self.feed('res5a_branch2a_roipooling')
         .conv(1,1,2048,2,2,biased=False, relu=False, name='res5a_branch1', padding='VALID')
         .batch_normalization(name='bn5a_branch1',is_training=False,relu=False))

    (self.feed('bn5a_branch2c','bn5a_branch1')
         .add(name='res5a')
         .relu(name='res5a_relu')
         .conv(1, 1, 512, 1, 1, biased=False, relu=False, name='res5b_branch2a')
         .batch_normalization(relu=True, name='bn5b_branch2a',is_training=False)
         .conv(3, 3, 512, 1, 1, biased=False, relu=False, name='res5b_branch2b')
         .batch_normalization(relu=True, name='bn5b_branch2b',is_training=False)
         .conv(1, 1, 2048, 1, 1, biased=False, relu=False, name='res5b_branch2c')
         .batch_normalization(name='bn5b_branch2c',is_training=False,relu=False))
    #pdb.set_trace()
    (self.feed('res5a_relu', 
               'bn5b_branch2c')
         .add(name='res5b')
         .relu(name='res5b_relu')
         .conv(1, 1, 512, 1, 1, biased=False, relu=False, name='res5c_branch2a')
         .batch_normalization(relu=True, name='bn5c_branch2a',is_training=False)
         .conv(3, 3, 512, 1, 1, biased=False, relu=False, name='res5c_branch2b')
         .batch_normalization(relu=True, name='bn5c_branch2b',is_training=False)
         .conv(1, 1, 2048, 1, 1, biased=False, relu=False, name='res5c_branch2c')
         .batch_normalization(name='bn5c_branch2c',is_training=False,relu=False))
    #pdb.set_trace()
    (self.feed('res5b_relu',
    	       'bn5c_branch2c')
         .add(name='res5c')
         .relu(name='res5c_relu')
         .fc(n_classes, relu=False, name='cls_score')
         .softmax(name='cls_prob'))

    (self.feed('res5c_relu')
         .fc(n_classes*4, relu=False, name='bbox_pred'))

Can't find Tensors in Resnet50 when restoring for the demo.

Getting this error when using saver.restore().
Is there some inconsistency with Resnet50_test.py and this checkpoint file?

NotFoundError (see above for traceback): Tensor name "res5c_branch2c/biases" not found in checkpoint files Resnet_iter_200000.ckpt
[[Node: save/RestoreV2_320 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_320/tensor_names, save/RestoreV2_320/shape_and_slices)]]
[[Node: save/RestoreV2_218/_641 = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/gpu:0", send_device="/job:localhost/replica:0/task:0/cpu:0", send_device_incarnation=1, tensor_name="edge_1627_save/RestoreV2_218", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/gpu:0"]]

KeyError: b'TEST'

Hi! I'm trying to get TFFRCNN to work on my Arch Linux setup. Installation worked just fine (I had to convert the python 2 code to python 3 code using futurize --stage1 and --stage 2 and compiled the code using the makefile lines for a binary installation of Tensorflow/ gcc4). When I run the command python ./faster_rcnn/demo.py --model VGGnet_fast_rcnn_iter_150000.ckpt --gpu 1 I run into a KeyError, amongst other things. Anyone know what could be causing this? It seems to me like the wrong key b'TEST' is passed along instead of simply passing 'TEST' but that might just be my naive error analysis as well. Any help much appreciated!

Here's the output:

I tensorflow/core/common_runtime/gpu/gpu_device.cc:972] DMA: 0 1 2 3 
I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] 0:   Y Y Y Y 
I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] 1:   Y Y Y Y 
I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] 2:   Y Y Y Y 
I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] 3:   Y Y Y Y 
I tensorflow/core/common_runtime/gpu/gpu_device.cc:1041] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX TITAN Black, pci bus id: 0000:0e:00.0)
I tensorflow/core/common_runtime/gpu/gpu_device.cc:1041] Creating TensorFlow device (/gpu:1) -> (device: 1, name: GeForce GTX TITAN Black, pci bus id: 0000:0c:00.0)
I tensorflow/core/common_runtime/gpu/gpu_device.cc:1041] Creating TensorFlow device (/gpu:2) -> (device: 2, name: GeForce GTX TITAN Z, pci bus id: 0000:08:00.0)
I tensorflow/core/common_runtime/gpu/gpu_device.cc:1041] Creating TensorFlow device (/gpu:3) -> (device: 3, name: GeForce GTX TITAN Z, pci bus id: 0000:07:00.0)
Tensor("Placeholder:0", shape=(?, ?, ?, 3), dtype=float32)
Tensor("conv5_3/conv5_3:0", shape=(?, ?, ?, 512), dtype=float32)
Tensor("rpn_conv/3x3/rpn_conv/3x3:0", shape=(?, ?, ?, 512), dtype=float32)
Tensor("rpn_cls_score/rpn_cls_score:0", shape=(?, ?, ?, 18), dtype=float32)
Tensor("rpn_cls_prob:0", shape=(?, ?, ?, ?), dtype=float32)
Tensor("Reshape_2:0", shape=(?, ?, ?, 18), dtype=float32)
Tensor("rpn_bbox_pred/rpn_bbox_pred:0", shape=(?, ?, ?, 36), dtype=float32)
Tensor("Placeholder_1:0", shape=(?, 3), dtype=float32)
Tensor("conv5_3/conv5_3:0", shape=(?, ?, ?, 512), dtype=float32)
Tensor("rois:0", shape=(?, 5), dtype=float32)
[<tf.Tensor 'conv5_3/conv5_3:0' shape=(?, ?, ?, 512) dtype=float32>, <tf.Tensor 'rois:0' shape=(?, 5) dtype=float32>]
Tensor("fc7/fc7:0", shape=(?, 4096), dtype=float32)
Loading network VGGnet_test...   done.
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 83, in __call__
    ret = func(*args)
  File "./faster_rcnn/../lib/rpn_msr/proposal_layer_tf.py", line 73, in proposal_layer
    pre_nms_topN  = cfg[cfg_key].RPN_PRE_NMS_TOP_N
KeyError: b'TEST'
W tensorflow/core/framework/op_kernel.cc:968] Internal: Failed to run py callback pyfunc_0: see error log.
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 972, in _do_call
    return fn(*args)
  File "/usr/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 954, in _run_fn
    status, run_metadata)
  File "/usr/lib/python3.5/contextlib.py", line 66, in __exit__
    next(self.gen)
  File "/usr/lib/python3.5/site-packages/tensorflow/python/framework/errors.py", line 463, in raise_exception_on_not_ok_status
    pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors.InternalError: Failed to run py callback pyfunc_0: see error log.
	 [[Node: PyFunc = PyFunc[Tin=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_STRING, DT_INT32, DT_INT32], Tout=[DT_FLOAT], token="pyfunc_0", _device="/job:localhost/replica:0/task:0/cpu:0"](Reshape_2/_83, rpn_bbox_pred/rpn_bbox_pred/_85, _recv_Placeholder_1_0, PyFunc/input_3, PyFunc/input_4, PyFunc/input_5)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./faster_rcnn/demo.py", line 134, in <module>
    _, _ = im_detect(sess, net, im)
  File "./faster_rcnn/../lib/fast_rcnn/test.py", line 179, in im_detect
    feed_dict=feed_dict)
  File "/usr/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 717, in run
    run_metadata_ptr)
  File "/usr/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 915, in _run
    feed_dict_string, options, run_metadata)
  File "/usr/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 965, in _do_run
    target_list, options, run_metadata)
  File "/usr/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 985, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors.InternalError: Failed to run py callback pyfunc_0: see error log.
	 [[Node: PyFunc = PyFunc[Tin=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_STRING, DT_INT32, DT_INT32], Tout=[DT_FLOAT], token="pyfunc_0", _device="/job:localhost/replica:0/task:0/cpu:0"](Reshape_2/_83, rpn_bbox_pred/rpn_bbox_pred/_85, _recv_Placeholder_1_0, PyFunc/input_3, PyFunc/input_4, PyFunc/input_5)]]

Caused by op 'PyFunc', defined at:
  File "./faster_rcnn/demo.py", line 124, in <module>
    net = get_network(args.demo_net)
  File "./faster_rcnn/../lib/networks/factory.py", line 25, in get_network
    return VGGnet_test()
  File "./faster_rcnn/../lib/networks/VGGnet_test.py", line 16, in __init__
    self.setup()
  File "./faster_rcnn/../lib/networks/VGGnet_test.py", line 61, in setup
    .proposal_layer(_feat_stride, anchor_scales, 'TEST', name='rois'))
  File "./faster_rcnn/../lib/networks/network.py", line 32, in layer_decorated
    layer_output = op(self, layer_input, *args, **kwargs)
  File "./faster_rcnn/../lib/networks/network.py", line 214, in proposal_layer
    [tf.float32]),
  File "/usr/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 174, in py_func
    input=inp, token=token, Tout=Tout, name=name)
  File "/usr/lib/python3.5/site-packages/tensorflow/python/ops/gen_script_ops.py", line 39, in _py_func
    name=name)
  File "/usr/lib/python3.5/site-packages/tensorflow/python/framework/op_def_library.py", line 749, in apply_op
    op_def=op_def)
  File "/usr/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 2380, in create_op
    original_op=self._default_original_op, op_def=op_def)
  File "/usr/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 1298, in __init__
    self._traceback = _extract_stack()

InternalError (see above for traceback): Failed to run py callback pyfunc_0: see error log.
	 [[Node: PyFunc = PyFunc[Tin=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_STRING, DT_INT32, DT_INT32], Tout=[DT_FLOAT], token="pyfunc_0", _device="/job:localhost/replica:0/task:0/cpu:0"](Reshape_2/_83, rpn_bbox_pred/rpn_bbox_pred/_85, _recv_Placeholder_1_0, PyFunc/input_3, PyFunc/input_4, PyFunc/input_5)]]

Make erros in lib (gcc 4.7)

When running make in lib directory, I am getting the error

python setup.py build_ext --inplace
running build_ext
skipping 'utils/bbox.c' Cython extension (up-to-date)
skipping 'utils/nms.c' Cython extension (up-to-date)
skipping 'nms/cpu_nms.c' Cython extension (up-to-date)
skipping 'nms/gpu_nms.cpp' Cython extension (up-to-date)
skipping 'pycocotools/_mask.c' Cython extension (up-to-date)
rm -rf build
sh make.sh
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcurand.so.8.0 locally
/usr/local/lib/python2.7/dist-packages/tensorflow/include
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1254): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1254): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1259): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1259): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h(133): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h(138): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h(212): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h(217): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:101:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from roi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:232:38: error: ‘tensorflow::gtl::array_slice_internal::ArraySliceImplBase::ArraySliceImplBase’ names constructor
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:252:32: error: ‘tensorflow::gtl::array_slice_internal::ArraySliceImplBase::ArraySliceImplBase’ names constructor
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:102:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from roi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/inlined_vector.h: In member function ‘void tensorflow::gtl::InlinedVector<T, N>::Destroy(T*, int)’:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/inlined_vector.h:396:10: error: ‘is_trivially_destructible’ is not a member of ‘std’
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/inlined_vector.h:396:42: error: expected primary-expression before ‘>’ token
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/inlined_vector.h:396:43: error: ‘::value’ has not been declared
In file included from roi_pooling_op.cc:23:0:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op_kernel.h: At global scope:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op_kernel.h:170:19: error: ‘tensorflow::OpKernel::OpKernel’ names constructor
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from roi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h: In instantiation of ‘tensorflow::gtl::ArraySlice::ArraySlice(std::initializer_list<_Tp>) [with T = long long int]’:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/tensor_shape.h:53:53: required from here
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:162:34: error: no matching function for call to ‘tensorflow::gtl::array_slice_internal::ArraySliceImpl::ArraySliceImpl(std::initializer_list::const_iterator, std::initializer_list::size_type)’
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:162:34: note: candidates are:
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:101:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from roi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:244:12: note: template tensorflow::gtl::array_slice_internal::ArraySliceImpl::ArraySliceImpl(const C&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:244:12: note: template argument deduction/substitution failed:
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from roi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:162:34: note: candidate expects 1 argument, 2 provided
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:101:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from roi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: constexpr tensorflow::gtl::array_slice_internal::ArraySliceImpl::ArraySliceImpl(const tensorflow::gtl::array_slice_internal::ArraySliceImpl&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: candidate expects 1 argument, 2 provided
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: constexpr tensorflow::gtl::array_slice_internal::ArraySliceImpl::ArraySliceImpl(tensorflow::gtl::array_slice_internal::ArraySliceImpl&&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: candidate expects 1 argument, 2 provided
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from roi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h: In instantiation of ‘tensorflow::gtl::ArraySlice::ArraySlice(const tensorflow::gtl::InlinedVector<T, N>&) [with int N = 4; T = tensorflow::DataType]’:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/types.h:88:36: required from here
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:140:33: error: no matching function for call to ‘tensorflow::gtl::array_slice_internal::ArraySliceImpltensorflow::DataType::ArraySliceImpl(tensorflow::gtl::InlinedVector<tensorflow::DataType, 4>::const_pointer, std::size_t)’
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:140:33: note: candidates are:
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:101:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from roi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:244:12: note: template tensorflow::gtl::array_slice_internal::ArraySliceImpl::ArraySliceImpl(const C&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:244:12: note: template argument deduction/substitution failed:
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from roi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:140:33: note: candidate expects 1 argument, 2 provided
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:101:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from roi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: constexpr tensorflow::gtl::array_slice_internal::ArraySliceImpltensorflow::DataType::ArraySliceImpl(const tensorflow::gtl::array_slice_internal::ArraySliceImpltensorflow::DataType&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: candidate expects 1 argument, 2 provided
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: constexpr tensorflow::gtl::array_slice_internal::ArraySliceImpltensorflow::DataType::ArraySliceImpl(tensorflow::gtl::array_slice_internal::ArraySliceImpltensorflow::DataType&&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: candidate expects 1 argument, 2 provided
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from roi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h: In instantiation of ‘tensorflow::gtl::ArraySlice::ArraySlice(const tensorflow::gtl::InlinedVector<T, N>&) [with int N = 4; T = long long int]’:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/partial_tensor_shape.h:107:53: required from here
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:140:33: error: no matching function for call to ‘tensorflow::gtl::array_slice_internal::ArraySliceImpl::ArraySliceImpl(tensorflow::gtl::InlinedVector<long long int, 4>::const_pointer, std::size_t)’
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:140:33: note: candidates are:
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:101:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from roi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:244:12: note: template tensorflow::gtl::array_slice_internal::ArraySliceImpl::ArraySliceImpl(const C&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:244:12: note: template argument deduction/substitution failed:
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from roi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:140:33: note: candidate expects 1 argument, 2 provided
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:101:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from roi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: constexpr tensorflow::gtl::array_slice_internal::ArraySliceImpl::ArraySliceImpl(const tensorflow::gtl::array_slice_internal::ArraySliceImpl&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: candidate expects 1 argument, 2 provided
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: constexpr tensorflow::gtl::array_slice_internal::ArraySliceImpl::ArraySliceImpl(tensorflow::gtl::array_slice_internal::ArraySliceImpl&&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: candidate expects 1 argument, 2 provided
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from roi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h: In instantiation of ‘tensorflow::gtl::ArraySlice::ArraySlice() [with T = std::pair<std::basic_string, tensorflow::FunctionDefHelper::AttrValueWrapper>]’:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/function.h:96:32: required from here
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:127:34: error: no matching function for call to ‘tensorflow::gtl::array_slice_internal::ArraySliceImpl<std::pair<std::basic_string, tensorflow::FunctionDefHelper::AttrValueWrapper> >::ArraySliceImpl(std::nullptr_t, int)’
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:127:34: note: candidates are:
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:101:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from roi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:244:12: note: template tensorflow::gtl::array_slice_internal::ArraySliceImpl::ArraySliceImpl(const C&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:244:12: note: template argument deduction/substitution failed:
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from roi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:127:34: note: candidate expects 1 argument, 2 provided
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:101:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from roi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: constexpr tensorflow::gtl::array_slice_internal::ArraySliceImpl<std::pair<std::basic_string, tensorflow::FunctionDefHelper::AttrValueWrapper> >::ArraySliceImpl(const tensorflow::gtl::array_slice_internal::ArraySliceImpl<std::pair<std::basic_string, tensorflow::FunctionDefHelper::AttrValueWrapper> >&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: candidate expects 1 argument, 2 provided
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: constexpr tensorflow::gtl::array_slice_internal::ArraySliceImpl<std::pair<std::basic_string, tensorflow::FunctionDefHelper::AttrValueWrapper> >::ArraySliceImpl(tensorflow::gtl::array_slice_internal::ArraySliceImpl<std::pair<std::basic_string, tensorflow::FunctionDefHelper::AttrValueWrapper> >&&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: candidate expects 1 argument, 2 provided
/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1254): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1254): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1259): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1259): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h(133): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h(138): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h(212): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

/usr/local/lib/python2.7/dist-packages/tensorflow/include/unsupported/Eigen/CXX11/src/Tensor/TensorRandom.h(217): warning: calling a constexpr host function from a host device function is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:101:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from psroi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:232:38: error: ‘tensorflow::gtl::array_slice_internal::ArraySliceImplBase::ArraySliceImplBase’ names constructor
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:252:32: error: ‘tensorflow::gtl::array_slice_internal::ArraySliceImplBase::ArraySliceImplBase’ names constructor
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:102:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from psroi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/inlined_vector.h: In member function ‘void tensorflow::gtl::InlinedVector<T, N>::Destroy(T*, int)’:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/inlined_vector.h:396:10: error: ‘is_trivially_destructible’ is not a member of ‘std’
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/inlined_vector.h:396:42: error: expected primary-expression before ‘>’ token
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/inlined_vector.h:396:43: error: ‘::value’ has not been declared
In file included from psroi_pooling_op.cc:23:0:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op_kernel.h: At global scope:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op_kernel.h:170:19: error: ‘tensorflow::OpKernel::OpKernel’ names constructor
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from psroi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h: In instantiation of ‘tensorflow::gtl::ArraySlice::ArraySlice(std::initializer_list<_Tp>) [with T = long long int]’:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/tensor_shape.h:53:53: required from here
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:162:34: error: no matching function for call to ‘tensorflow::gtl::array_slice_internal::ArraySliceImpl::ArraySliceImpl(std::initializer_list::const_iterator, std::initializer_list::size_type)’
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:162:34: note: candidates are:
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:101:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from psroi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:244:12: note: template tensorflow::gtl::array_slice_internal::ArraySliceImpl::ArraySliceImpl(const C&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:244:12: note: template argument deduction/substitution failed:
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from psroi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:162:34: note: candidate expects 1 argument, 2 provided
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:101:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from psroi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: constexpr tensorflow::gtl::array_slice_internal::ArraySliceImpl::ArraySliceImpl(const tensorflow::gtl::array_slice_internal::ArraySliceImpl&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: candidate expects 1 argument, 2 provided
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: constexpr tensorflow::gtl::array_slice_internal::ArraySliceImpl::ArraySliceImpl(tensorflow::gtl::array_slice_internal::ArraySliceImpl&&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: candidate expects 1 argument, 2 provided
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from psroi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h: In instantiation of ‘tensorflow::gtl::ArraySlice::ArraySlice(const tensorflow::gtl::InlinedVector<T, N>&) [with int N = 4; T = tensorflow::DataType]’:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/types.h:88:36: required from here
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:140:33: error: no matching function for call to ‘tensorflow::gtl::array_slice_internal::ArraySliceImpltensorflow::DataType::ArraySliceImpl(tensorflow::gtl::InlinedVector<tensorflow::DataType, 4>::const_pointer, std::size_t)’
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:140:33: note: candidates are:
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:101:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from psroi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:244:12: note: template tensorflow::gtl::array_slice_internal::ArraySliceImpl::ArraySliceImpl(const C&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:244:12: note: template argument deduction/substitution failed:
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from psroi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:140:33: note: candidate expects 1 argument, 2 provided
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:101:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from psroi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: constexpr tensorflow::gtl::array_slice_internal::ArraySliceImpltensorflow::DataType::ArraySliceImpl(const tensorflow::gtl::array_slice_internal::ArraySliceImpltensorflow::DataType&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: candidate expects 1 argument, 2 provided
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: constexpr tensorflow::gtl::array_slice_internal::ArraySliceImpltensorflow::DataType::ArraySliceImpl(tensorflow::gtl::array_slice_internal::ArraySliceImpltensorflow::DataType&&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: candidate expects 1 argument, 2 provided
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from psroi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h: In instantiation of ‘tensorflow::gtl::ArraySlice::ArraySlice(const tensorflow::gtl::InlinedVector<T, N>&) [with int N = 4; T = long long int]’:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/partial_tensor_shape.h:107:53: required from here
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:140:33: error: no matching function for call to ‘tensorflow::gtl::array_slice_internal::ArraySliceImpl::ArraySliceImpl(tensorflow::gtl::InlinedVector<long long int, 4>::const_pointer, std::size_t)’
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:140:33: note: candidates are:
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:101:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from psroi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:244:12: note: template tensorflow::gtl::array_slice_internal::ArraySliceImpl::ArraySliceImpl(const C&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:244:12: note: template argument deduction/substitution failed:
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from psroi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:140:33: note: candidate expects 1 argument, 2 provided
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:101:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from psroi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: constexpr tensorflow::gtl::array_slice_internal::ArraySliceImpl::ArraySliceImpl(const tensorflow::gtl::array_slice_internal::ArraySliceImpl&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: candidate expects 1 argument, 2 provided
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: constexpr tensorflow::gtl::array_slice_internal::ArraySliceImpl::ArraySliceImpl(tensorflow::gtl::array_slice_internal::ArraySliceImpl&&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: candidate expects 1 argument, 2 provided
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from psroi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h: In instantiation of ‘tensorflow::gtl::ArraySlice::ArraySlice() [with T = std::pair<std::basic_string, tensorflow::FunctionDefHelper::AttrValueWrapper>]’:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/function.h:96:32: required from here
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:127:34: error: no matching function for call to ‘tensorflow::gtl::array_slice_internal::ArraySliceImpl<std::pair<std::basic_string, tensorflow::FunctionDefHelper::AttrValueWrapper> >::ArraySliceImpl(std::nullptr_t, int)’
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:127:34: note: candidates are:
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:101:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from psroi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:244:12: note: template tensorflow::gtl::array_slice_internal::ArraySliceImpl::ArraySliceImpl(const C&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:244:12: note: template argument deduction/substitution failed:
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from psroi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:127:34: note: candidate expects 1 argument, 2 provided
In file included from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice.h:101:0,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/strings/str_util.h:23,
from /usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/framework/op.h:29,
from psroi_pooling_op.cc:22:
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: constexpr tensorflow::gtl::array_slice_internal::ArraySliceImpl<std::pair<std::basic_string, tensorflow::FunctionDefHelper::AttrValueWrapper> >::ArraySliceImpl(const tensorflow::gtl::array_slice_internal::ArraySliceImpl<std::pair<std::basic_string, tensorflow::FunctionDefHelper::AttrValueWrapper> >&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: candidate expects 1 argument, 2 provided
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: constexpr tensorflow::gtl::array_slice_internal::ArraySliceImpl<std::pair<std::basic_string, tensorflow::FunctionDefHelper::AttrValueWrapper> >::ArraySliceImpl(tensorflow::gtl::array_slice_internal::ArraySliceImpl<std::pair<std::basic_string, tensorflow::FunctionDefHelper::AttrValueWrapper> >&&)
/usr/local/lib/python2.7/dist-packages/tensorflow/include/tensorflow/core/lib/gtl/array_slice_internal.h:230:7: note: candidate expects 1 argument, 2 provided

I have saw a solution to update gcc, but I can not do that. Do there have any solution to this issues?

pva test error

pva training works fine, but reports following test error:
"InvalidArgumentError (see above for traceback): Assign requires shapes of both tensors to match. lhs shape= [1,1,768,384] rhs shape= [1,1,384,384]
[[Node: save/Assign_481 = Assign[T=DT_FLOAT, _class=["loc:@convf_2/weights"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/gpu:0"](convf_2/weights, save/RestoreV2_481/_35)]]"

Probably mismatch somewhere between PVAnet_train/test.

ps: faster_rcnn/test_net.py needs to change line 70 (added args.model + '.index')

Segmentation fault when run demo.py or training

I tried to run demo.py on my machine ,but got a segmentation fault:

(tensorflow) niefangxing@ST-Pro-SN:~/workspace/TFFRCNN$ python demo.py --model ./data/pretrain_model/VGG_imagenet.npy
<function roi_pool at 0x7f7e30f3acf8>
2017-04-07 15:08:03.808113: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-04-07 15:08:03.808133: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-04-07 15:08:03.808139: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-04-07 15:08:03.808143: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-04-07 15:08:03.808147: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
2017-04-07 15:08:03.945344: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:901] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2017-04-07 15:08:03.945811: I tensorflow/core/common_runtime/gpu/gpu_device.cc:887] Found device 0 with properties:
name: GeForce GTX 1060
major: 6 minor: 1 memoryClockRate (GHz) 1.6705
pciBusID 0000:01:00.0
Total memory: 5.92GiB
Free memory: 5.59GiB
2017-04-07 15:08:03.945824: I tensorflow/core/common_runtime/gpu/gpu_device.cc:908] DMA: 0
2017-04-07 15:08:03.945828: I tensorflow/core/common_runtime/gpu/gpu_device.cc:918] 0: Y
2017-04-07 15:08:03.945852: I tensorflow/core/common_runtime/gpu/gpu_device.cc:977] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1060, pci bus id: 0000:01:00.0)
network name VGGnet_test
Tensor("Placeholder:0", shape=(?, ?, ?, 3), dtype=float32)
Tensor("conv5_3/Relu:0", shape=(?, ?, ?, 512), dtype=float32)
Tensor("rpn_conv/3x3/Relu:0", shape=(?, ?, ?, 512), dtype=float32)
Tensor("rpn_cls_score/BiasAdd:0", shape=(?, ?, ?, 18), dtype=float32)
Tensor("rpn_cls_prob:0", shape=(?, ?, ?, ?), dtype=float32)
Tensor("Reshape_2:0", shape=(?, ?, ?, 18), dtype=float32)
Tensor("rpn_bbox_pred/BiasAdd:0", shape=(?, ?, ?, 36), dtype=float32)
Tensor("Placeholder_1:0", shape=(?, 3), dtype=float32)
Tensor("conv5_3/Relu:0", shape=(?, ?, ?, 512), dtype=float32)
Tensor("rois:0", shape=(?, 5), dtype=float32)
[<tf.Tensor 'conv5_3/Relu:0' shape=(?, ?, ?, 512) dtype=float32>, <tf.Tensor 'rois:0' shape=(?, 5) dtype=float32>]
Segmentation fault (core dumped)

My tensroflow version is 1.1.0rc1.

I add some print and found it may be crashed when call roi_polling_layer.roi_poll, but I can't figure out the exactly reason. Any one can help me ?

change from tf.image_summary to tf.summary.image

I am using tensorflow 0.12, after change log_image = tf.image_summary(log_image_name, tf.expand_dims(log_image_data, 0), max_images=1) to log_image = tf.summary.image(log_image_name, tf.expand_dims(log_image_data, 0), max_outputs=1)

Got the error:

File "./faster_rcnn/../lib/fast_rcnn/train.py", line 97, in build_image_summary
log_image = tf.summary.image(log_image_name, tf.expand_dims(log_image_data, 0), max_outputs=1)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/summary/summary.py", line 168, in image
name = _clean_tag(name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/summary/summary.py", line 88, in _clean_tag
new_name = INVALID_TAG_CHARACTERS.sub('', name)
TypeError: expected string or buffer

Thanks!

assert len(roidb) > 0

I am trying to train on my own dataset. I am following your "Training on KITTI detection dataset

" to convert kikki to pascal VOC and then run the training. What could go wrong here? It seems like the code cant load the roidb from

roidb = get_training_roidb(imdb)

This is what my data looks like:

microway:data$ pwd
/data/home/microway/experiments/TFFRCNN/data
microway:KITTI$ tree
.
├── testing
│   ├── image_2
│   │   ├── 0000000000.png
│   │   ├── 0000000001.png
│   │   ├── 0000000002.png
│   │   ├── 0000000003.png
│   │   ├── 0000000004.png
│   │   ├── 0000000005.png
│   │   ├── 0000000006.png
│   │   ├── 0000000007.png
│   │   ├── 0000000008.png
│   │   └── 0000000009.png
│   └── label_2
│   ├── 0000000000.txt
│   ├── 0000000001.txt
│   ├── 0000000002.txt
│   ├── 0000000003.txt
│   ├── 0000000004.txt
│   ├── 0000000005.txt
│   ├── 0000000006.txt
│   ├── 0000000007.txt
│   ├── 0000000008.txt
│   └── 0000000009.txt
└── training
├── image_2
│   ├── 0000000000.png
│   ├── 0000000001.png
│   ├── 0000000002.png
│   ├── 0000000003.png
│   ├── 0000000004.png
│   ├── 0000000005.png
│   ├── 0000000006.png
│   ├── 0000000007.png
│   ├── 0000000008.png
│   └── 0000000009.png
└── label_2
├── 0000000000.txt
├── 0000000001.txt
├── 0000000002.txt
├── 0000000003.txt
├── 0000000004.txt
├── 0000000005.txt
├── 0000000006.txt
├── 0000000007.txt
├── 0000000008.txt
└── 0000000009.txt

python /$TFFRCNN/experiments/scripts/kitti2pascalvoc.py --kitti $TFFRCNN/data/KITTI --out $TFFRCNN/data/KITTIVOC

microway:data$ tree KITTIVOC/
KITTIVOC/
├── Annotations
│   ├── 0000000000.xml
│   ├── 0000000001.xml
│   ├── 0000000002.xml
│   ├── 0000000003.xml
│   ├── 0000000004.xml
│   ├── 0000000005.xml
│   ├── 0000000006.xml
│   ├── 0000000007.xml
│   ├── 0000000008.xml
│   └── 0000000009.xml
├── ImageSets
│   ├── Layout
│   ├── Main
│   │   ├── car_train.txt
│   │   ├── car_trainval.txt
│   │   ├── car_val.txt
│   │   ├── cyclist_train.txt
│   │   ├── cyclist_trainval.txt
│   │   ├── cyclist_val.txt
│   │   ├── dontcare_train.txt
│   │   ├── dontcare_trainval.txt
│   │   ├── dontcare_val.txt
│   │   ├── pedestrian_train.txt
│   │   ├── pedestrian_trainval.txt
│   │   ├── pedestrian_val.txt
│   │   ├── train.txt
│   │   ├── trainval.txt
│   │   └── val.txt
│   └── Segmentation
├── JPEGImages
│   ├── 0000000000.jpg
│   ├── 0000000001.jpg
│   ├── 0000000002.jpg
│   ├── 0000000003.jpg
│   ├── 0000000004.jpg
│   ├── 0000000005.jpg
│   ├── 0000000006.jpg
│   ├── 0000000007.jpg
│   ├── 0000000008.jpg
│   └── 0000000009.jpg
├── SegmentationClass
└── SegmentationObject

python ./faster_rcnn/train_net.py
--gpu 0
--weights ./data/pretrain_model/VGG_imagenet.npy
--imdb kittivoc_train
--iters 160000
--cfg ./experiments/cfgs/faster_rcnn_kitti.yml
--network VGGnet_train

Traceback (most recent call last):
File "./faster_rcnn/train_net.py", line 110, in
restore=bool(int(args.restore)))
File "./faster_rcnn/../lib/fast_rcnn/train.py", line 398, in train_net
sw = SolverWrapper(sess, network, imdb, roidb, output_dir, logdir= log_dir, pretrained_model=pretrained_model)
File "./faster_rcnn/../lib/fast_rcnn/train.py", line 44, in init
self.bbox_means, self.bbox_stds = rdl_roidb.add_bbox_regression_targets(roidb)
File "./faster_rcnn/../lib/roi_data_layer/roidb.py", line 57, in add_bbox_regression_targets
assert len(roidb) > 0
AssertionError

Undefined symbols

Hi,

great work, thanks!

When I tried to run make in lib, I ran into following errors:

First couple lines of error message:

Undefined symbols for architecture x86_64:
  "tensorflow::DEVICE_CPU", referenced from:
      ___cxx_global_var_init.15 in roi_pooling_op-442fdc.o
      ___cxx_global_var_init.18 in roi_pooling_op-442fdc.o
  "tensorflow::DEVICE_GPU", referenced from:
      ___cxx_global_var_init.20 in roi_pooling_op-442fdc.o
      ___cxx_global_var_init.22 in roi_pooling_op-442fdc.o
 "tensorflow::GetNodeAttr(tensorflow::AttrSlice const&, tensorflow::StringPiece, float*)", referenced from:
      tensorflow::Status tensorflow::OpKernelConstruction::GetAttr<float>(tensorflow::StringPiece, float*) const in roi_pooling_op-be4c40.o
  "tensorflow::GetNodeAttr(tensorflow::AttrSlice const&, tensorflow::StringPiece, int*)", referenced from:
      tensorflow::Status tensorflow::OpKernelConstruction::GetAttr<int>(tensorflow::StringPiece, int*) const in roi_pooling_op-be4c40.o
  "tensorflow::TensorShape::SlowCopyFrom(tensorflow::TensorShape const&)", referenced from:
      tensorflow::TensorShape::TensorShape(tensorflow::TensorShape const&) in roi_pooling_op-be4c40.o
  "tensorflow::TensorShape::DestructorOutOfLine()", referenced from:
      tensorflow::TensorShape::~TensorShape() in roi_pooling_op-be4c40.o
  "tensorflow::TensorShape::TensorShape()", referenced from:
      RoiPoolOp<Eigen::ThreadPoolDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-be4c40.o
      RoiPoolOp<Eigen::ThreadPoolDevice, double>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-be4c40.o
      RoiPoolOp<Eigen::GpuDevice, float>::Compute(tensorflow::OpKernelContext*) in roi_pooling_op-be4c40.o

Is this related to version of tensorflow I am using or something else? Thanks.

Are demo results too slow ?

Hi,

Thanks a lot for your repo.

After testing, my demo results were

Demo for /home/alex/Desktop/RedCoast/TFFRCNN/data/demo/000022.png
Detection took 2.298s for 300 object proposals
GLib-GIO-Message: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.

Demo for /home/alex/Desktop/RedCoast/TFFRCNN/data/demo/000188.png
Detection took 2.373s for 300 object proposals

Demo for /home/alex/Desktop/RedCoast/TFFRCNN/data/demo/001150.jpg
Detection took 3.576s for 300 object proposals

Demo for /home/alex/Desktop/RedCoast/TFFRCNN/data/demo/001763.jpg
Detection took 3.410s for 272 object proposals

Demo for /home/alex/Desktop/RedCoast/TFFRCNN/data/demo/004545.jpg
Detection took 3.375s for 300 object proposals

Demo for /home/alex/Desktop/RedCoast/TFFRCNN/data/demo/000456.jpg
Detection took 3.504s for 300 object proposals

Demo for /home/alex/Desktop/RedCoast/TFFRCNN/data/demo/000542.jpg
Detection took 3.379s for 255 object proposals

It seems each image takes up to 3.5 seconds to compute. are there normal results? The paper indicates that the speed should be around 200/img.

Best,

Very low test mIoU

I train the Resnet50 70000iters on voc 2007, but the test mIoU is just 0.29.
And I change the code according to the #2, but get lower mIoU which is just 0.128

ImportError: No module named lib.networks.factory

Hi, Charles. When I run your project python ./faster_rcnn/demo.py --model vgg_model_path, I met the error ImportError: No module named lib.networks.factory. However, when I open Ipython in the TFFRCNN directory and from lib.networks.factory import get_network, I can import it correctly.
How can I fix this problem, thanks very much~

error while training with VGGnet

Env details:
GPU : TITAN X
cuda 8.0+cudnn 5.1
tensorflow version : 0.11.0

I followed the Readme and ran the following command

python ./faster_rcnn/train_net.py --gpu 0 --weights ./data/pretrain_model/VGG_imagenet.npy --imdb voc_2007_trainval --iters 70000 --cfg  ./experiments/cfgs/faster_rcnn_end2end.yml --network VGGnet_train --set EXP_DIR exp_dir

I get the following error:

I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcurand.so locally
kittivoc_train
kittivoc_val
kittivoc_trainval
kittivoc_test
kittivoc_train
kittivoc_val
kittivoc_trainval
kittivoc_test
kittivoc_train
kittivoc_val
kittivoc_trainval
kittivoc_test
nthu_71
nthu_370
Called with args:
Namespace(cfg_file='./experiments/cfgs/faster_rcnn_end2end.yml', gpu_id=0, imdb_name='voc_2007_trainval', max_iters=70000, network_name='VGGnet_train', pretrained_model='./data/pretrain_model/VGG_imagenet.npy', randomize=False, restore=1, set_cfgs=['EXP_DIR', 'exp_dir'], solver=None)
Using config:
{'ANCHOR_SCALES': [8, 16, 32],
 'DATA_DIR': '/home/hema/TFFRCNN/data',
 'DEDUP_BOXES': 0.0625,
 'EPS': 1e-14,
 'EXP_DIR': 'exp_dir',
 'GPU_ID': 0,
 'IS_EXTRAPOLATING': True,
 'IS_MULTISCALE': False,
 'IS_RPN': True,
 'LOG_DIR': 'faster_rcnn_voc',
 'MATLAB': 'matlab',
 'MODELS_DIR': '/home/hema/TFFRCNN/models/pascal_voc',
 'NCLASSES': 21,
 'NET_NAME': 'VGGnet',
 'PIXEL_MEANS': array([[[ 102.9801,  115.9465,  122.7717]]]),
 'REGION_PROPOSAL': 'RPN',
 'RNG_SEED': 3,
 'ROOT_DIR': '/home/hema/TFFRCNN',
 'SUBCLS_NAME': 'voxel_exemplars',
 'TEST': {'BBOX_REG': True,
          'HAS_RPN': True,
          'MAX_SIZE': 1000,
          'NMS': 0.3,
          'PROPOSAL_METHOD': 'selective_search',
          'RPN_MIN_SIZE': 16,
          'RPN_NMS_THRESH': 0.7,
          'RPN_POST_NMS_TOP_N': 300,
          'RPN_PRE_NMS_TOP_N': 6000,
          'SCALES': [600],
          'SVM': False},
 'TRAIN': {'ASPECTS': [1],
           'ASPECT_GROUPING': True,
           'BATCH_SIZE': 300,
           'BBOX_INSIDE_WEIGHTS': [1, 1, 1, 1],
           'BBOX_NORMALIZE_MEANS': [0.0, 0.0, 0.0, 0.0],
           'BBOX_NORMALIZE_STDS': [0.1, 0.1, 0.2, 0.2],
           'BBOX_NORMALIZE_TARGETS': True,
           'BBOX_NORMALIZE_TARGETS_PRECOMPUTED': True,
           'BBOX_REG': True,
           'BBOX_THRESH': 0.5,
           'BG_THRESH_HI': 0.5,
           'BG_THRESH_LO': 0.0,
           'DISPLAY': 10,
           'DONTCARE_AREA_INTERSECTION_HI': 0.5,
           'FG_FRACTION': 0.3,
           'FG_THRESH': 0.5,
           'GAMMA': 0.1,
           'HAS_RPN': True,
           'IMS_PER_BATCH': 1,
           'KERNEL_SIZE': 5,
           'LEARNING_RATE': 0.001,
           'LOG_IMAGE_ITERS': 100,
           'MAX_SIZE': 1000,
           'MOMENTUM': 0.9,
           'OHEM': False,
           'PRECLUDE_HARD_SAMPLES': True,
           'PROPOSAL_METHOD': 'gt',
           'RPN_BATCHSIZE': 256,
           'RPN_BBOX_INSIDE_WEIGHTS': [1, 1, 1, 1],
           'RPN_CLOBBER_POSITIVES': False,
           'RPN_FG_FRACTION': 0.5,
           'RPN_MIN_SIZE': 16,
           'RPN_NEGATIVE_OVERLAP': 0.3,
           'RPN_NMS_THRESH': 0.7,
           'RPN_POSITIVE_OVERLAP': 0.7,
           'RPN_POSITIVE_WEIGHT': -1.0,
           'RPN_POST_NMS_TOP_N': 2000,
           'RPN_PRE_NMS_TOP_N': 12000,
           'SCALES': [600],
           'SCALES_BASE': [0.25, 0.5, 1.0, 2.0, 3.0],
           'SNAPSHOT_INFIX': '',
           'SNAPSHOT_ITERS': 5000,
           'SNAPSHOT_PREFIX': 'VGGnet_fast_rcnn',
           'SOLVER': 'Momentum',
           'STEPSIZE': 60000,
           'USE_FLIPPED': True,
           'USE_PREFETCH': False,
           'WEIGHT_DECAY': 0.0005},
 'USE_GPU_NMS': True}
<bound method pascal_voc.default_roidb of <lib.datasets.pascal_voc.pascal_voc object at 0x7f8916ad2590>>
Loaded dataset `voc_2007_trainval` for training
Appending horizontally-flipped training examples...
voc_2007_trainval gt roidb loaded from /home/hema/TFFRCNN/data/cache/voc_2007_trainval_gt_roidb.pkl
done
Preparing training data...
done
Output will be saved to `/home/hema/TFFRCNN/output/exp_dir/voc_2007_trainval`
Logs will be saved to `/home/hema/TFFRCNN/logs/faster_rcnn_voc/voc_2007_trainval/2017-03-07-10-29-54`
/gpu:0
Tensor("data:0", shape=(?, ?, ?, 3), dtype=float32)
Tensor("conv5_3/conv5_3:0", shape=(?, ?, ?, 512), dtype=float32)
Tensor("rpn_conv/3x3/rpn_conv/3x3:0", shape=(?, ?, ?, 512), dtype=float32)
Tensor("rpn_conv/3x3/rpn_conv/3x3:0", shape=(?, ?, ?, 512), dtype=float32)
Tensor("rpn_cls_score/rpn_cls_score:0", shape=(?, ?, ?, 18), dtype=float32)
Tensor("gt_boxes:0", shape=(?, 5), dtype=float32)
Tensor("gt_ishard:0", shape=(?,), dtype=int32)
Tensor("dontcare_areas:0", shape=(?, 4), dtype=float32)
Tensor("im_info:0", shape=(?, 3), dtype=float32)
Tensor("rpn_cls_score/rpn_cls_score:0", shape=(?, ?, ?, 18), dtype=float32)
Tensor("rpn_cls_prob:0", shape=(?, ?, ?, ?), dtype=float32)
Tensor("Reshape_2:0", shape=(?, ?, ?, 18), dtype=float32)
Tensor("rpn_bbox_pred/rpn_bbox_pred:0", shape=(?, ?, ?, 36), dtype=float32)
Tensor("im_info:0", shape=(?, 3), dtype=float32)
Tensor("rpn_rois:0", shape=(?, 5), dtype=float32)
Tensor("gt_boxes:0", shape=(?, 5), dtype=float32)
Tensor("gt_ishard:0", shape=(?,), dtype=int32)
Tensor("dontcare_areas:0", shape=(?, 4), dtype=float32)
Tensor("conv5_3/conv5_3:0", shape=(?, ?, ?, 512), dtype=float32)
Tensor("roi-data/rois:0", shape=(?, 5), dtype=float32)
[<tf.Tensor 'conv5_3/conv5_3:0' shape=(?, ?, ?, 512) dtype=float32>, <tf.Tensor 'roi-data/rois:0' shape=(?, 5) dtype=float32>]
Tensor("drop7/mul:0", shape=(?, 4096), dtype=float32)
Use network `VGGnet_train` in training
I tensorflow/core/common_runtime/gpu/gpu_device.cc:951] Found device 0 with properties: 
name: TITAN X (Pascal)
major: 6 minor: 1 memoryClockRate (GHz) 1.531
pciBusID 0000:01:00.0
Total memory: 11.90GiB
Free memory: 11.22GiB
I tensorflow/core/common_runtime/gpu/gpu_device.cc:972] DMA: 0 
I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] 0:   Y 
I tensorflow/core/common_runtime/gpu/gpu_device.cc:1041] Creating TensorFlow device (/gpu:0) -> (device: 0, name: TITAN X (Pascal), pci bus id: 0000:01:00.0)
hema added filename /home/hema/TFFRCNN/output/exp_dir/voc_2007_trainval
Computing bounding-box regression targets...
bbox target means:
[[ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]
 [ 0.  0.  0.  0.]]
[ 0.  0.  0.  0.]
bbox target stdevs:
[[ 0.1  0.1  0.2  0.2]
 [ 0.1  0.1  0.2  0.2]
 [ 0.1  0.1  0.2  0.2]
 [ 0.1  0.1  0.2  0.2]
 [ 0.1  0.1  0.2  0.2]
 [ 0.1  0.1  0.2  0.2]
 [ 0.1  0.1  0.2  0.2]
 [ 0.1  0.1  0.2  0.2]
 [ 0.1  0.1  0.2  0.2]
 [ 0.1  0.1  0.2  0.2]
 [ 0.1  0.1  0.2  0.2]
 [ 0.1  0.1  0.2  0.2]
 [ 0.1  0.1  0.2  0.2]
 [ 0.1  0.1  0.2  0.2]
 [ 0.1  0.1  0.2  0.2]
 [ 0.1  0.1  0.2  0.2]
 [ 0.1  0.1  0.2  0.2]
 [ 0.1  0.1  0.2  0.2]
 [ 0.1  0.1  0.2  0.2]
 [ 0.1  0.1  0.2  0.2]
 [ 0.1  0.1  0.2  0.2]]
[ 0.1  0.1  0.2  0.2]
Normalizing targets
done
Solving...
/home/hema/anaconda2/envs/rcnn/lib/python2.7/site-packages/tensorflow/python/ops/gradients.py:90: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
  "Converting sparse IndexedSlices to a dense Tensor of unknown shape. "
Traceback (most recent call last):
  File "./faster_rcnn/train_net.py", line 109, in <module>
    restore=bool(int(args.restore)))
  File "./faster_rcnn/../lib/fast_rcnn/train.py", line 398, in train_net
    sw.train_model(sess, max_iters, restore=restore)
  File "./faster_rcnn/../lib/fast_rcnn/train.py", line 169, in train_model
    raise 'Check your pretrained {:s}'.format(ckpt.model_checkpoint_path)
AttributeError: 'NoneType' object has no attribute 'model_checkpoint_path'

IMO, there is no checkpoint before the model runs the first iteration. How do I get around this error?

predict by trained model

Hi Charles,
How can I predict once I have retrained frcnn model? I utilize VGG16(VGG_imagenet.npy) with VOC07 data set to train. After that , I get the ckpt as well as meta files as a way to restore model. So , what is the next step I should do ? can I just follow the demo instruction to predict (simply restore meta graph and ckpt, to get scores and boxes via im_detect function)?

Thanks

vgg network rcnn layer issue

hello, I've trained the VGG network on the mot dataset, but the result I got was terrible, I found the rpn layer and the target proposal layer works well, after all, I've found a problem on the definition of vgg network, in the file TFFRCNN/lib/networks/VGGnet_train.py in line 83:

    #========= RCNN ============        
    (self.feed('conv5_3', 'rois')
         .roi_pool(7, 7, 1.0/16, name='pool_5')
         .fc(4096, name='fc6')

why the rcnn is feeded with rois? which I've found no definition, I think it's a obvious problem, and the rois must be corrected as roi-data

./lib/nms/gpu_nms.so: cannot open shared object file

I am trying to run the demo. I have succesfully run make in the lib folder. I have tried running the demo in the following ways:

python -m faster_rcnn.demo --model <model>

python faster_rcnn/demo.py --model <model>

I have also tried copying demo.py to the root folder and running python demo.py --model <model>

All three of these methods of running the demo get the same error:

Traceback (most recent call last):
File "faster_rcnn/demo.py", line 14, in
from lib.networks.factory import get_network
File "./lib/init.py", line 1, in
import fast_rcnn
File "./lib/fast_rcnn/init.py", line 9, in
from . import train
File "./lib/fast_rcnn/train.py", line 15, in
from .nms_wrapper import nms_wrapper
File "./lib/fast_rcnn/nms_wrapper.py", line 10, in
from ..nms.gpu_nms import gpu_nms
ImportError: ./lib/nms/gpu_nms.so: cannot open shared object file: No such file or directory

Any ideas how to fix this?

the mAP compared to py-faster-rcnn

sorry to bother you again.
I find it your checkpoint given is about 65% mAP on pascal 2007 test set.
does it need more iters to train?
I also train for about 70k iters but can only reach 50% mAP.

training speed problem

Hi , I find a strange problem that my training speed seems to go down,
it says 0 to 10k iters cost 50minites 10k to 20k costs 2 hours and 20k to 30k cost even more time.
But the log says the speed per iter is always the same like 0.2s/iter.
so I dont know why this happens.

Error when run PVAnet_test

python dv.py --model ~/PVAnet_iter_70000.ckpt --net PVAnet_test

NotFoundError (see above for traceback): Key conv5_4/last_bn_scale/beta not found in checkpoint;

W tensorflow/core/framework/op_kernel.cc:993] Not found: Key conv5_4/last_bn_scale/beta not found in checkpoint
W tensorflow/core/framework/op_kernel.cc:993] Not found: Key conv5_4/last_bn_scale/alpha not found in checkpoint
W tensorflow/core/framework/op_kernel.cc:993] Not found: Key conv5_4/last_bn_scale/beta not found in checkpoint
[[Node: save/RestoreV2_473 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_473/tensor_names, save/RestoreV2_473/shape_and_slices)]]
W tensorflow/core/framework/op_kernel.cc:993] Not found: Key conv5_4/last_bn_scale/beta not found in checkpoint
[[Node: save/RestoreV2_473 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_473/tensor_names, save/RestoreV2_473/shape_and_slices)]]
W tensorflow/core/framework/op_kernel.cc:993] Not found: Key conv5_4/last_bn_scale/beta not found in checkpoint
[[Node: save/RestoreV2_473 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_473/tensor_names, save/RestoreV2_473/shape_and_slices)]]
W tensorflow/core/framework/op_kernel.cc:993] Not found: Key conv5_4/last_bn_scale/beta not found in checkpoint
[[Node: save/RestoreV2_473 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_473/tensor_names, save/RestoreV2_473/shape_and_slices)]]
W tensorflow/core/framework/op_kernel.cc:993] Not found: Key conv5_4/last_bn_scale/beta not found in checkpoint
[[Node: save/RestoreV2_473 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_473/tensor_names, save/RestoreV2_473/shape_and_slices)]]
W tensorflow/core/framework/op_kernel.cc:993] Not found: Key conv5_4/last_bn_scale/beta not found in checkpoint
[[Node: save/RestoreV2_473 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_473/tensor_names, save/RestoreV2_473/shape_and_slices)]]

rpn_loss_box = nan error when training on own dataset

Hi,

When I train on my own data, I got issue as follows. Could you help me to figure out what's going on here?

Thanks.

image: 69814.jpg iter: 80 / 70000, total loss: 0.3977, rpn_loss_cls: 0.1209, rpn_loss_box: 0.1309, loss_cls: 0.0813, loss_box: 0.0646, lr: 0.001000
speed: 0.344s / iter
image: 63214.jpg iter: 90 / 70000, total loss: 0.8382, rpn_loss_cls: 0.1620, rpn_loss_box: 0.0919, loss_cls: 0.2161, loss_box: 0.3681, lr: 0.001000
speed: 0.322s / iter
./faster_rcnn/../lib/fast_rcnn/bbox_transform.py:36: RuntimeWarning: invalid value encountered in log
  targets_dw = np.log(gt_widths / ex_widths)
./faster_rcnn/../lib/rpn_msr/proposal_layer_tf.py:184: RuntimeWarning: invalid value encountered in greater_equal
  keep = np.where((ws >= min_size) & (hs >= min_size))[0]
image: 66306.jpg iter: 100 / 70000, total loss: nan, rpn_loss_cls: 0.6870, rpn_loss_box: nan, loss_cls: 0.4501, loss_box: 0.2214, lr: 0.001000
speed: 0.313s / iter
image: 62335.jpg
Traceback (most recent call last):
  File "/home/zhans/anaconda/lib/python2.7/site-packages/tensorflow/python/ops/script_ops.py", line 85, in __call__
    ret = func(*args)
  File "./faster_rcnn/../lib/rpn_msr/proposal_target_layer_tf.py", line 78, in proposal_target_layer
    rois_per_image, _num_classes)
  File "./faster_rcnn/../lib/rpn_msr/proposal_target_layer_tf.py", line 182, in _sample_rois
    rois[:, 1:5], gt_boxes[gt_assignment[keep_inds], :4], labels)
  File "./faster_rcnn/../lib/rpn_msr/proposal_target_layer_tf.py", line 224, in _compute_targets
    targets = bbox_transform(ex_rois, gt_rois)
  File "./faster_rcnn/../lib/fast_rcnn/bbox_transform.py", line 25, in bbox_transform
    format(ex_rois[np.argmin(ex_widths), :], ex_rois[np.argmin(ex_heights), :])
AssertionError: Invalid boxes found: [ 102398.4375     151.5625     285.9375     478.125 ] [ 165.02432251  123.3543396   318.14932251  215.5418396 ]
W tensorflow/core/framework/op_kernel.cc:975] Internal: Failed to run py callback pyfunc_2: see error log.
Traceback (most recent call last):
  File "./faster_rcnn/train_net.py", line 109, in <module>
    restore=bool(int(args.restore)))
  File "./faster_rcnn/../lib/fast_rcnn/train.py", line 396, in train_net
    sw.train_model(sess, max_iters, restore=restore)
  File "./faster_rcnn/../lib/fast_rcnn/train.py", line 251, in train_model
    cls_prob, bbox_pred, rois =  sess.run(fetches=fetch_list, feed_dict=feed_dict)
  File "/home/zhans/anaconda/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 766, in run
    run_metadata_ptr)
  File "/home/zhans/anaconda/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 964, in _run
    feed_dict_string, options, run_metadata)
  File "/home/zhans/anaconda/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1014, in _do_run
    target_list, options, run_metadata)
  File "/home/zhans/anaconda/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1034, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InternalError: Failed to run py callback pyfunc_2: see error log.
	 [[Node: roi-data/PyFunc = PyFunc[Tin=[DT_FLOAT, DT_FLOAT, DT_INT32, DT_FLOAT, DT_INT32], Tout=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], token="pyfunc_2", _device="/job:localhost/replica:0/task:0/cpu:0"](rpn_rois/_135, _recv_gt_boxes_0, _recv_gt_ishard_0, _recv_dontcare_areas_0, roi-data/PyFunc/input_4)]]

Caused by op u'roi-data/PyFunc', defined at:
  File "./faster_rcnn/train_net.py", line 101, in <module>
    network = get_network(args.network_name)
  File "./faster_rcnn/../lib/networks/factory.py", line 27, in get_network
    return VGGnet_train()
  File "./faster_rcnn/../lib/networks/VGGnet_train.py", line 17, in __init__
    self.setup()
  File "./faster_rcnn/../lib/networks/VGGnet_train.py", line 80, in setup
    .proposal_target_layer(n_classes,name = 'roi-data'))
  File "./faster_rcnn/../lib/networks/network.py", line 27, in layer_decorated
    layer_output = op(self, layer_input, *args, **kwargs)
  File "./faster_rcnn/../lib/networks/network.py", line 242, in proposal_target_layer
    [tf.float32,tf.float32,tf.float32,tf.float32,tf.float32])
  File "/home/zhans/anaconda/lib/python2.7/site-packages/tensorflow/python/ops/script_ops.py", line 192, in py_func
    input=inp, token=token, Tout=Tout, name=name)
  File "/home/zhans/anaconda/lib/python2.7/site-packages/tensorflow/python/ops/gen_script_ops.py", line 40, in _py_func
    name=name)
  File "/home/zhans/anaconda/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 759, in apply_op
    op_def=op_def)
  File "/home/zhans/anaconda/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2240, in create_op
    original_op=self._default_original_op, op_def=op_def)
  File "/home/zhans/anaconda/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1128, in __init__
    self._traceback = _extract_stack()

InternalError (see above for traceback): Failed to run py callback pyfunc_2: see error log.
	 [[Node: roi-data/PyFunc = PyFunc[Tin=[DT_FLOAT, DT_FLOAT, DT_INT32, DT_FLOAT, DT_INT32], Tout=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], token="pyfunc_2", _device="/job:localhost/replica:0/task:0/cpu:0"](rpn_rois/_135, _recv_gt_boxes_0, _recv_gt_ishard_0, _recv_dontcare_areas_0, roi-data/PyFunc/input_4)]]

error when running the demo

Hi, I meet error when running the demo.
Traceback (most recent call last):
File "faster_rcnn/demo.py", line 12, in
from lib.networks.factory import get_network
File "/home/dyc/workspace/TFFRCNN/lib/networks/init.py", line 8, in
from .VGGnet_train import VGGnet_train
File "/home/dyc/workspace/TFFRCNN/lib/networks/VGGnet_train.py", line 2, in
from network import Network
File "/home/dyc/workspace/TFFRCNN/lib/networks/network.py", line 4, in
from ..roi_pooling_layer import roi_pooling_op as roi_pool_op
File "/home/dyc/workspace/TFFRCNN/lib/roi_pooling_layer/init.py", line 7, in
import roi_pooling_op
File "/home/dyc/workspace/TFFRCNN/lib/roi_pooling_layer/roi_pooling_op.py", line 5, in
_roi_pooling_module = tf.load_op_library(filename)
File "/home/dyc/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/load_library.py", line 63, in load_op_library
raise errors._make_specific_exception(None, None, error_msg, error_code)
tensorflow.python.framework.errors.NotFoundError: /home/dyc/workspace/TFFRCNN/lib/roi_pooling_layer/roi_pooling.so: undefined symbol: _ZN10tensorflow7strings6StrCatB5cxx11ERKNS0_8AlphaNumE

No OpKernel was registered to support Op 'RoiPoolGrad' with these attrs

I am following the readme training script for the VOC database but I'm running into the following error for the ROI pooling layer:

Traceback (most recent call last):
  File "./faster_rcnn/train_net.py", line 109, in <module>
    restore=bool(int(args.restore)))
  File "./faster_rcnn/../lib/fast_rcnn/train.py", line 396, in train_net
    sw.train_model(sess, max_iters, restore=restore)
  File "./faster_rcnn/../lib/fast_rcnn/train.py", line 144, in train_model
    sess.run(tf.initialize_all_variables())
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 766, in run
    run_metadata_ptr)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 964, in _run
    feed_dict_string, options, run_metadata)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1014, in _do_run
    target_list, options, run_metadata)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1034, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: No OpKernel was registered to support Op 'RoiPoolGrad' with these attrs.  Registered devices: [CPU], Registered kernels:
  device='GPU'; T in [DT_FLOAT]

	 [[Node: gradients/pool_5_grad/RoiPoolGrad = RoiPoolGrad[T=DT_FLOAT, pooled_height=7, pooled_width=7, spatial_scale=0.0625](conv5_3/conv5_3, roi-data/rois, pool_5:1, gradients/fc6/transpose_grad/transpose)]]

Caused by op u'gradients/pool_5_grad/RoiPoolGrad', defined at:
  File "./faster_rcnn/train_net.py", line 109, in <module>
    restore=bool(int(args.restore)))
  File "./faster_rcnn/../lib/fast_rcnn/train.py", line 396, in train_net
    sw.train_model(sess, max_iters, restore=restore)
  File "./faster_rcnn/../lib/fast_rcnn/train.py", line 138, in train_model
    grads, norm = tf.clip_by_global_norm(tf.gradients(loss, tvars), 10)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gradients_impl.py", line 482, in gradients
    in_grads = grad_fn(op, *out_grads)
  File "./faster_rcnn/../lib/roi_pooling_layer/roi_pooling_op_grad.py", line 41, in _roi_pool_grad
    data_grad = roi_pooling_op.roi_pool_grad(data, rois, argmax, grad, pooled_height, pooled_width, spatial_scale)
  File "<string>", line 74, in roi_pool_grad
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 759, in apply_op
    op_def=op_def)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2240, in create_op
    original_op=self._default_original_op, op_def=op_def)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1128, in __init__
    self._traceback = _extract_stack()

...which was originally created as op u'pool_5', defined at:
  File "./faster_rcnn/train_net.py", line 101, in <module>
    network = get_network(args.network_name)
  File "./faster_rcnn/../lib/networks/factory.py", line 27, in get_network
    return VGGnet_train()
  File "./faster_rcnn/../lib/networks/VGGnet_train.py", line 17, in __init__
    self.setup()
  File "./faster_rcnn/../lib/networks/VGGnet_train.py", line 84, in setup
    .roi_pool(7, 7, 1.0/16, name='pool_5')
  File "./faster_rcnn/../lib/networks/network.py", line 27, in layer_decorated
    layer_output = op(self, layer_input, *args, **kwargs)
  File "./faster_rcnn/../lib/networks/network.py", line 183, in roi_pool
    name=name)[0]
  File "<string>", line 45, in roi_pool
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 759, in apply_op
    op_def=op_def)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2240, in create_op
    original_op=self._default_original_op, op_def=op_def)

InvalidArgumentError (see above for traceback): No OpKernel was registered to support Op 'RoiPoolGrad' with these attrs.  Registered devices: [CPU], Registered kernels:
  device='GPU'; T in [DT_FLOAT]

	 [[Node: gradients/pool_5_grad/RoiPoolGrad = RoiPoolGrad[T=DT_FLOAT, pooled_height=7, pooled_width=7, spatial_scale=0.0625](conv5_3/conv5_3, roi-data/rois, pool_5:1, gradients/fc6/transpose_grad/transpose)]]

I'm not really sure what this means. Has anyone else run into this issue when training?

My dev environment:
Tensorflow:0.12.1
GPU/CPU:GPU
Python: 2.7.6
Operating System: Ubuntu 14.04

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.