MIC-DKFZ / medicaldetectiontoolkit

The Medical Detection Toolkit contains 2D + 3D implementations of prevalent object detectors such as Mask R-CNN, Retina Net, Retina U-Net, as well as a training and inference framework focused on dealing with medical images.
Apache License 2.0
1.31k stars 297 forks source link

Anchors not centered in generate_anchors_3D? #71

Open hubtub2 opened 5 years ago

hubtub2 commented 5 years ago

I think there is a bug in generate_anchors_3D. The anchors were note centered relativ to the feature map, but shifted to the left.

I fixed this by adding " feature_stride_xy/2":

shifts_y = np.arange(0, shape[0], anchor_stride) * feature_stride_xy + feature_stride_xy/2 shifts_x = np.arange(0, shape[1], anchor_stride) * feature_stride_xy + feature_stride_xy/2 shifts_z = np.arange(0, shape[2], anchor_stride) * (feature_stride_z) + feature_stride_z/2

zengjianyou commented 3 years ago

yes ,i think so

zengjianyou commented 3 years ago

@hubtub2 I got a lot of 3d anchors, but the actual gt overlap of the anchor is very little .why ?