robustTemplateMatching icon indicating copy to clipboard operation
robustTemplateMatching copied to clipboard

Major detection bugs fixed

Open Arka161 opened this issue 3 years ago • 5 comments

The changes are as follows:

  1. NCC_part had a tendency to go out of index in some type of images. That has been fixed using edge case checkers.
  2. Added an option to provide a manual threshold during the commandline argument.
  3. Added Cython error fixed command in the README.md file. This will help us build the Cython files in modern Python renditions.
  4. Re-factored code.
  5. Avoided potential issues of running into NaNs by adding an eps during matrix/tensor operations.

Credits: Some of the code has been taken from this repository, and I have cleaned it, and done extensive manual QA testing.

Thank you, Arka Mukherjee

Arka161 avatar Jun 16 '21 17:06 Arka161

Dude, you've done a great work! Met the same problem, and your changes work perfectly.

(ps: Do you know any other great template matching methods for multi-modal images or have you made some improvements to this repo? The code in this repo still have dozens of pixel offset when using my datasets.

Sly-Guo avatar Jun 23 '21 09:06 Sly-Guo

@Sly-Guo Thanks for the feedback and for testing the code.

QATM a little more robust. @kamata1729 has another repo with QATM. This particular paper uses NCC, which has caveats as highlighted in the algorithm as we do generic correlation after extracting features from a CNN, so there are the same downsides with the regular correlation process.

Arka161 avatar Jun 23 '21 16:06 Arka161

@Sly-Guo The threshold is configurable now too with my bug fixes, that could help (it was locked before).

Arka161 avatar Jun 23 '21 16:06 Arka161

Got it! Thanks a lot for your work!

Sly-Guo avatar Jun 24 '21 01:06 Sly-Guo

@Arka161 tried QATM (and also thanks your PR in that repo, it really helps), while the results is worse than this robustTemplateMatching. Maybe it's because QATM won't work well on multi-modal images? (considering that my data are multi-modal

Sly-Guo avatar Jun 26 '21 07:06 Sly-Guo