Skip to content

Made label data optional for inference and adopted other required changes #2183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

laxmareddyp
Copy link
Collaborator

@laxmareddyp laxmareddyp commented Mar 31, 2025

Adapted the architecture preprocessor to conform with the current code guidelines and typical model interface.

  • removed call from SegFormerImageSegmenterPreprocessor, perform transformations in the image converter instead
  • adapted convert_segformer_checkpoints.py accordingly

These are the points/bugs changed in segformer_image_segmenter_tests.py:

  • MiTBackbone parameter names were wrong (had not been adapted for [MiT and SegFormer] Refactor Backbone Arg Names #1958)
  • Added label data in train_data for self.run_task_test
  • expected_output_shape in test_task was wrong
  • use self.assertAllEqual instead of plain assert
  • a valid preprocessor needs to be used for self.run_task_test to succeed
  • fixed a wrong input shape in test_segformer_call

@laxmareddyp laxmareddyp added the kokoro:force-run Runs Tests on GPU label Mar 31, 2025
@kokoro-team kokoro-team removed kokoro:force-run Runs Tests on GPU labels Mar 31, 2025
@laxmareddyp laxmareddyp requested a review from abheesht17 April 8, 2025 18:42
Copy link
Collaborator

@sachinprasadhs sachinprasadhs left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants