DALI icon indicating copy to clipboard operation
DALI copied to clipboard

Generic Warp operation support

Open tvercaut opened this issue 5 years ago • 3 comments

Somehow similarly to #776 I would be interested in exploiting warps beyond affine ones. In particular elastic deformation would be of interest to me. I saw that the repo contains a DisplacementFilter operator which seems generic but it doesn't seem to be exposed in python.

tvercaut avatar Feb 26 '20 22:02 tvercaut

Hi, We plan to implement elastic deformation as it is quite a popular transformation in the medical domain, but I cannot commit to any particular date. Still, we would be more than happy to accept any contribution adding such functionality. Regarding DisplacementFilter although it is flexible internally, it is not easy to expose all of its functionality to the outside. Also, it has some design defects and that is why we are slowly moving to another approach and we don't have any plan to develop DisplacementFilter anymore. @mzient have I missed anything?

JanuszL avatar Feb 27 '20 00:02 JanuszL

WarpPerspective, ElasticTransform and generic warp/remap are related, but qualitatively different. Don't look at DisplacementFilter is a remnant of the old way of doing things - we only use it in some little used operators, whereas the two major ones (WarpAffine and Rotate) use a new approach. We can expose a generic remap which accepts an image and a coordinate map (source sample coordinates for each output pixel) or coordinate offsets, but it needs to be properly planned - it's certainly not a feature we'll have tomorrow.

mzient avatar Feb 27 '20 08:02 mzient

Looking forward to a opencv-like remap function in DALI. It is a very common augmentation operation nowadays. ❤️

santisy avatar Nov 09 '21 08:11 santisy

Hi,

Now you can use the remap operator on the GPU>

JanuszL avatar Jan 24 '24 13:01 JanuszL