Udayraj123 / OMRChecker

Evaluate OMR sheets fast and accurately using a scanner 🖨 or your phone 🤳.
MIT License
752 stars 311 forks source link

[Bug] Feature based alignment not working with sample6 #137

Closed shungiterock closed 1 year ago

shungiterock commented 1 year ago

Describe the bug Unable to get sample6 working with template_fb_align.json FeatureBasedAlignment.py, line 54: in apply_filter matches.sort(key=lambda x: x.distance, reverse=False) TypeError: sort() got an unexpected keyword argument 'key'

Changing line 50 to matches = list(np.array(matcher.match(from_descriptors, self.to_descriptors, None))), makes it run, but yields odd results (screenshot below).

To Reproduce Steps to reproduce the behavior:

  1. Rename template_fb_align.json to template.json
  2. Use command: python3 main.py -i .\samples\sample6 --setLayout

Screenshots image

Desktop:

Udayraj123 commented 1 year ago

Thanks for raising this issue. Looking into it soon!