-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only 2D tensor for erosion? #10
Comments
I am very happy that this library is useful for you. |
Actually, I am trying to implement the following paper [1] and extend it to 2D (actually, 4D for using them with a batch of RGB images). I have tried implementing using unfold and as you have said it takes a huge amount of memory. So, next, I tried using the function implemented in Kornia. The memory usage has improved but the computation is still slow. It is expected to be slower than convs, because they have been heavily optimized over the years. So, I am thinking of using your implementation. But the modification is required to implement the 'soft' version of dilation and erosion. Now about the code. I think I have guessed wrong. So, you are currently moving all the operations to C++. The main aim is not to make them a single module. Am I right? Since I need a little modification to the existing operation, I thought, Ok let's help make this library better. Can you tell me about the current state of code? Actually, I am confused why you removed the working code and started doing things from the scratch again. [1] Mondal, Ranjan, et al. "Morphological Network: How Far Can We Go with Morphological Neurons?." arXiv preprint arXiv:1901.00109 (2019). |
I think it is cool to implement new versions of these operations. I am checking the paper. Regarding the code: I don't know if I explained it correctly. I want to have all operations implemented in C++/CUDA (C++ for CPU and CUDA for GPU). I want also to split the operations in modules, depending on the expected input/output (greyscale/binary). Also, if you want new type of operations we can put them in other modules. With respect with the removed code, I think I did that a bit chaotically; a better approach would have been to create a new branch. We can try to do that to let a stable version with older implementations. Finally, I think that we might meet such that we can coordinate better. My mail is [email protected] (once you get it I will edit this answer to remove it). Thank you again for the interest. |
Ok, I get it you mainly want to streamline things. |
First of all, thank you for putting in the effort to build a PyTorch library for morphological operations and that too with CUDA support. So, I was thinking of using the library for my research. But what I am seeing is that in the code of the master branch the comment says the erosion supports only 2D tensor. Is this the current situation?
By looking at the old commits, I understood is, the previous version had all the functions but it required a separate module morphology_cuda to use the CUDA functionality and you are trying to merge that into a single module. If so, may I help you with this? Actually, my work requires a modification to the dilation and erosion operations. I had earlier implemented them for TensorFlow, but now I need them in PyTorch and modifying your code should be easier.
The text was updated successfully, but these errors were encountered: