7951 anchors are not centered on grid cells#8475
7951 anchors are not centered on grid cells#8475hachoj wants to merge 4 commits intoProject-MONAI:devfrom
Conversation
Signed-off-by: hachoj <hjchojnowski@gmail.com>
Signed-off-by: hachoj <hjchojnowski@gmail.com>
Signed-off-by: hachoj <hjchojnowski@gmail.com>
|
Hi @hachoj thanks for the contribution, it looks fine to me as far as I can tell. Could you please check that this works with the luna16 tutorial example? If so I think we're good. @Can-Zhao I think you were the original author of this file, any thoughts? |
|
Hi @ericspod I ran a smoke test of the LUNA16 detection tutorial pipeline with this patch applied (MONAI commit 8f6e2c7, PyTorch What was tested:
The full pipeline (data loading → ATSS matching → training → sliding window inference → box post-processing) runs Note: since real LUNA16 data was not used, detection quality metrics are not meaningful here. The test only |
This pull request resolves issue #7951 by correctly centering anchor boxes within their grid cells.
Description
Changes Made:
monai/apps/detection/utils/anchor_utils.pyto add astride // 2offset.tests/apps/detection/utils/test_anchor_box.pyto validate this new, correct behavior against the torchvision baseline by accounting for the offset.Fixes #7951
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests --disttests.make htmlcommand in thedocs/folder.