Open JiaminRen opened 3 years ago
https://github.com/MIC-DKFZ/nnDetection/blob/3416b80cc90346349951dcc805b260f72b80fc16/nndet/io/transforms/instances.py#L126 Plus one and minus one may exceed the image boundary.
Hi @JiaminRen ,
the transformation intends to provide a generic bounding box representation and no special handling of image borders is done here on purpose, i.e. if the object starts at index 0 of the image, the network is expected to output a bounding box starting at -1 (the same principle applies to the other image borders as well).
Clipping to 0 would introduce an ambiguity because objects starting at index 1 and at index 0 would be mapped to a bounding box starting at 0. Removing +-1 is also difficult since this could lead to objects with 0 sizes. As a result, we used the above rule without clipping or any other modification.
There is an inconsistency in the detection postprocessing which I'll fix after the first release was tagged. The detection network outputs are currently clipped at 0 during inference, which needs to be corrected to -1. The performance difference should be rather small though.
(the corresponding line of code for the 3D case) https://github.com/MIC-DKFZ/nnDetection/blob/3416b80cc90346349951dcc805b260f72b80fc16/nndet/core/boxes/clip.py#L95-L100
Best, Michael
This issue is stale because it has been open for 30 days with no activity.
:skull: Bug
Environment
Please provide some information about the used environment.
How was nnDetection installed [
docker
|source
]:Environment Information:
If necessary, please provide the used run command with all overwrites: