Skip to content

Conversation

@yonigozlan
Copy link
Member

What does this PR do?

As the title says

@yonigozlan yonigozlan requested a review from molbap October 16, 2025 19:43
@HuggingFaceDocBuilderDev

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.

Copy link
Contributor

@molbap molbap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool! left minor comments

Whether to convert the image to grayscale. Can be overridden by `do_grayscale` in the `preprocess` method.
"""

do_grayscale: bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

convert_to_grayscale maybe?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed it's better but it would be breaking BC :(

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true true

Comment on lines +98 to +100
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😩

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is still a problem, but better to keep it just in case

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah not a big issue, it's just funny to see

@github-actions
Copy link
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: auto, lightglue

@yonigozlan
Copy link
Member Author

Thanks for the review @molbap ! It should be good now :)

@yonigozlan yonigozlan requested a review from molbap October 17, 2025 15:31
Copy link
Contributor

@molbap molbap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true true

Comment on lines +98 to +100
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah not a big issue, it's just funny to see

Comment on lines +232 to +239
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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's cool

@yonigozlan yonigozlan merged commit 2e67a9b into huggingface:main Oct 21, 2025
22 checks passed
ngazagna-qc pushed a commit to ngazagna-qc/transformers that referenced this pull request Oct 23, 2025
* add fast image processor skel

* add working lightglue fast image processor + tests

* remove plot_keypoint_matching
i3hz pushed a commit to i3hz/transformers that referenced this pull request Oct 30, 2025
* add fast image processor skel

* add working lightglue fast image processor + tests

* remove plot_keypoint_matching
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants