diff --git a/lib/rpn_msr/proposal_target_layer_tf.py b/lib/rpn_msr/proposal_target_layer_tf.py index b092f45..0dc063c 100644 --- a/lib/rpn_msr/proposal_target_layer_tf.py +++ b/lib/rpn_msr/proposal_target_layer_tf.py @@ -165,7 +165,7 @@ def _sample_rois(all_rois, gt_boxes, gt_ishard, dontcare_areas, fg_rois_per_imag # Compute number of background RoIs to take from this image (guarding # against there being fewer than desired) bg_rois_per_this_image = rois_per_image - fg_rois_per_this_image - bg_rois_per_this_image = min(bg_rois_per_this_image, bg_inds.size) + bg_rois_per_this_image = int(min(bg_rois_per_this_image, bg_inds.size)) # Sample background regions without replacement if bg_inds.size > 0: bg_inds = npr.choice(bg_inds, size=bg_rois_per_this_image, replace=False)