kornia
kornia copied to clipboard
feat: `connected_components` metric stop case when `num_iterations=0`
Changes
The function connected_components
now supports num_iterations
equals to zero, in this case the algorithm runs until convergence.
Type of change
- [x] ๐ Documentation Update
- [x] ๐งช Tests Cases
- [x] ๐ฌ New feature (non-breaking change which adds functionality)
- [x] ๐ This change requires a documentation update
Checklist
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] Did you update CHANGELOG in case of a major change?
any update?
as part of https://github.com/kornia/kornia/discussions/2719 plan, we have deleted the master
in favor of main
, if anyone has an interest in keep/restart working on this, let me know to help you.
I'd be happy to continue working on this pr. The only problem is that I didn't understant the issue mentioned by @edgarriba and how it affects the algorithm.
my main concern is that with this batch implementation each sample of the batch will have different convergence rates, and there's no way in pytorch control the flow per element in the batch. That's why i'm suggesting to revert the core to a non-batched implementation.