KeyError: 'boxes'
deyiwang89 opened this issue · 2 comments
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
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 datasetvoc_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.somy environment is: Ubuntu 16.04 cuda8.0 pytorch0.4.0 gcc 5.3
I have the same problem. Have you solved it? Can you teach me?
I solve this by deleting '.pkl' files in '/cascade-rcnn_Pytorch/data/cache/' before training.