Manza12/nnMorpho

[Feature Request] Wishlist

Closed this issue · 8 comments

s-rog commented
  • Support batch and channels

    const auto input_width = input_tensor.size(0);
    const auto input_height = input_tensor.size(1);

  • Support AMP/FP16

    const torch::PackedTensorAccessor32<float,2,torch::RestrictPtrTraits> input_tensor,
    const torch::PackedTensorAccessor32<float,2,torch::RestrictPtrTraits> strel_tensor,

Definitely. I will work on this soon.

The last release (version 1.1.0) supports batchs and channels.

Regarding the AMP/FP16, I will work on it soon, but I am not familiar with the concept, so I don't know how much time it will take.

Are you interested on other features?

By the way, can you tell me for which purpose are you using nnMorpho? I am curious :-)

In my case, I am developping it for image processing of music spectrograms. I work in the IRCAM in Paris for the STMS lab.

Lastly, can you tell me which modules are you using? For the moment, operations.py is working good but functions.py does not backpropagate gradients correctly.

s-rog commented

I'm currently using the functions (apply) and testing out morphology as a segmentation mask post processing step.

Will test out the new version soon, thanks!

Edit:
tried switching to operations but I'm not getting any gradients...

s-rog commented

Also perhaps erosion and dilation code can be combined? since erode(x) == -dilate(-x) and vice versa.

Operations doesn't have gradients, this is why I created functions. Currently functions doesn't work properly in batched color images since the gradients I get are not the ones I am supposed to get.
I will try to correct this soon; I am working on it now but I don't understand why it doesn't work properly.
I will update when functions will work.
Regarding combining erosion and dilation, it is a good idea, I will work on it when possible.

s-rog commented

Also noticing that when doing opening and closing, only the latter operation/strel gets gradients

I will work now on the functions apply such that the gradients will work properly

I will open issues for each of your requests such that the information will be more modularized

I will close this issue because I have created new issues for your requests:

  • #7 for the opening and closing not having gradients
  • #6 for the support of AMD/FP16
  • #8 for having the good gradients in batched color images

Please open a new issue when you need a new feature or to report an issue.