RuojinCai / doppelgangers

Doppelgangers: Learning to Disambiguate Images of Similar Structures
https://doppelgangers-3d.github.io/
MIT License
178 stars 24 forks source link

Code documentation #10

Closed sfm-user-1 closed 1 month ago

sfm-user-1 commented 1 year ago

Hi, thanks for your work and for sharing the code. I noticed that some of the docstrings don't agree with the function signatures, e.g. an extra df argument

https://github.com/RuojinCai/doppelgangers/blob/43d9eb06f89d882a288644983f877467b741c2f9/doppelgangers/utils/dataset.py#L47

or missing docstrings, e.g. https://github.com/RuojinCai/doppelgangers/blob/main/doppelgangers/utils/loftr_matches.py#L31

Would it be possible to upgrade the code quality, by adding type annotations and docstrings to each function, by formatting the code with a code formatter such as python black, and using a style guide such as Google style guide? (https://google.github.io/styleguide/pyguide.html)

RuojinCai commented 1 month ago

Hello, thank you for your feedback! The code you mentioned includes some adaptations from the LoFTR codebase (reference: LoFTR), and the df argument refers to the division factor (df stands for "division factor", an optional integer that adjusts the image size after resizing). We appreciate your suggestion and will work on improving the code quality.