Giter VIP home page Giter VIP logo

cascade-rcnn_pytorch's People

Contributors

ruoqianguo 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

cascade-rcnn_pytorch's Issues

problems with loading detnet59.pth

Hi! It looks like the model on dropbox is unavaliable now. Could you please upload it again? Cant use baidu due to i dont know chinese:(

about proposal_target_layer

@guoruoqian HI

proposal_target_layer.py中,在选择负样本时,用的函数是:

rand_num = np.floor(np.random.rand(bg_rois_per_this_image) * bg_num_rois)   
rand_num = torch.from_numpy(rand_num).type_as(gt_boxes).long()
bg_inds = bg_inds[rand_num]

其中,
rand_num = np.floor(np.random.rand(bg_rois_per_this_image) * bg_num_rois)  
其结果会有重复数字,即导致重复采样.为什么要设置成重复采样呢??

在py-faster-rcnn中,采样时
npr.choice(bg_inds, size=bg_rois_per_this_image, replace=False)
通过replace=False的设置来刻意避免重复采样.

many many thaks!!

IndexError: list index out of range

I use other dataset, it shows:
Traceback (most recent call last):
File "trainval_net.py", line 230, in
imdb, roidb, ratio_list, ratio_index = combined_roidb(args.imdb_name)
File "/cascade-rcnn_Pytorch/lib/roi_data_layer/roidb.py", line 127, in combined_roidb
roidbs = [get_roidb(s) for s in imdb_names.split('+')]
File "
/cascade-rcnn_Pytorch/lib/roi_data_layer/roidb.py", line 127, in
roidbs = [get_roidb(s) for s in imdb_names.split('+')]
File "/cascade-rcnn_Pytorch/lib/roi_data_layer/roidb.py", line 124, in get_roidb
roidb = get_training_roidb(imdb)
File "
/cascade-rcnn_Pytorch/lib/roi_data_layer/roidb.py", line 112, in get_training_roidb
prepare_roidb(imdb)
File "~/cascade-rcnn_Pytorch/lib/roi_data_layer/roidb.py", line 31, in prepare_roidb
roidb[i]['img_id'] = imdb.image_id_at(i)
IndexError: list index out of range

RuntimeError: The size of tensor a (900) must match the size of tensor b (300) at non-singleton dimension 1

(python36) pytorch@pytorch:~/cascade-rcnn_Pytorch$ CUDA_VISIBLE_DEVICES=0 python demo.py exp_name --dataset pascal_voc --net detnet59 --checksession 1 --checkepoch 19 --checkpoint 631 --cuda --soft_nms
Called with args:
Namespace(cascade=False, cfg_file='cfgs/detnet59.yml', checkepoch=19, checkpoint=631, checksession=1, class_agnostic=False, cuda=True, dataset='pascal_voc', exp_name='exp_name', image_dir='demo_images/', load_dir='models/', net='detnet59', result_dir='vis_results/', set_cfgs=None, soft_nms=True)
/home/pytorch/cascade-rcnn_Pytorch/lib/model/utils/config.py:405: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
yaml_cfg = edict(yaml.load(f))
Using config:
{'ANCHOR_RATIOS': [0.5, 1, 2],
'ANCHOR_SCALES': [8, 16, 32],
'CROP_RESIZE_WITH_MAX_POOL': False,
'CUDA': False,
'DATA_DIR': '/home/pytorch/cascade-rcnn_Pytorch/data',
'DEDUP_BOXES': 0.0625,
'DETNET': {'FIXED_BLOCKS': 1, 'MAX_POOL': False},
'EPS': 1e-14,
'EXP_DIR': 'res101',
'FEAT_STRIDE': [16],
'FPN_ANCHOR_SCALES': [32, 64, 128, 256, 512],
'FPN_ANCHOR_STRIDE': 1,
'FPN_FEAT_STRIDES': [4, 8, 16, 32, 64],
'GPU_ID': 0,
'HAS_MASK': True,
'MATLAB': 'matlab',
'MAX_NUM_GT_BOXES': 20,
'MOBILENET': {'DEPTH_MULTIPLIER': 1.0,
'FIXED_LAYERS': 5,
'REGU_DEPTH': False,
'WEIGHT_DECAY': 4e-05},
'PIXEL_MEANS': array([[[0.485, 0.456, 0.406]]]),
'PIXEL_STDS': array([[[0.229, 0.224, 0.225]]]),
'POOLING_MODE': 'align',
'POOLING_SIZE': 14,
'RESNET': {'FIXED_BLOCKS': 1, 'MAX_POOL': False},
'RNG_SEED': 3,
'ROOT_DIR': '/home/pytorch/cascade-rcnn_Pytorch',
'TEST': {'BBOX_REG': True,
'HAS_RPN': True,
'MAX_SIZE': 1000,
'MODE': 'nms',
'NMS': 0.3,
'PROPOSAL_METHOD': 'gt',
'RPN_MIN_SIZE': 16,
'RPN_NMS_THRESH': 0.7,
'RPN_POST_NMS_TOP_N': 300,
'RPN_PRE_NMS_TOP_N': 6000,
'RPN_TOP_N': 5000,
'SCALES': [600],
'SOFT_NMS_METHOD': 1,
'SVM': False},
'TRAIN': {'ASPECT_CROPPING': False,
'ASPECT_GROUPING': False,
'BATCH_SIZE': 128,
'BBOX_INSIDE_WEIGHTS': [1.0, 1.0, 1.0, 1.0],
'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,
'BIAS_DECAY': False,
'BN_TRAIN': False,
'DISPLAY': 20,
'DOUBLE_BIAS': False,
'FG_FRACTION': 0.25,
'FG_THRESH': 0.5,
'FG_THRESH_2ND': 0.6,
'FG_THRESH_3RD': 0.7,
'GAMMA': 0.1,
'HAS_RPN': True,
'IMS_PER_BATCH': 1,
'LEARNING_RATE': 0.001,
'MAX_SIZE': 1000,
'MOMENTUM': 0.9,
'PROPOSAL_METHOD': 'gt',
'RPN_BATCHSIZE': 256,
'RPN_BBOX_INSIDE_WEIGHTS': [1.0, 1.0, 1.0, 1.0],
'RPN_CLOBBER_POSITIVES': False,
'RPN_FG_FRACTION': 0.5,
'RPN_MIN_SIZE': 8,
'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],
'SNAPSHOT_ITERS': 5000,
'SNAPSHOT_KEPT': 3,
'SNAPSHOT_PREFIX': 'res101_faster_rcnn',
'STEPSIZE': [30000],
'SUMMARY_INTERVAL': 180,
'TRIM_HEIGHT': 600,
'TRIM_WIDTH': 600,
'TRUNCATED': False,
'USE_ALL_GT': True,
'USE_FLIPPED': True,
'USE_GT': False,
'WEIGHT_DECAY': 0.0001},
'USE_GPU_NMS': True}
load model successfully!
load checkpoint models//detnet59/pascal_voc/exp_name/fpn_1_19_631.pth
demo.py:199: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead.
im_data = Variable(im_data, volatile=True)
demo.py:200: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead.
im_info = Variable(im_info, volatile=True)
demo.py:201: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead.
num_boxes = Variable(num_boxes, volatile=True)
demo.py:202: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead.
gt_boxes = Variable(gt_boxes, volatile=True)
Loaded Photo: 5 images.
/home/pytorch/anaconda3/envs/python36/lib/python3.6/site-packages/torch/nn/functional.py:1749: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode))
/home/pytorch/cascade-rcnn_Pytorch/lib/model/rpn/rpn_fpn.py:79: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.
rpn_cls_prob_reshape = F.softmax(rpn_cls_score_reshape)
/home/pytorch/cascade-rcnn_Pytorch/lib/model/fpn/non_cascade/fpn.py:263: UserWarning: Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X as an argument.
cls_prob = F.softmax(cls_score)
Traceback (most recent call last):
File "demo.py", line 310, in
pred_boxes = bbox_transform_inv(boxes, box_deltas, 1)
File "/home/pytorch/cascade-rcnn_Pytorch/lib/model/rpn/bbox_transform.py", line 118, in bbox_transform_inv
pred_ctr_x = dx * widths.unsqueeze(2) + ctr_x.unsqueeze(2)
RuntimeError: The size of tensor a (900) must match the size of tensor b (300) at non-singleton dimension 1

RSNA数据集

我用RSNA的数据集进行按照默认参数训练,阈值是 [0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75]。
结果detnet的效果要好多detnet-cascade
detnet在6epoch,验证集map达到最好:
mAPs: [0.7224553391260808, 0.6599297035067196, 0.579511199465727, 0.48372004238688515, 0.377126303947345, 0.27479695269073545, 0.19356904730168234, 0.13584048094266832]
mean mAP: 0.4283686336709805
detnet-cascade在5epoch,验证集map达到最好:
mAPs: [0.6793144470700885, 0.5995099883468915, 0.5322867614959018, 0.44291050802950327, 0.3290775815062264, 0.257612591509458, 0.1926359629090184, 0.14070865806833324]
mean mAP: 0.39675706236692765

@guoruoqian 这是什么原因呢?

ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.

i use torch=0.3.1 torchvision=0.3.1 cuda=9.0 when I try to train this network, I got this error :
should i use torch=0.2.0?

Traceback (most recent call last):
File "/home/tju/software/pycharm-2018.2.1/helpers/pydev/pydevd.py", line 1664, in
main()
File "/home/tju/software/pycharm-2018.2.1/helpers/pydev/pydevd.py", line 1658, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "/home/tju/software/pycharm-2018.2.1/helpers/pydev/pydevd.py", line 1068, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/home/tju/zhangbing/tianchi/cascade-rcnn_Pytorch-master/trainval_net.py", line 26, in
from model.utils.net_utils import adjust_learning_rate, save_checkpoint
File "/home/tju/zhangbing/tianchi/cascade-rcnn_Pytorch-master/lib/model/utils/net_utils.py", line 11, in
from model.roi_crop.functions.roi_crop import RoICropFunction
File "/home/tju/zhangbing/tianchi/cascade-rcnn_Pytorch-master/lib/model/roi_crop/functions/roi_crop.py", line 4, in
from .._ext import roi_crop
File "/home/tju/zhangbing/tianchi/cascade-rcnn_Pytorch-master/lib/model/roi_crop/_ext/roi_crop/init.py", line 2, in
from torch.utils.ffi import _wrap_function
File "/home/tju/.local/lib/python2.7/site-packages/torch/utils/ffi/init.py", line 1, in
raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.
We've got an error while stopping in post-mortem: <type 'exceptions.KeyboardInterrupt'>

RuntimeError: invalid argument 2: Input tensor must have same size as output tensor apart from the specified dimension at /opt/conda/conda-

Hello,I used your code to train. However, the model terminate after first iter
Would you please help me find out the problem?
In fact, I found this happened after using fpn.
Thank you
Here are my Trace backs:
[session 1][epoch 1][iter 0] loss: 4.0006, lr: 1.00e-02
fg/bg=(128/384), time cost: 7.218862
rpn_cls: 0.6919, rpn_box: 0.1386, rcnn_cls: 2.8319, rcnn_box 0.3382
Traceback (most recent call last):
File "trainval_net.py", line 330, in
roi_labels = FPN(im_data, im_info, gt_boxes, num_boxes)
File "/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/torch/nn/modules/module.py", line 357, in call
result = self.forward(*input, **kwargs)
File "/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/torch/nn/parallel/data_parallel.py", line 73, in forward
outputs = self.parallel_apply(replicas, inputs, kwargs)
File "/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/torch/nn/parallel/data_parallel.py", line 83, in parallel_apply
return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
File "/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/torch/nn/parallel/parallel_apply.py", line 67, in parallel_apply
raise output
RuntimeError: invalid argument 2: Input tensor must have same size as output tensor apart from the specified dimension at /opt/conda/conda-bld/pytorch_1518238409320/work/torch/lib/THC/generic/THCTensorScatterGather.cu:29

bbox regression normalization

@guoruoqian HI

在对偏移量对normalization时,

  1. 在caffe源码中,3个stage用了3组不同的参数.
  2. 在您的代码中,3个stage共用1组参数

共用1组参数的目的是什么呢?

RuntimeError: reciprocal is not implemented for type torch.cuda.LongTensor

Hi,
I try to run the trainval_net.py file to train model with VOC 2007 data. But an error appears as following:
Traceback (most recent call last):
File "/home/robert/Documents/cascade-rcnn_Pytorch/trainval_net.py", line 379, in
roi_labels = FPN(im_data, im_info, gt_boxes, num_boxes)
File "/home/robert/anaconda2/lib/python2.7/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/robert/Documents/cascade-rcnn_Pytorch/lib/model/fpn/cascade/fpn.py", line 193, in forward
rois, rpn_loss_cls, rpn_loss_bbox = self.RCNN_rpn(rpn_feature_maps, im_info, gt_boxes, num_boxes)
File "/home/robert/anaconda2/lib/python2.7/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/robert/Documents/cascade-rcnn_Pytorch/lib/model/rpn/rpn_fpn.py", line 109, in forward
rpn_data = self.RPN_anchor_target((rpn_cls_score_alls.data, gt_boxes, im_info, num_boxes, rpn_shapes))
File "/home/robert/anaconda2/lib/python2.7/site-packages/torch/nn/modules/module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "/home/robert/Documents/cascade-rcnn_Pytorch/lib/model/rpn/anchor_target_layer_fpn.py", line 141, in forward
positive_weights = 1.0 / num_examples
File "/home/robert/anaconda2/lib/python2.7/site-packages/torch/tensor.py", line 320, in rdiv
return self.reciprocal() * other
RuntimeError: reciprocal is not implemented for type torch.cuda.LongTensor
Exception NameError: "global name 'FileNotFoundError' is not defined" in <bound method _DataLoaderIter.del of <torch.utils.data.dataloader._DataLoaderIter object at 0x7fa9a0a3cc50>> ignored

I have tried the pytorch of python2.7 and python3.6, all of them have the same error. Do you meet it?

cudaCheckError() failed : an illegal memory access was encountered

Hi, thanks for your code!
I use your code for training and it succeed, however, when it comes to testing, I am encountered with a weird error:
CUDA_VISIBLE_DEVICES=0,1,2,3 python test_net.py exp_name --cascade --cuda --mGPUs "TiTanX" 09:48 09-9月-1/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/scipy/sparse/lil.py:16: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from . import _csparsetools
/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/scipy/sparse/csgraph/init.py:167: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._shortest_path import shortest_path, floyd_warshall, dijkstra,
/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/scipy/sparse/csgraph/_validation.py:5: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._tools import csgraph_to_dense, csgraph_from_dense,
/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/scipy/sparse/csgraph/init.py:169: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._traversal import breadth_first_order, depth_first_order,
/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/scipy/sparse/csgraph/init.py:171: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._min_spanning_tree import minimum_spanning_tree
/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/scipy/sparse/csgraph/init.py:172: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._reordering import reverse_cuthill_mckee, maximum_bipartite_matching,
/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/scipy/linalg/basic.py:17: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._solve_toeplitz import levinson
/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/scipy/linalg/init.py:191: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._decomp_update import *
/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/scipy/special/init.py:640: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._ufuncs import *
/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/scipy/special/_ellip_harm.py:7: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._ellip_harm_2 import _ellipsoid, _ellipsoid_norm
/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/scipy/optimize/_numdiff.py:8: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from ._group_columns import group_dense, group_sparse
/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/scipy/interpolate/_bsplines.py:9: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from . import _bspl
/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/scipy/spatial/init.py:94: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from .ckdtree import *
/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/scipy/spatial/init.py:95: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from .qhull import *
/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/scipy/spatial/_spherical_voronoi.py:18: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from . import _voronoi
/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/scipy/spatial/distance.py:121: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from . import _hausdorff
/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/scipy/io/matlab/mio4.py:18: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from .mio_utils import squeeze_element, chars_to_strings
/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/scipy/io/matlab/mio5.py:98: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
from .mio5_utils import VarReader5
Called with args:
Namespace(batch_size=1, cascade=True, cfg_file='cfgs/res101.yml', checkepoch=7, checkpoint=6310, checksession=1, class_agnostic=False, cuda=True, dataset='pascal_voc', exp_name='exp_name', large_scale=False, load_dir='models', mGPUs=True, net='detnet59', parallel_type=0, set_cfgs=None, soft_nms=False, vis=False)
Using config:
{'ANCHOR_RATIOS': [0.5, 1, 2],
'ANCHOR_SCALES': [4, 8, 16, 32],
'CROP_RESIZE_WITH_MAX_POOL': False,
'CUDA': False,
'DATA_DIR': '/DATACENTER2/qyj/cascade-rcnn_Pytorch-master/data',
'DEDUP_BOXES': 0.0625,
'DETNET': {'FIXED_BLOCKS': 1, 'MAX_POOL': False},
'EPS': 1e-14,
'EXP_DIR': 'res101',
'FEAT_STRIDE': [16],
'FPN_ANCHOR_SCALES': [32, 64, 128, 256, 512],
'FPN_ANCHOR_STRIDE': 1,
'FPN_FEAT_STRIDES': [4, 8, 16, 16, 16],
'GPU_ID': 0,
'HAS_MASK': True,
'MATLAB': 'matlab',
'MAX_NUM_GT_BOXES': 20,
'MOBILENET': {'DEPTH_MULTIPLIER': 1.0,
'FIXED_LAYERS': 5,
'REGU_DEPTH': False,
'WEIGHT_DECAY': 4e-05},
'PIXEL_MEANS': array([[[0.485, 0.456, 0.406]]]),
'PIXEL_STDS': array([[[0.229, 0.224, 0.225]]]),
'POOLING_MODE': 'align',
'POOLING_SIZE': 14,
'RESNET': {'FIXED_BLOCKS': 1, 'MAX_POOL': False},
'RNG_SEED': 3,
'ROOT_DIR': '/DATACENTER2/qyj/cascade-rcnn_Pytorch-master',
'TEST': {'BBOX_REG': True,
'HAS_RPN': True,
'MAX_SIZE': 1000,
'MODE': 'nms',
'NMS': 0.3,
'PROPOSAL_METHOD': 'gt',
'RPN_MIN_SIZE': 16,
'RPN_NMS_THRESH': 0.7,
'RPN_POST_NMS_TOP_N': 300,
'RPN_PRE_NMS_TOP_N': 6000,
'RPN_TOP_N': 5000,
'SCALES': [600],
'SOFT_NMS_METHOD': 1,
'SVM': False},
'TRAIN': {'ASPECT_CROPPING': False,
'ASPECT_GROUPING': False,
'BATCH_SIZE': 128,
'BBOX_INSIDE_WEIGHTS': [1.0, 1.0, 1.0, 1.0],
'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,
'BIAS_DECAY': False,
'BN_TRAIN': False,
'DISPLAY': 20,
'DOUBLE_BIAS': False,
'FG_FRACTION': 0.25,
'FG_THRESH': 0.5,
'FG_THRESH_2ND': 0.6,
'FG_THRESH_3RD': 0.7,
'GAMMA': 0.1,
'HAS_RPN': True,
'IMS_PER_BATCH': 1,
'LEARNING_RATE': 0.001,
'MAX_SIZE': 1000,
'MOMENTUM': 0.9,
'PROPOSAL_METHOD': 'gt',
'RPN_BATCHSIZE': 256,
'RPN_BBOX_INSIDE_WEIGHTS': [1.0, 1.0, 1.0, 1.0],
'RPN_CLOBBER_POSITIVES': False,
'RPN_FG_FRACTION': 0.5,
'RPN_MIN_SIZE': 8,
'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],
'SNAPSHOT_ITERS': 5000,
'SNAPSHOT_KEPT': 3,
'SNAPSHOT_PREFIX': 'res101_faster_rcnn',
'STEPSIZE': [30000],
'SUMMARY_INTERVAL': 180,
'TRIM_HEIGHT': 600,
'TRIM_WIDTH': 600,
'TRUNCATED': False,
'USE_ALL_GT': True,
'USE_FLIPPED': True,
'USE_GT': False,
'WEIGHT_DECAY': 0.0001},
'USE_GPU_NMS': True}
Loaded dataset voc_2007_test for training
Set proposal method: gt
Preparing training data...
voc_2007_test gt roidb loaded from /DATACENTER2/qyj/cascade-rcnn_Pytorch-master/data/cache/voc_2007_test_gt_roidb.pkl
done
3462 roidb entries
load checkpoint models/detnet59/pascal_voc/exp_name/fpn_1_7_6310.pth
load model successfully!
cudaCheckError() failed : an illegal memory access was encountered

And that's the report after using os.environ['CUDA_LAUNCH_BLOCKING'] = '1' to locate the real place which triggered the cudaCheckError()
Without using it, the error is:
3462 roidb entries
load checkpoint models/detnet59/pascal_voc/exp_name/fpn_1_7_6310.pth
load model successfully!
THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1513363039688/work/torch/lib/THC/generated/../THCReduceAll.cuh line=339 error=77 : an illegal memory access was encountered
Traceback (most recent call last):
File "test_net.py", line 246, in
ret = fpn(im_data, im_info, gt_boxes, num_boxes)
File "/home/zhiqi.cheng/anaconda2/lib/python2.7/site-packages/torch/nn/modules/module.py", line 325, in call
result = self.forward(*input, **kwargs)
File "/DATACENTER2/qyj/cascade-rcnn_Pytorch-master/lib/model/fpn/cascade/fpn.py", line 316, in forward
roi_pool_feat = self._PyramidRoI_Feat(mrcnn_feature_maps, rois, im_info)
File "/DATACENTER2/qyj/cascade-rcnn_Pytorch-master/lib/model/fpn/cascade/fpn.py", line 135, in _PyramidRoI_Feat
if (roi_level == l).sum() == 0:
RuntimeError: cuda runtime error (77) : an illegal memory access was encountered at /opt/conda/conda-bld/pytorch_1513363039688/work/torch/lib/THC/generated/../THCReduceAll.cuh:339

段错误(吐核)

当我 python trainval_net.py --cuda
发生了段错误(吐核)
请问这个是什么原因造成的,是否可以解决呢?
我使用的是pytorch0.3.1
谢谢!

The result of cascade detnet59 ?

Thank you for your great work . However, I get the result of cascade detnet59 is only mAP46.9 when voc2007 trainval and voc2007 test ? So how to get your report results. Thanks.

RuntimeError: cuda runtime error (2) : out of memory at /pytorch/torch/lib/THC/generic/THCStorage.cu:58

I tried to run the trainval_net.py file to train model with VOC 2007 data,But I got an error as following:
THCudaCheck FAIL file=/pytorch/torch/lib/THC/generic/THCStorage.cu line=58 error=2 : out of memory
Traceback (most recent call last):
File "trainval_net.py", line 375, in
loss.backward()
File "/media/t1/0a33a0a0-b876-45c1-bb1c-f0d6fecc3bf9/cascade/lib/python2.7/site-packages/torch/autograd/variable.py", line 167, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, retain_variables)
File "/media/t1/0a33a0a0-b876-45c1-bb1c-f0d6fecc3bf9/cascade/lib/python2.7/site-packages/torch/autograd/init.py", line 99, in backward
variables, grad_variables, retain_graph)
RuntimeError: cuda runtime error (2) : out of memory at /pytorch/torch/lib/THC/generic/THCStorage.cu:58
Exception socket.error: error(111, 'Connection refused') in <bound method DataLoaderIter.del of <torch.utils.data.dataloader.DataLoaderIter object at 0x7f5351873810>> ignored
DId anyone get the same error and tell me how to fix it?Thanks a lot!

KeyError: 'boxes'

hi, when I try to train this network, I got this error :

  • boxes = self.roidb[i]['boxes'].copy() KeyError: 'boxes'' .

I wonder anyone have ever met the same problem. The working log is as follows:

(base) deyiwang@deyiwang-P95xER:~/cascade-rcnn_Pytorch$ CUDA_VISIBLE_DEVICES=3 python3 trainval_net.py exp_name --dataset pascal_voc --net detnet59 --bs 2 --nw 4 --lr 1e-3 --epochs 12 --save_dir weights --cuda --use_tfboard True --cag --cascade
Called with args:
Namespace(batch_size=2, cascade=True, checkepoch=1, checkpoint=0, checkpoint_interval=10000, checksession=1, class_agnostic=True, cuda=True, dataset='pascal_voc', disp_interval=100, exp_name='exp_name', lr=0.001, lr_decay_gamma=0.1, lr_decay_step=5, lscale=False, mGPUs=False, max_epochs=12, net='detnet59', num_workers=4, optimizer='sgd', resume=False, save_dir='weights', session=1, start_epoch=1, use_tfboard=True)
/home/deyiwang/cascade-rcnn_Pytorch/lib/model/utils/config.py:405: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
yaml_cfg = edict(yaml.load(f))
Using config:
{'ANCHOR_RATIOS': [0.5, 1, 2],
'ANCHOR_SCALES': [8, 16, 32],
'CROP_RESIZE_WITH_MAX_POOL': False,
'CUDA': False,
'DATA_DIR': '/home/deyiwang/cascade-rcnn_Pytorch/data',
'DEDUP_BOXES': 0.0625,
'DETNET': {'FIXED_BLOCKS': 1, 'MAX_POOL': False},
'EPS': 1e-14,
'EXP_DIR': 'res101',
'FEAT_STRIDE': [16],
'FPN_ANCHOR_SCALES': [32, 64, 128, 256, 512],
'FPN_ANCHOR_STRIDE': 1,
'FPN_FEAT_STRIDES': [4, 8, 16, 16, 16],
'GPU_ID': 0,
'HAS_MASK': True,
'MATLAB': 'matlab',
'MAX_NUM_GT_BOXES': 20,
'MOBILENET': {'DEPTH_MULTIPLIER': 1.0,
'FIXED_LAYERS': 5,
'REGU_DEPTH': False,
'WEIGHT_DECAY': 4e-05},
'PIXEL_MEANS': array([[[0.485, 0.456, 0.406]]]),
'PIXEL_STDS': array([[[0.229, 0.224, 0.225]]]),
'POOLING_MODE': 'align',
'POOLING_SIZE': 14,
'RESNET': {'FIXED_BLOCKS': 1, 'MAX_POOL': False},
'RNG_SEED': 3,
'ROOT_DIR': '/home/deyiwang/cascade-rcnn_Pytorch',
'TEST': {'BBOX_REG': True,
'HAS_RPN': True,
'MAX_SIZE': 1000,
'MODE': 'nms',
'NMS': 0.3,
'PROPOSAL_METHOD': 'gt',
'RPN_MIN_SIZE': 16,
'RPN_NMS_THRESH': 0.7,
'RPN_POST_NMS_TOP_N': 300,
'RPN_PRE_NMS_TOP_N': 6000,
'RPN_TOP_N': 5000,
'SCALES': [600],
'SOFT_NMS_METHOD': 1,
'SVM': False},
'TRAIN': {'ASPECT_CROPPING': False,
'ASPECT_GROUPING': False,
'BATCH_SIZE': 128,
'BBOX_INSIDE_WEIGHTS': [1.0, 1.0, 1.0, 1.0],
'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,
'BIAS_DECAY': False,
'BN_TRAIN': False,
'DISPLAY': 20,
'DOUBLE_BIAS': False,
'FG_FRACTION': 0.25,
'FG_THRESH': 0.5,
'FG_THRESH_2ND': 0.6,
'FG_THRESH_3RD': 0.7,
'GAMMA': 0.1,
'HAS_RPN': True,
'IMS_PER_BATCH': 1,
'LEARNING_RATE': 0.001,
'MAX_SIZE': 1000,
'MOMENTUM': 0.9,
'PROPOSAL_METHOD': 'gt',
'RPN_BATCHSIZE': 256,
'RPN_BBOX_INSIDE_WEIGHTS': [1.0, 1.0, 1.0, 1.0],
'RPN_CLOBBER_POSITIVES': False,
'RPN_FG_FRACTION': 0.5,
'RPN_MIN_SIZE': 8,
'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],
'SNAPSHOT_ITERS': 5000,
'SNAPSHOT_KEPT': 3,
'SNAPSHOT_PREFIX': 'res101_faster_rcnn',
'STEPSIZE': [30000],
'SUMMARY_INTERVAL': 180,
'TRIM_HEIGHT': 600,
'TRIM_WIDTH': 600,
'TRUNCATED': False,
'USE_ALL_GT': True,
'USE_FLIPPED': True,
'USE_GT': False,
'WEIGHT_DECAY': 0.0001},
'USE_GPU_NMS': True}
Loaded dataset voc_2007_trainval for training
Set proposal method: gt
Appending horizontally-flipped training examples...
voc_2007_trainval gt roidb loaded from /home/deyiwang/cascade-rcnn_Pytorch/data/cache/voc_2007_trainval_gt_roidb.pkl
Traceback (most recent call last):
File "trainval_net.py", line 229, in
imdb, roidb, ratio_list, ratio_index = combined_roidb(args.imdb_name)
File "/home/deyiwang/cascade-rcnn_Pytorch/lib/roi_data_layer/roidb.py", line 122, in combined_roidb
roidbs = [get_roidb(s) for s in imdb_names.split('+')]
File "/home/deyiwang/cascade-rcnn_Pytorch/lib/roi_data_layer/roidb.py", line 122, in
roidbs = [get_roidb(s) for s in imdb_names.split('+')]
File "/home/deyiwang/cascade-rcnn_Pytorch/lib/roi_data_layer/roidb.py", line 119, in get_roidb
roidb = get_training_roidb(imdb)
File "/home/deyiwang/cascade-rcnn_Pytorch/lib/roi_data_layer/roidb.py", line 103, in get_training_roidb
imdb.append_flipped_images()
File "/home/deyiwang/cascade-rcnn_Pytorch/lib/datasets/imdb.py", line 121, in append_flipped_images
boxes = self.roidb[i]['boxes'].copy()
KeyError: 'boxes'

and the working log of make.sh process is as follows:

(base) deyiwang@deyiwang-P95xER:~/cascade-rcnn_Pytorch/lib$ sh make.sh
running build_ext
skipping 'model/utils/bbox.c' Cython extension (up-to-date)
skipping 'model/nms/cpu_nms.c' Cython extension (up-to-date)
skipping 'pycocotools/_mask.c' Cython extension (up-to-date)
Compiling nms kernels by nvcc...
Including CUDA code.
/home/deyiwang/cascade-rcnn_Pytorch/lib/model/nms
['/home/deyiwang/cascade-rcnn_Pytorch/lib/model/nms/src/nms_cuda_kernel.cu.o']
generating /tmp/tmp1yo4qa9j/_nms.c
setting the current directory to '/tmp/tmp1yo4qa9j'
running build_ext
building '_nms' extension
creating home
creating home/deyiwang
creating home/deyiwang/cascade-rcnn_Pytorch
creating home/deyiwang/cascade-rcnn_Pytorch/lib
creating home/deyiwang/cascade-rcnn_Pytorch/lib/model
creating home/deyiwang/cascade-rcnn_Pytorch/lib/model/nms
creating home/deyiwang/cascade-rcnn_Pytorch/lib/model/nms/src
gcc -pthread -B /home/deyiwang/anaconda3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -fPIC -DWITH_CUDA -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/deyiwang/anaconda3/include/python3.6m -c _nms.c -o ./_nms.o
gcc -pthread -B /home/deyiwang/anaconda3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -fPIC -DWITH_CUDA -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/deyiwang/anaconda3/include/python3.6m -c /home/deyiwang/cascade-rcnn_Pytorch/lib/model/nms/src/nms_cuda.c -o ./home/deyiwang/cascade-rcnn_Pytorch/lib/model/nms/src/nms_cuda.o
gcc -pthread -shared -B /home/deyiwang/anaconda3/compiler_compat -L/home/deyiwang/anaconda3/lib -Wl,-rpath=/home/deyiwang/anaconda3/lib -Wl,--no-as-needed -Wl,--sysroot=/ -std=c99 ./_nms.o ./home/deyiwang/cascade-rcnn_Pytorch/lib/model/nms/src/nms_cuda.o /home/deyiwang/cascade-rcnn_Pytorch/lib/model/nms/src/nms_cuda_kernel.cu.o -o ./_nms.so
Compiling roi pooling kernels by nvcc...
Including CUDA code.
/home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_pooling
generating /tmp/tmpr97gvw_4/_roi_pooling.c
setting the current directory to '/tmp/tmpr97gvw_4'
running build_ext
building '_roi_pooling' extension
creating home
creating home/deyiwang
creating home/deyiwang/cascade-rcnn_Pytorch
creating home/deyiwang/cascade-rcnn_Pytorch/lib
creating home/deyiwang/cascade-rcnn_Pytorch/lib/model
creating home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_pooling
creating home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_pooling/src
gcc -pthread -B /home/deyiwang/anaconda3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -fPIC -DWITH_CUDA -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/deyiwang/anaconda3/include/python3.6m -c _roi_pooling.c -o ./_roi_pooling.o
gcc -pthread -B /home/deyiwang/anaconda3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -fPIC -DWITH_CUDA -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/deyiwang/anaconda3/include/python3.6m -c /home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_pooling/src/roi_pooling.c -o ./home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_pooling/src/roi_pooling.o
gcc -pthread -B /home/deyiwang/anaconda3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -fPIC -DWITH_CUDA -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/deyiwang/anaconda3/include/python3.6m -c /home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_pooling/src/roi_pooling_cuda.c -o ./home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_pooling/src/roi_pooling_cuda.o
gcc -pthread -shared -B /home/deyiwang/anaconda3/compiler_compat -L/home/deyiwang/anaconda3/lib -Wl,-rpath=/home/deyiwang/anaconda3/lib -Wl,--no-as-needed -Wl,--sysroot=/ -std=c99 ./_roi_pooling.o ./home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_pooling/src/roi_pooling.o ./home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_pooling/src/roi_pooling_cuda.o /home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_pooling/src/roi_pooling.cu.o -o ./_roi_pooling.so
Compiling roi align kernels by nvcc...
Including CUDA code.
/home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_align
generating /tmp/tmpfqz16xw0/_roi_align.c
setting the current directory to '/tmp/tmpfqz16xw0'
running build_ext
building '_roi_align' extension
creating home
creating home/deyiwang
creating home/deyiwang/cascade-rcnn_Pytorch
creating home/deyiwang/cascade-rcnn_Pytorch/lib
creating home/deyiwang/cascade-rcnn_Pytorch/lib/model
creating home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_align
creating home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_align/src
gcc -pthread -B /home/deyiwang/anaconda3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -fPIC -DWITH_CUDA -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/deyiwang/anaconda3/include/python3.6m -c _roi_align.c -o ./_roi_align.o
gcc -pthread -B /home/deyiwang/anaconda3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -fPIC -DWITH_CUDA -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/deyiwang/anaconda3/include/python3.6m -c /home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_align/src/roi_align_cuda.c -o ./home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_align/src/roi_align_cuda.o
gcc -pthread -shared -B /home/deyiwang/anaconda3/compiler_compat -L/home/deyiwang/anaconda3/lib -Wl,-rpath=/home/deyiwang/anaconda3/lib -Wl,--no-as-needed -Wl,--sysroot=/ -std=c99 ./_roi_align.o ./home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_align/src/roi_align_cuda.o /home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_align/src/roi_align_kernel.cu.o -o ./_roi_align.so
Compiling roi crop kernels by nvcc...
Including CUDA code.
/home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop
generating /tmp/tmpxqnsgc0b/_roi_crop.c
setting the current directory to '/tmp/tmpxqnsgc0b'
running build_ext
building '_roi_crop' extension
creating home
creating home/deyiwang
creating home/deyiwang/cascade-rcnn_Pytorch
creating home/deyiwang/cascade-rcnn_Pytorch/lib
creating home/deyiwang/cascade-rcnn_Pytorch/lib/model
creating home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop
creating home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop/src
gcc -pthread -B /home/deyiwang/anaconda3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -fPIC -DWITH_CUDA -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/deyiwang/anaconda3/include/python3.6m -c _roi_crop.c -o ./_roi_crop.o
gcc -pthread -B /home/deyiwang/anaconda3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -fPIC -DWITH_CUDA -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/deyiwang/anaconda3/include/python3.6m -c /home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c -o ./home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.o
/home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c: In function ‘BilinearSamplerBHWD_updateGradInput’:
/home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:190:14: warning: unused variable ‘inBottomRight’ [-Wunused-variable]
real inBottomRight=0;
^
/home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:189:14: warning: unused variable ‘inBottomLeft’ [-Wunused-variable]
real inBottomLeft=0;
^
/home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:188:14: warning: unused variable ‘inTopRight’ [-Wunused-variable]
real inTopRight=0;
^
/home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:187:14: warning: unused variable ‘inTopLeft’ [-Wunused-variable]
real inTopLeft=0;
^
/home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:186:14: warning: unused variable ‘v’ [-Wunused-variable]
real v=0;
^
/home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c: In function ‘BilinearSamplerBCHW_updateGradInput’:
/home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:441:14: warning: unused variable ‘inBottomRight’ [-Wunused-variable]
real inBottomRight=0;
^
/home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:440:14: warning: unused variable ‘inBottomLeft’ [-Wunused-variable]
real inBottomLeft=0;
^
/home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:439:14: warning: unused variable ‘inTopRight’ [-Wunused-variable]
real inTopRight=0;
^
/home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:438:14: warning: unused variable ‘inTopLeft’ [-Wunused-variable]
real inTopLeft=0;
^
/home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:437:14: warning: unused variable ‘v’ [-Wunused-variable]
real v=0;
^
gcc -pthread -B /home/deyiwang/anaconda3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -fPIC -DWITH_CUDA -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/deyiwang/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/deyiwang/anaconda3/include/python3.6m -c /home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop_cuda.c -o ./home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop_cuda.o
gcc -pthread -shared -B /home/deyiwang/anaconda3/compiler_compat -L/home/deyiwang/anaconda3/lib -Wl,-rpath=/home/deyiwang/anaconda3/lib -Wl,--no-as-needed -Wl,--sysroot=/ -std=c99 ./_roi_crop.o ./home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.o ./home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop_cuda.o /home/deyiwang/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop_cuda_kernel.cu.o -o ./_roi_crop.so

my environment is: Ubuntu 16.04 cuda8.0 pytorch0.4.0 gcc 5.3

torch version problem

The torch official website has no version below 0.4.0, this code is no longer applicable? I have seen many packages that have not been seen before.i hope you reply.Thanks

rpn_box: 0.0000

hi,
when i train with voc2007, i found th rpn_box always 0. like:
[session 1][epoch 1][iter 0/5011] loss: 10.1020, lr: 1.00e-03
fg/bg=(12/244), time cost: 1.131177
rpn_cls: 0.6953, rpn_box: 0.0000, rcnn_cls: 3.0396, rcnn_box 0.2489, rcnn_cls_2nd: 3.0223, rcnn_box_2n d 0.0840, rcnn_cls_3rd: 3.0056, rcnn_box_3rd 0.0062
[session 1][epoch 1][iter 100/5011] loss: 3.8306, lr: 1.00e-03
fg/bg=(10/246), time cost: 88.860887
rpn_cls: 0.0645, rpn_box: 0.0000, rcnn_cls: 0.6193, rcnn_box 0.3400, rcnn_cls_2nd: 0.4048, rcnn_box_2n d 0.0917, rcnn_cls_3rd: 0.2731, rcnn_box_3rd 0.0146
[session 1][epoch 1][iter 200/5011] loss: 1.9012, lr: 1.00e-03
fg/bg=(18/238), time cost: 90.126512
rpn_cls: 0.1469, rpn_box: 0.0000, rcnn_cls: 0.3413, rcnn_box 0.2015, rcnn_cls_2nd: 0.3152, rcnn_box_2n d 0.0820, rcnn_cls_3rd: 0.2835, rcnn_box_3rd 0.0214
[session 1][epoch 1][iter 300/5011] loss: 1.8332, lr: 1.00e-03
fg/bg=(15/241), time cost: 90.040235
rpn_cls: 0.1073, rpn_box: 0.0000, rcnn_cls: 0.7532, rcnn_box 0.4228, rcnn_cls_2nd: 0.4802, rcnn_box_2n d 0.1167, rcnn_cls_3rd: 0.3554, rcnn_box_3rd 0.0254
[session 1][epoch 1][iter 400/5011] loss: 2.1349, lr: 1.00e-03
fg/bg=(29/227), time cost: 90.676864
rpn_cls: 0.1254, rpn_box: 0.0000, rcnn_cls: 0.9470, rcnn_box 0.4488, rcnn_cls_2nd: 0.7405, rcnn_box_2n d 0.1417, rcnn_cls_3rd: 0.6263, rcnn_box_3rd 0.0342
[session 1][epoch 1][iter 500/5011] loss: 2.4244, lr: 1.00e-03
fg/bg=(22/234), time cost: 91.616999
rpn_cls: 0.2270, rpn_box: 0.0000, rcnn_cls: 0.8991, rcnn_box 0.3421, rcnn_cls_2nd: 0.5912, rcnn_box_2n d 0.0817, rcnn_cls_3rd: 0.5299, rcnn_box_3rd 0.0175
[session 1][epoch 1][iter 600/5011] loss: 2.4373, lr: 1.00e-03
fg/bg=(22/234), time cost: 89.696538
rpn_cls: 0.1168, rpn_box: 0.0000, rcnn_cls: 0.3554, rcnn_box 0.3495, rcnn_cls_2nd: 0.2947, rcnn_box_2n d 0.1586, rcnn_cls_3rd: 0.2536, rcnn_box_3rd 0.0350
[session 1][epoch 1][iter 700/5011] loss: 2.4608, lr: 1.00e-03
fg/bg=(24/232), time cost: 90.736187
rpn_cls: 0.1741, rpn_box: 0.0000, rcnn_cls: 0.8582, rcnn_box 0.4268, rcnn_cls_2nd: 0.6125, rcnn_box_2n d 0.0850, rcnn_cls_3rd: 0.5801, rcnn_box_3rd 0.0278
[session 1][epoch 1][iter 800/5011] loss: 2.4771, lr: 1.00e-03
fg/bg=(19/237), time cost: 90.459737
rpn_cls: 0.0907, rpn_box: 0.0000, rcnn_cls: 0.2473, rcnn_box 0.2492, rcnn_cls_2nd: 0.2476, rcnn_box_2n d 0.0739, rcnn_cls_3rd: 0.2737, rcnn_box_3rd 0.0222
[session 1][epoch 1][iter 900/5011] loss: 2.4687, lr: 1.00e-03
fg/bg=(18/238), time cost: 90.652463
rpn_cls: 0.1206, rpn_box: 0.0000, rcnn_cls: 0.5917, rcnn_box 0.2917, rcnn_cls_2n d: 0.5545, rcnn_box_2nd 0.1864, rcnn_cls_3rd: 0.3710, rcnn_box_3rd 0.0428

Can you help me with it?

how to speed up training process

Thanks you for giving out the source code. I train my own data with the code but the GPU utility is always stayed at 0%. I have tested the code and found that the I/O speed is fast , so I do not know why the speed is extremely slow , could you please help me?

where is val loss?

When training, I can' find the val loss...., and what is 201.35720586776733?
[session 1][epoch 16][iter 500/ 565] loss: 0.9430, lr: 1.00e-03
fg/bg=(223/1057), time cost: 301.081875
rpn_cls: 0.0097, rpn_box: 0.0153, rcnn_cls: 0.1231, rcnn_box 0.2279, rcnn_cls_2nd: 0.1785, rcnn_box_2nd 0.1619, rcnn_cls_3rd: 0.2100, rcnn_box_3rd 0.0816
save model: weights/detnet59/pascal_voc/exp_name/fpn_1_16_564.pth
201.35720586776733
[session 1][epoch 17][iter 0/ 565] loss: 0.7003, lr: 1.00e-03
fg/bg=(268/1012), time cost: 6.350786
rpn_cls: 0.0139, rpn_box: 0.0372, rcnn_cls: 0.0891, rcnn_box 0.1304, rcnn_cls_2nd: 0.0869, rcnn_box_2nd 0.1168, rcnn_cls_3rd: 0.1454, rcnn_box_3rd 0.0806
[session 1][epoch 17][iter 100/ 565] loss: 0.8786, lr: 1.00e-03
fg/bg=(265/1015), time cost: 301.732252
rpn_cls: 0.0157, rpn_box: 0.0119, rcnn_cls: 0.1194, rcnn_box 0.1752, rcnn_cls_2nd: 0.1536, rcnn_box_2nd 0.1464, rcnn_cls_3rd: 0.2441, rcnn_box_3rd 0.0962
[session 1][epoch 17][iter 200/ 565] loss: 0.8964, lr: 1.00e-03
fg/bg=(187/1093), time cost: 299.821176
rpn_cls: 0.0131, rpn_box: 0.0243, rcnn_cls: 0.1250, rcnn_box 0.2049, rcnn_cls_2nd: 0.1662, rcnn_box_2nd 0.1636, rcnn_cls_3rd: 0.2089, rcnn_box_3rd 0.0770

Hi, I found cascade-rcnn mode seems don't support multi-gpu?

Hi, I found cascade-rcnn mode seems don't support multi-gpu? When I running with no cascace-rcnn mode , it can running on multi-gpu, however it crashed when I running with cascade-rcnn model. The Error is:
Traceback (most recent call last):
File "trainval_net.py", line 364, in
roi_labels = FPN(im_data, im_info, gt_boxes, num_boxes)
File "/home/wet/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 357, in call
result = self.forward(*input, **kwargs)
File "/home/wet/anaconda3/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 74, in forward
return self.gather(outputs, self.output_device)
File "/home/wet/anaconda3/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 86, in gather
return gather(outputs, output_device, dim=self.dim)
File "/home/wet/anaconda3/lib/python3.6/site-packages/torch/nn/parallel/scatter_gather.py", line 65, in gather
return gather_map(outputs)
File "/home/wet/anaconda3/lib/python3.6/site-packages/torch/nn/parallel/scatter_gather.py", line 60, in gather_map
return type(out)(map(gather_map, zip(*outputs)))
File "/home/wet/anaconda3/lib/python3.6/site-packages/torch/nn/parallel/scatter_gather.py", line 60, in gather_map
return type(out)(map(gather_map, zip(*outputs)))
TypeError: zip argument #1 must support iteration

ValueError: operands could not be broadcast together with shapes (1216,800,4) (1,1,3) (1216,800,4)

File "/home/jsu/cascade/cascade-rcnn_Pytorch/lib/roi_data_layer/minibatch.py", line 79, in _get_image_blob
cfg.TRAIN.MAX_SIZE)
File "/home/jsu/cascade/cascade-rcnn_Pytorch/lib/model/utils/blob.py", line 39, in prep_im_for_blob
im -= pixel_means
ValueError: operands could not be broadcast together with shapes (1216,800,4) (1,1,3) (1216,800,4)
I maked a VOClike dataset used my data,but when I use it to train ,this error happened ,Can you give me some suggestions? Thanks

about proposal_target_layer

@guoruoqian HI

对于proposal_target_layer层,在stage1中,送入2000个rois,随后,这2000个rois要加上20个gt一起进行后面的运算,这个可以理解.
但是对于stage2和stage3,还要在重复的加上要20个gt吗?20个gt已经在stage1中加过,再在stage2和stage3中,是不是重复了?

many many thanks

IndexError: Indexing a Tensor with a torch.cuda.LongTensor triggers index_select semantics, and thus we expect a vector, but the indexing Tensor passed has 0 dimensions

When training your own data set, the TRAIN.MAX_SIZE and TRAIN.SCALES parameters are modified, and random errors are reported during training.
Traceback (most recent call last): File "trainval_net.py", line 359, in <module> roi_labels = FPN(im_data, im_info, gt_boxes, num_boxes) File "/home/zy/anaconda3/envs/pytorch03/lib/python3.6/site-packages/torch/nn/modules/module.py", line 357, in __call__ result = self.forward(*input, **kwargs) File "/home/zy/anaconda3/envs/pytorch03/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 73, in forward outputs = self.parallel_apply(replicas, inputs, kwargs) File "/home/zy/anaconda3/envs/pytorch03/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 83, in parallel_apply return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)]) File "/home/zy/anaconda3/envs/pytorch03/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 67, in parallel_apply raise output File "/home/zy/anaconda3/envs/pytorch03/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 42, in _worker output = module(*input, **kwargs) File "/home/zy/anaconda3/envs/pytorch03/lib/python3.6/site-packages/torch/nn/modules/module.py", line 357, in __call__ result = self.forward(*input, **kwargs) File "/home/zy/lvdailin/CascadeRCNN-master/lib/model/fpn/cascade/fpn.py", line 210, in forward gt_assign_pos = gt_assign[pos_id] IndexError: Indexing a Tensor with a torch.cuda.LongTensor triggers index_select semantics, and thus we expect a vector, but the indexing Tensor passed has 0 dimensions
My environment:
RTX 2080*8
python=3.6
pytorch=0.3.1
cuda=8.0
Maybe this is a version issue?

sh make.sh error

@guoruoqian
I use python2.7(anaconda) and CUDA9.0 and sm_52(TITAN Xp)
when I run sh make.sh, error occurs:

/mnt/lustre/hezhiqun/experiments/detection/cascade-rcnn_Pytorch/lib/model/nms/src/nms_cuda.c: In function ‘nms_cuda’:
/mnt/lustre/hezhiqun/experiments/detection/cascade-rcnn_Pytorch/lib/model/nms/src/nms_cuda.c:14:22: error: dereferencing pointer to incomplete type                                              boxes_host->size[0],                                                                                                                                                                           ^                                                                                                                                                              /mnt/lustre/hezhiqun/experiments/detection/cascade-rcnn_Pytorch/lib/model/nms/src/nms_cuda.c:15:22: error: dereferencing pointer to incomplete type

......

/mnt/lustre/hezhiqun/experiments/detection/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c: In function ‘BilinearSamplerBHWD_updateOutput’:
/mnt/lustre/hezhiqun/experiments/detection/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:10:30: error: dereferencing pointer to incomplete type
   int batchsize = inputImages->size[0];
                              ^
/mnt/lustre/hezhiqun/experiments/detection/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:11:39: error: dereferencing pointer to incomplete type
   int inputImages_height = inputImages->size[1];
                                       ^
/mnt/lustre/hezhiqun/experiments/detection/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:12:38: error: dereferencing pointer to incomplete type
   int inputImages_width = inputImages->size[2];
                                      ^
/mnt/lustre/hezhiqun/experiments/detection/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:13:29: error: dereferencing pointer to incomplete type
   int output_height = output->size[1];
                             ^
/mnt/lustre/hezhiqun/experiments/detection/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:14:28: error: dereferencing pointer to incomplete type
   int output_width = output->size[2];
                            ^
/mnt/lustre/hezhiqun/experiments/detection/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:15:41: error: dereferencing pointer to incomplete type
   int inputImages_channels = inputImages->size[3];
                                         ^
/mnt/lustre/hezhiqun/experiments/detection/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:17:34: error: dereferencing pointer to incomplete type
   int output_strideBatch = output->stride[0];
                                  ^
/mnt/lustre/hezhiqun/experiments/detection/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:18:35: error: dereferencing pointer to incomplete type
......

what will happen when I training cascade net without cag option?

HI, I have trained a model with cascade rcnn. But I did not set the cag option when I trained It, the training stage is successfully, however, when I do Inference the code crashed. I noticed that your training script has set the cag option when training. So, how does the option effect? If I want to train a model without cascade, how to set?

is the dim of rois wrong?

when i try to test the trained model, i found that the dim of rois after bbox_decode is [300, 85]. It causes the error in second pyramidroi_feat function.
could you tell me your dim of rois, and i think there is something wrong in bbox_decode function.

[solution of errors]'the dim of decoded rois' and'illegal memory acecess'

It cost me two days to solve the error and i almost try every solutions on the network. Luckily, it work.

Change the code of bbox_decode() function in bbox_transform.py as follows:

`def bbox_decode(rois, bbox_pred, batch_size, classes, im_info, training):
rois_ = rois.detach()
boxes = rois_[:, :, 1:5]

if cfg.TEST.BBOX_REG:
    # Apply bounding-box regression deltas
    box_deltas = bbox_pred.data
    if cfg.TRAIN.BBOX_NORMALIZE_TARGETS_PRECOMPUTED:
        # Optionally normalize targets by a precomputed mean and stdev
        if training:
            box_deltas = box_deltas.view(-1, 4) * torch.FloatTensor(cfg.TRAIN.BBOX_NORMALIZE_STDS).cuda() \
                         + torch.FloatTensor(cfg.TRAIN.BBOX_NORMALIZE_MEANS).cuda()
            box_deltas = box_deltas.view(batch_size, -1, 4)
        else:
            box_deltas = box_deltas.view(-1, 4) * torch.FloatTensor(cfg.TRAIN.BBOX_NORMALIZE_STDS).cuda() \
                         + torch.FloatTensor(cfg.TRAIN.BBOX_NORMALIZE_MEANS).cuda()
            box_deltas = box_deltas.view(batch_size, -1, 4 * classes)

    pred_boxes = bbox_transform_inv(boxes, box_deltas, batch_size)
    pred_boxes = clip_boxes(pred_boxes, im_info, batch_size)
else:
    # Simply repeat the boxes, once for each class
    pred_boxes = boxes
pred_boxes = pred_boxes.view(batch_size, -1, 4)
ret_boxes = pred_boxes.new(pred_boxes.size(0), pred_boxes.size(1), pred_boxes.size(2)+1)
ret_boxes[:, :, 1:pred_boxes.size(2) + 1] = pred_boxes
for b in range(batch_size):
    ret_boxes[b, :, 0] = b
# if not training:
#    pred_boxes.view(batch_size, -1, 4 * classes)
return ret_boxes`

return nll_loss Error

2018-08-27 09-14-41
I just make my dataset as VOC style ,but this error happened and I do not know
how to slove it can u give me some suggestions? Thanks

sh make.sh error

I use python3.6(anaconda) and CUDA8.0 and sm_52(TITAN X)
when I run sh make.sh, error occurs:
Traceback (most recent call last):
File "/home/zhushiwei/anaconda3/lib/python3.6/distutils/unixccompiler.py", line 118, in _compile
extra_postargs)
File "/home/zhushiwei/anaconda3/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/home/zhushiwei/anaconda3/lib/python3.6/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/home/zhushiwei/anaconda3/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/zhushiwei/anaconda3/lib/python3.6/site-packages/cffi/ffiplatform.py", line 51, in _build
dist.run_command('build_ext')
File "/home/zhushiwei/anaconda3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/zhushiwei/anaconda3/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/home/zhushiwei/anaconda3/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/home/zhushiwei/anaconda3/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/home/zhushiwei/anaconda3/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
depends=ext.depends)
File "/home/zhushiwei/anaconda3/lib/python3.6/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/home/zhushiwei/anaconda3/lib/python3.6/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "build.py", line 35, in
ffi.build()
File "/home/zhushiwei/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 189, in build
_build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
File "/home/zhushiwei/anaconda3/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 111, in _build_extension
outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
File "/home/zhushiwei/anaconda3/lib/python3.6/site-packages/cffi/api.py", line 690, in compile
compiler_verbose=verbose, debug=debug, **kwds)
File "/home/zhushiwei/anaconda3/lib/python3.6/site-packages/cffi/recompiler.py", line 1515, in recompile
compiler_verbose, debug)
File "/home/zhushiwei/anaconda3/lib/python3.6/site-packages/cffi/ffiplatform.py", line 22, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "/home/zhushiwei/anaconda3/lib/python3.6/site-packages/cffi/ffiplatform.py", line 58, in _build
raise VerificationError('%s: %s' % (e.class.name, e))
cffi.error.VerificationError: CompileError: command 'gcc' failed with exit status 1
zhushiwei@node3:~/cascade-rcnn_Pytorch/lib$ yum install libsmbclient-devel
You need to be root to perform this command.
looking forward for your reply

sh make.sh error

python 2.7
cuda 9.0

running build_ext
skipping 'model/utils/bbox.c' Cython extension (up-to-date)
skipping 'model/nms/cpu_nms.c' Cython extension (up-to-date)
skipping 'pycocotools/_mask.c' Cython extension (up-to-date)
Compiling nms kernels by nvcc...
cc1plus: fatal error: cuda_runtime.h: 没有那个文件或目录
compilation terminated.
Including CUDA code.
/home/huangfu/github/cascade-rcnn_Pytorch/lib/model/nms
['/home/huangfu/github/cascade-rcnn_Pytorch/lib/model/nms/src/nms_cuda_kernel.cu.o']
generating /tmp/tmpNq3EpS/_nms.c
setting the current directory to '/tmp/tmpNq3EpS'
running build_ext
building '_nms' extension
creating home
creating home/huangfu
creating home/huangfu/github
creating home/huangfu/github/cascade-rcnn_Pytorch
creating home/huangfu/github/cascade-rcnn_Pytorch/lib
creating home/huangfu/github/cascade-rcnn_Pytorch/lib/model
creating home/huangfu/github/cascade-rcnn_Pytorch/lib/model/nms
creating home/huangfu/github/cascade-rcnn_Pytorch/lib/model/nms/src
gcc -pthread -B /home/huangfu/anaconda3/envs/cascade-rcnn/compiler_compat -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/huangfu/anaconda3/envs/cascade-rcnn/include/python2.7 -c _nms.c -o ./_nms.o
gcc -pthread -B /home/huangfu/anaconda3/envs/cascade-rcnn/compiler_compat -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/huangfu/anaconda3/envs/cascade-rcnn/include/python2.7 -c /home/huangfu/github/cascade-rcnn_Pytorch/lib/model/nms/src/nms_cuda.c -o ./home/huangfu/github/cascade-rcnn_Pytorch/lib/model/nms/src/nms_cuda.o
gcc -pthread -shared -B /home/huangfu/anaconda3/envs/cascade-rcnn/compiler_compat -L/home/huangfu/anaconda3/envs/cascade-rcnn/lib -Wl,-rpath=/home/huangfu/anaconda3/envs/cascade-rcnn/lib -Wl,--no-as-needed -Wl,--sysroot=/ ./_nms.o ./home/huangfu/github/cascade-rcnn_Pytorch/lib/model/nms/src/nms_cuda.o /home/huangfu/github/cascade-rcnn_Pytorch/lib/model/nms/src/nms_cuda_kernel.cu.o -L/home/huangfu/anaconda3/envs/cascade-rcnn/lib -lpython2.7 -o ./_nms.so
gcc: error: /home/huangfu/github/cascade-rcnn_Pytorch/lib/model/nms/src/nms_cuda_kernel.cu.o: 没有那个文件或目录
Traceback (most recent call last):
File "build.py", line 36, in
ffi.build()
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/init.py", line 164, in build
_build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/init.py", line 100, in _build_extension
ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/cffi/api.py", line 723, in compile
compiler_verbose=verbose, debug=debug, **kwds)
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/cffi/recompiler.py", line 1526, in recompile
compiler_verbose, debug)
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/cffi/ffiplatform.py", line 22, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/cffi/ffiplatform.py", line 58, in _build
raise VerificationError('%s: %s' % (e.class.name, e))
cffi.VerificationError: LinkError: command 'gcc' failed with exit status 1
Compiling roi pooling kernels by nvcc...
cc1plus: fatal error: cuda_runtime.h: 没有那个文件或目录
compilation terminated.
Including CUDA code.
/home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_pooling
generating /tmp/tmpkqcLdD/_roi_pooling.c
setting the current directory to '/tmp/tmpkqcLdD'
running build_ext
building '_roi_pooling' extension
creating home
creating home/huangfu
creating home/huangfu/github
creating home/huangfu/github/cascade-rcnn_Pytorch
creating home/huangfu/github/cascade-rcnn_Pytorch/lib
creating home/huangfu/github/cascade-rcnn_Pytorch/lib/model
creating home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_pooling
creating home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_pooling/src
gcc -pthread -B /home/huangfu/anaconda3/envs/cascade-rcnn/compiler_compat -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/huangfu/anaconda3/envs/cascade-rcnn/include/python2.7 -c _roi_pooling.c -o ./_roi_pooling.o
gcc -pthread -B /home/huangfu/anaconda3/envs/cascade-rcnn/compiler_compat -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/huangfu/anaconda3/envs/cascade-rcnn/include/python2.7 -c /home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_pooling/src/roi_pooling.c -o ./home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_pooling/src/roi_pooling.o
gcc -pthread -B /home/huangfu/anaconda3/envs/cascade-rcnn/compiler_compat -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/huangfu/anaconda3/envs/cascade-rcnn/include/python2.7 -c /home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_pooling/src/roi_pooling_cuda.c -o ./home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_pooling/src/roi_pooling_cuda.o
gcc -pthread -shared -B /home/huangfu/anaconda3/envs/cascade-rcnn/compiler_compat -L/home/huangfu/anaconda3/envs/cascade-rcnn/lib -Wl,-rpath=/home/huangfu/anaconda3/envs/cascade-rcnn/lib -Wl,--no-as-needed -Wl,--sysroot=/ ./_roi_pooling.o ./home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_pooling/src/roi_pooling.o ./home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_pooling/src/roi_pooling_cuda.o /home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_pooling/src/roi_pooling.cu.o -L/home/huangfu/anaconda3/envs/cascade-rcnn/lib -lpython2.7 -o ./_roi_pooling.so
gcc: error: /home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_pooling/src/roi_pooling.cu.o: 没有那个文件或目录
Traceback (most recent call last):
File "build.py", line 34, in
ffi.build()
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/init.py", line 164, in build
_build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/init.py", line 100, in _build_extension
ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/cffi/api.py", line 723, in compile
compiler_verbose=verbose, debug=debug, **kwds)
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/cffi/recompiler.py", line 1526, in recompile
compiler_verbose, debug)
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/cffi/ffiplatform.py", line 22, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/cffi/ffiplatform.py", line 58, in _build
raise VerificationError('%s: %s' % (e.class.name, e))
cffi.VerificationError: LinkError: command 'gcc' failed with exit status 1
Compiling roi align kernels by nvcc...
cc1plus: fatal error: cuda_runtime.h: 没有那个文件或目录
compilation terminated.
Including CUDA code.
/home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_align
generating /tmp/tmp6i1IZ3/_roi_align.c
setting the current directory to '/tmp/tmp6i1IZ3'
running build_ext
building '_roi_align' extension
creating home
creating home/huangfu
creating home/huangfu/github
creating home/huangfu/github/cascade-rcnn_Pytorch
creating home/huangfu/github/cascade-rcnn_Pytorch/lib
creating home/huangfu/github/cascade-rcnn_Pytorch/lib/model
creating home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_align
creating home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_align/src
gcc -pthread -B /home/huangfu/anaconda3/envs/cascade-rcnn/compiler_compat -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/huangfu/anaconda3/envs/cascade-rcnn/include/python2.7 -c _roi_align.c -o ./_roi_align.o
gcc -pthread -B /home/huangfu/anaconda3/envs/cascade-rcnn/compiler_compat -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/huangfu/anaconda3/envs/cascade-rcnn/include/python2.7 -c /home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_align/src/roi_align_cuda.c -o ./home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_align/src/roi_align_cuda.o
gcc -pthread -shared -B /home/huangfu/anaconda3/envs/cascade-rcnn/compiler_compat -L/home/huangfu/anaconda3/envs/cascade-rcnn/lib -Wl,-rpath=/home/huangfu/anaconda3/envs/cascade-rcnn/lib -Wl,--no-as-needed -Wl,--sysroot=/ ./_roi_align.o ./home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_align/src/roi_align_cuda.o /home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_align/src/roi_align_kernel.cu.o -L/home/huangfu/anaconda3/envs/cascade-rcnn/lib -lpython2.7 -o ./_roi_align.so
gcc: error: /home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_align/src/roi_align_kernel.cu.o: 没有那个文件或目录
Traceback (most recent call last):
File "build.py", line 35, in
ffi.build()
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/init.py", line 164, in build
_build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/init.py", line 100, in _build_extension
ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/cffi/api.py", line 723, in compile
compiler_verbose=verbose, debug=debug, **kwds)
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/cffi/recompiler.py", line 1526, in recompile
compiler_verbose, debug)
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/cffi/ffiplatform.py", line 22, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/cffi/ffiplatform.py", line 58, in _build
raise VerificationError('%s: %s' % (e.class.name, e))
cffi.VerificationError: LinkError: command 'gcc' failed with exit status 1
Compiling roi crop kernels by nvcc...
cc1plus: fatal error: cuda_runtime.h: 没有那个文件或目录
compilation terminated.
Including CUDA code.
/home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop
generating /tmp/tmpIy1pL3/_roi_crop.c
setting the current directory to '/tmp/tmpIy1pL3'
running build_ext
building '_roi_crop' extension
creating home
creating home/huangfu
creating home/huangfu/github
creating home/huangfu/github/cascade-rcnn_Pytorch
creating home/huangfu/github/cascade-rcnn_Pytorch/lib
creating home/huangfu/github/cascade-rcnn_Pytorch/lib/model
creating home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop
creating home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop/src
gcc -pthread -B /home/huangfu/anaconda3/envs/cascade-rcnn/compiler_compat -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/huangfu/anaconda3/envs/cascade-rcnn/include/python2.7 -c _roi_crop.c -o ./_roi_crop.o
gcc -pthread -B /home/huangfu/anaconda3/envs/cascade-rcnn/compiler_compat -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/huangfu/anaconda3/envs/cascade-rcnn/include/python2.7 -c /home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c -o ./home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.o
/home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c: In function ‘BilinearSamplerBHWD_updateGradInput’:
/home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:190:14: warning: unused variable ‘inBottomRight’ [-Wunused-variable]
real inBottomRight=0;
^
/home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:189:14: warning: unused variable ‘inBottomLeft’ [-Wunused-variable]
real inBottomLeft=0;
^
/home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:188:14: warning: unused variable ‘inTopRight’ [-Wunused-variable]
real inTopRight=0;
^
/home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:187:14: warning: unused variable ‘inTopLeft’ [-Wunused-variable]
real inTopLeft=0;
^
/home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:186:14: warning: unused variable ‘v’ [-Wunused-variable]
real v=0;
^
/home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c: In function ‘BilinearSamplerBCHW_updateGradInput’:
/home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:441:14: warning: unused variable ‘inBottomRight’ [-Wunused-variable]
real inBottomRight=0;
^
/home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:440:14: warning: unused variable ‘inBottomLeft’ [-Wunused-variable]
real inBottomLeft=0;
^
/home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:439:14: warning: unused variable ‘inTopRight’ [-Wunused-variable]
real inTopRight=0;
^
/home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:438:14: warning: unused variable ‘inTopLeft’ [-Wunused-variable]
real inTopLeft=0;
^
/home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.c:437:14: warning: unused variable ‘v’ [-Wunused-variable]
real v=0;
^
gcc -pthread -B /home/huangfu/anaconda3/envs/cascade-rcnn/compiler_compat -Wl,--sysroot=/ -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/huangfu/anaconda3/envs/cascade-rcnn/include/python2.7 -c /home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop_cuda.c -o ./home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop_cuda.o
gcc -pthread -shared -B /home/huangfu/anaconda3/envs/cascade-rcnn/compiler_compat -L/home/huangfu/anaconda3/envs/cascade-rcnn/lib -Wl,-rpath=/home/huangfu/anaconda3/envs/cascade-rcnn/lib -Wl,--no-as-needed -Wl,--sysroot=/ ./_roi_crop.o ./home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop.o ./home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop_cuda.o /home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop_cuda_kernel.cu.o -L/home/huangfu/anaconda3/envs/cascade-rcnn/lib -lpython2.7 -o ./_roi_crop.so
gcc: error: /home/huangfu/github/cascade-rcnn_Pytorch/lib/model/roi_crop/src/roi_crop_cuda_kernel.cu.o: 没有那个文件或目录
Traceback (most recent call last):
File "build.py", line 35, in
ffi.build()
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/init.py", line 164, in build
_build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/torch/utils/ffi/init.py", line 100, in _build_extension
ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/cffi/api.py", line 723, in compile
compiler_verbose=verbose, debug=debug, **kwds)
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/cffi/recompiler.py", line 1526, in recompile
compiler_verbose, debug)
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/cffi/ffiplatform.py", line 22, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "/home/huangfu/anaconda3/envs/cascade-rcnn/lib/python2.7/site-packages/cffi/ffiplatform.py", line 58, in _build
raise VerificationError('%s: %s' % (e.class.name, e))
cffi.VerificationError: LinkError: command 'gcc' failed with exit status 1

Can someone find me? thanks

Runtime Error

The training of cascade rcnn (4 GPUs) is going well until suddenly this autograd error comes up.

Traceback (most recent call last):
File "trainval_net.py", line 375, in
loss.backward()
File "/home/ksuresh/.conda/envs/pytorch0.3/lib/python2.7/site-packages/torch/autograd/variable.py", line 167, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, retain_variables)
File "/home/ksuresh/.conda/envs/pytorch0.3/lib/python2.7/site-packages/torch/autograd/init.py", line 99, in backward
variables, grad_variables, retain_graph)
RuntimeError: torch/csrc/autograd/input_buffer.cpp:14: add: Assertion pos >= 0 && pos < buffer.size() failed.

Can you please help me to solve this issue? @guoruoqian

numpy edition problem

2018-08-26 19-41-27
As you can see ,I already install the numpy but the import error happened .I don't why, my torch version is 0.3.1 ,can you give me some suggestions? like your numpy version .
Thanks a lot

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.