kornia icon indicating copy to clipboard operation
kornia copied to clipboard

feat: `connected_components` metric stop case when `num_iterations=0`

Open domef opened this issue 7 months ago โ€ข 1 comments

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?

domef avatar Jan 08 '24 16:01 domef

any update?

domef avatar Feb 21 '24 18:02 domef

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.

johnnv1 avatar Mar 14 '24 22:03 johnnv1

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.

domef avatar Mar 15 '24 08:03 domef

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.

edgarriba avatar Mar 15 '24 09:03 edgarriba