You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered a problem when using the trained faster_rcnn model to inference a image: roi_pooling_layer.cu:91 Check failed: error == cudaSuccess(9 vs. 0) invalid configuration arguments
reason
I found that the reason is that when the input image is too small (such as(10,10)), faster_rcnn will resize the image to (720, 720).
when inferencing, this image will be passed to proposal_layer.py,but there is no one roi at all.
then crashed .
code
1.roi_pooling layer calls CAFFE_GET_BLOCKS(N)
$CAFFE_ROOT/src/caffe/layers/roi_pooling_layer.cu 84:15 ROIPoolForward<Dtype><<<CAFFE_GET_BLOCKS(count), CAFFE_CUDA_NUM_THREADS>>>( count, bottom_data, spatial_scale_, channels_, height_, width_, pooled_height_, pooled_width_, bottom_rois, top_data, argmax_data);
2.roi_pooling layer will crash when call CAFFE_GET_BLOCKS(0):
in $CAFFE_ROOT/include/caffe/util/device_alternate.hpp 88:43 inline int CAFFE_GET_BLOCKS(const int N) { return (N + CAFFE_CUDA_NUM_THREADS - 1) / CAFFE_CUDA_NUM_THREADS; }
then the CUDA_POST_KERNEL_CHECK will throw error, then crashed.
solution
Assert N > 0, when calls CAFFE_GET_BLOCKS(N) return std::max(1, (N + CAFFE_CUDA_NUM_THREADS - 1) / CAFFE_CUDA_NUM_THREADS);
but this method is not proposed.
Assert at least one proposal for inference
modify $FASTER_RCNN_ROOT/lib/rpn/proposal_layer.py 150 - ,
when len(keep) == 0 if len(keep) == 0: keep = [0]
this method is proposed.
The text was updated successfully, but these errors were encountered:
problem
I encountered a problem when using the trained faster_rcnn model to inference a image:
roi_pooling_layer.cu:91 Check failed: error == cudaSuccess(9 vs. 0) invalid configuration arguments
reason
I found that the reason is that when the input image is too small (such as(10,10)), faster_rcnn will resize the image to (720, 720).
when inferencing, this image will be passed to proposal_layer.py,but there is no one roi at all.
then crashed .
code
1.roi_pooling layer calls CAFFE_GET_BLOCKS(N)
$CAFFE_ROOT/src/caffe/layers/roi_pooling_layer.cu 84:15
ROIPoolForward<Dtype><<<CAFFE_GET_BLOCKS(count), CAFFE_CUDA_NUM_THREADS>>>( count, bottom_data, spatial_scale_, channels_, height_, width_, pooled_height_, pooled_width_, bottom_rois, top_data, argmax_data);
2.roi_pooling layer will crash when call CAFFE_GET_BLOCKS(0):
in $CAFFE_ROOT/include/caffe/util/device_alternate.hpp 88:43
inline int CAFFE_GET_BLOCKS(const int N) { return (N + CAFFE_CUDA_NUM_THREADS - 1) / CAFFE_CUDA_NUM_THREADS; }
then the CUDA_POST_KERNEL_CHECK will throw error, then crashed.
solution
return std::max(1, (N + CAFFE_CUDA_NUM_THREADS - 1) / CAFFE_CUDA_NUM_THREADS);
but this method is not proposed.
modify $FASTER_RCNN_ROOT/lib/rpn/proposal_layer.py 150 - ,
when len(keep) == 0
if len(keep) == 0: keep = [0]
this method is proposed.
The text was updated successfully, but these errors were encountered: