Skip to content
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

Bump segmentation-models-pytorch from 0.3.4 to 0.4.0 in /requirements #2506

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 8, 2025

Bumps segmentation-models-pytorch from 0.3.4 to 0.4.0.

Release notes

Sourced from segmentation-models-pytorch's releases.

Segmentation Models - v0.4.0

New models

Segformer

contributed by @​brianhou0208

Originally, SegFormer is a transformer-based semantic segmentation model known for its simplicity and efficiency. It uses a lightweight hierarchical encoder to capture multi-scale features and a minimal decoder for fast inference.

With segmentation-models-pytorch you can utilize the model with a native Mix Vision Transformer encoder as long as with 800+ other encoders supported by the library. Original weights are also supported and can be loaded as follows:

import segmentation_models_pytorch as smp
model = smp.from_pretrained("smp-hub/segformer-b5-640x640-ade-160k")

or with any other encoder:

import segmentation_models_pytorch as smp
model = smp.Segformer("resnet34")

See more checkpoints on the HF Hub.

UperNet

contributed by @​brianhou0208

UPerNet (Unified Perceptual Parsing Network) is a versatile semantic segmentation model designed to handle diverse scene parsing tasks. It combines a Feature Pyramid Network (FPN) with a Pyramid Pooling Module (PPM) to effectively capture multi-scale context.

import segmentation_models_pytorch as smp
model = smp.UPerNet("resnet34")

New Encoders

Thanks to @​brianhou0208 contribution 800+ timm encoders are now supported in segmentation_models.pytorch. New modern encoders like convnext, efficientvit, efficientformerv2, hiera, mambaout and more can be used as easy as:

import segmentation_models_pytorch as smp
</tr></table>

... (truncated)

Commits
  • 12f8394 Release 0.4.0 (#1025)
  • d230460 chore (segformer): move decoder converter scripts (#1017)
  • 96e4604 chore (ci): adopt astral-sh actions (#1014)
  • 9320918 Merge pull request #1023 from qubvel-org/dependabot/pip/requirements/huggingf...
  • c2409a1 Bump huggingface-hub from 0.27.0 to 0.27.1 in /requirements
  • 8a3ef9e Bump ruff from 0.8.5 to 0.8.6 in /requirements (#1022)
  • 2abfabb Merge pull request #1020 from qubvel-org/dependabot/pip/requirements/ruff-0.8.5
  • 62f139c Merge pull request #1021 from qubvel-org/dependabot/pip/requirements/pillow-1...
  • daf6b43 Bump pillow from 11.0.0 to 11.1.0 in /requirements
  • 1e7ecbb Bump ruff from 0.8.4 to 0.8.5 in /requirements
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Packaging and dependencies python Pull requests that update Python code labels Jan 8, 2025
dependabot bot and others added 2 commits January 11, 2025 14:46
Bumps [segmentation-models-pytorch](https://github.com/qubvel-org/segmentation_models.pytorch) from 0.3.4 to 0.4.0.
- [Release notes](https://github.com/qubvel-org/segmentation_models.pytorch/releases)
- [Commits](qubvel-org/segmentation_models.pytorch@v0.3.4...v0.4.0)

---
updated-dependencies:
- dependency-name: segmentation-models-pytorch
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@adamjstewart adamjstewart force-pushed the dependabot/pip/requirements/segmentation-models-pytorch-0.4.0 branch from baadeae to 59fe2fa Compare January 11, 2025 13:47
@github-actions github-actions bot added models Models and pretrained weights testing Continuous integration testing trainers PyTorch Lightning trainers scripts Training and evaluation scripts labels Jan 11, 2025
@adamjstewart
Copy link
Collaborator

@adamjstewart
Copy link
Collaborator

@adamjstewart
Copy link
Collaborator

@isaaccorley @RitwikGupta can you check the Scale-MAE changes? A lot of the code makes type assumptions that may or may not be valid.

@adamjstewart adamjstewart added this to the 0.6.3 milestone Jan 11, 2025
@isaaccorley
Copy link
Collaborator

isaaccorley commented Jan 11, 2025

I checked the ViT implementation in timm again and this is fine. Seems like unless a user explicitly passes args to have no pos_embed or cls_token then this will function as usual. If a user does pass these args then the checkpoint wouldn't load correctly anyway and raise an error because it would be missing these parameters.

@adamjstewart
Copy link
Collaborator

In DOFA we force the required kwargs to be what is needed to load the weights. Could also do that here. Note that some people may want to use the model without weights (for some reason) and that should work too. I tried to make it as flexible as possible instead of forcing it to match the defaults via asserts.

@adamjstewart adamjstewart merged commit c5bdb79 into main Jan 20, 2025
19 checks passed
@adamjstewart adamjstewart deleted the dependabot/pip/requirements/segmentation-models-pytorch-0.4.0 branch January 20, 2025 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Packaging and dependencies models Models and pretrained weights python Pull requests that update Python code scripts Training and evaluation scripts testing Continuous integration testing trainers PyTorch Lightning trainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants