Repository navigation
RandCropByPosNegLabel: Random location #2115
Replies: 8 comments
|
Hi @lukasfolle , Thanks for raising this up. Thanks. |
|
i think this could be achieved by providing a dilated version of the original foreground as the sampling candidate locations (label_key). it’s slightly different from #586 |
|
@wyli Could you elaborate on "dilated version of the original foreground as the sampling candidate locations"? I had the following in mind:
Please let me know what you think of this proposal. |
|
yes, to achieve the same without modifying the transform:
|
|
I agree on 1., but why should the spatial_size be changed in any way? If we choose k appropriately (depending on foregorund extent), shouldn´t the spatial_size be kept the same? |
|
sure, dilation k and spatial size are free parameters here, I just wanted to set them in this particular relation so that the sampling roughly achieves "not to be sampled in a centered way, but randomly in the patch." |
|
@wyli Do you have some code working already? |
|
bump |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem? Please describe.
I noticed that
RandCropByPosNegLabelalways crops objects with the foreground pixels being in the center.Describe the solution you'd like
To get more variance into this transformation, I think it would be nice to have a flag indicating that the foreground voxel has not to be sampled in a centered way, but randomly in the patch. Especially for segmentation task with very few foreground voxels this would make sense IMO.
I am not entirely sure how that would affect model experiements but I would like to find out in case this gets implemented.
BTW: I absolutely love the functionality that this transformation already has!
All reactions