Add LightGlue fast image processor#41670
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
molbap
left a comment
There was a problem hiding this comment.
cool! left minor comments
| Whether to convert the image to grayscale. Can be overridden by `do_grayscale` in the `preprocess` method. | ||
| """ | ||
|
|
||
| do_grayscale: bool |
There was a problem hiding this comment.
convert_to_grayscale maybe?
There was a problem hiding this comment.
Agreed it's better but it would be breaking BC :(
| This function is supposed to return a 1-channel image, but it returns a 3-channel image with the same value in each | ||
| channel, because of an issue that is discussed in : | ||
| https://github.com/huggingface/transformers/pull/25786#issuecomment-1730176446 |
There was a problem hiding this comment.
Not sure if this is still a problem, but better to keep it just in case
There was a problem hiding this comment.
yeah not a big issue, it's just funny to see
|
[For maintainers] Suggested jobs to run (before merge) run-slow: auto, lightglue |
|
Thanks for the review @molbap ! It should be good now :) |
molbap
left a comment
There was a problem hiding this comment.
Alright, looks good to me! Nice work!
| Whether to convert the image to grayscale. Can be overridden by `do_grayscale` in the `preprocess` method. | ||
| """ | ||
|
|
||
| do_grayscale: bool |
| This function is supposed to return a 1-channel image, but it returns a 3-channel image with the same value in each | ||
| channel, because of an issue that is discussed in : | ||
| https://github.com/huggingface/transformers/pull/25786#issuecomment-1730176446 |
There was a problem hiding this comment.
yeah not a big issue, it's just funny to see
| class LightGlueImageProcessorFast(SuperGlueImageProcessorFast): | ||
| def post_process_keypoint_matching( | ||
| self, | ||
| outputs: LightGlueKeypointMatchingOutput, | ||
| target_sizes: Union[TensorType, list[tuple]], | ||
| threshold: float = 0.0, | ||
| ) -> list[dict[str, torch.Tensor]]: | ||
| return super().post_process_keypoint_matching(outputs, target_sizes, threshold) |
* add fast image processor skel * add working lightglue fast image processor + tests * remove plot_keypoint_matching
* add fast image processor skel * add working lightglue fast image processor + tests * remove plot_keypoint_matching
* add fast image processor skel * add working lightglue fast image processor + tests * remove plot_keypoint_matching
What does this PR do?
As the title says