-
Notifications
You must be signed in to change notification settings - Fork 14
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
ADD: ConnectedComponentsLabeling Box operation #31
Conversation
Hey Stephane, wow, great work! CCL is one of the most challenging "basic" operations. As you mentioned the missing tests: One of the tests was also missing on python side. I just added it and took the oportunity to rename the function "flag_existing_intensities" to " flag_existing_labels" because that describes better what it's doing. Would you mind renaming it on CLIc side as well? Furthermore, if you need help with implementing tests and / or specific kernels, let me know! After implementing 400 of them, I became quite efficient. ;-) Furthermore, I'm still searching for the student who implements kernels for earning money. Stay tuned! Cheers, |
No issue for the re-naming :). However, don't If you saw yet but this PR is dependent on a .cl renaming on the CLIj side. Otherwise it will not work (hence the build fail on MacOS). |
Change FlagExistingIntensitiesKernel to FlagExistingLabelsKernel. The kernel is still named flag_exisinting_intensities_x.cl in clij_opencl_kernel repo. The PR and CLIc will fail until this is fix :) |
also set column test is not missing anymore. still missing:
|
All test added. However, I have some doubt on the blocksize parameter used in BlockEnumerateKernel and in SumReductionKernel. Final check should be on the gateway method name and parameters order fitting the CLIj2 and pyclesperanto method name and parameters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @StRigaud ,
first of all: Happy New Year!
My blocksize value must be >= to my array size otherwise the tests fails.
That's suspicious. The idea of the blocksize is to be smaller than the array size. It might be my mistake again, I had this error earlier. :-(
This change:
clEsperanto/pyclesperanto_prototype@0fcbe1c
Didn't make it to the clij-opencl-kernels repository:
https://github.com/clEsperanto/clij-opencl-kernels/blob/master/src/main/java/net/haesleinhuepf/clij/kernels/block_enumerate.cl#L15
I urgently need to figure out how to use git submodules and restructure how the kernels go into pyclesperanto. Stay tuned. I will do this asap.
I've left some more comments below.
Thanks for again for your great work! I'm really happy to see CLIc evolving.
Add reviews modification to the PR. No issues. For the blocksize:
blocksize = 4 Again, if blocksize is high enough, all is good I need to check the code to be sure, I swith the PR to draft again. |
Hey @StRigaud .
In the python version of the block_enumerate test, the sum_reduction is used. See here I attempted to fix this and sent you a PR. I can't test it (Fail to create kernel (CL_INVALID_KERNEL_NAME)) I assume this has something to do with my lack of training when it comes to git submodules...
I checked this test and have a suspicion: The output has fixed size [1,1,1]. However, it's supposed to have size I think these issues are related to lack of documentation caused by me. I promise to improve. Let me know if this helps! Cheers, |
Oh, and one more thing: the |
I haven't seen that sum_reduction_x was used in the block_enumerate test! I need to recheck the code for both and their corresponding tests. Will do the renaming at the same time! And do not worry about the lack of training, we will fix that soon |
Thanks for the help, all work fine. |
All checks out! 🥇 |
Add the connected components labelling box to CLIc and the other operation required to make it run.
The main classes do not rely on .cl files but calls various other kernel operation:
To runs those two operation, the following kernels were implemented:
This required a minor modification of some .cl filename requested here
I will see to add missing tests before merge. Feedback and review are welcome. Code isn't the most clean sorry :)
Message for futur me: "wrong" data type used in kernel can lead to unstable results. Further investigation and fixing may be required.