smp-hub / upernet-convnext-tiny

huggingface.co
Total runs: 65
24-hour runs: 0
7-day runs: 7
30-day runs: 53
Model's Last Updated: April 13 2025
image-segmentation

Introduction of upernet-convnext-tiny

Model Details of upernet-convnext-tiny

UPerNet Model Card

Table of Contents:

Load trained model

Open In Colab

  1. Install requirements.
pip install -U segmentation_models_pytorch albumentations
  1. Run inference.
import torch
import requests
import numpy as np
import albumentations as A
import segmentation_models_pytorch as smp

from PIL import Image

device = "cuda" if torch.cuda.is_available() else "cpu"

# Load pretrained model and preprocessing function
checkpoint = "smp-hub/upernet-convnext-tiny"
model = smp.from_pretrained(checkpoint).eval().to(device)
preprocessing = A.Compose.from_pretrained(checkpoint)

# Load image
url = "https://huggingface.co/datasets/hf-internal-testing/fixtures_ade20k/resolve/main/ADE_val_00000001.jpg"
image = Image.open(requests.get(url, stream=True).raw)

# Preprocess image
np_image = np.array(image)
normalized_image = preprocessing(image=np_image)["image"]
input_tensor = torch.as_tensor(normalized_image)
input_tensor = input_tensor.permute(2, 0, 1).unsqueeze(0)  # HWC -> BCHW
input_tensor = input_tensor.to(device)

# Perform inference
with torch.no_grad():
    output_mask = model(input_tensor)

# Postprocess mask
mask = mask.argmax(1).cpu().numpy()  # argmax over predicted classes (channels dim)
Model init parameters
model_init_params = {
    "encoder_name": "tu-convnext_tiny.in12k_ft_in1k",
    "encoder_depth": 5,
    "encoder_weights": None,
    "decoder_channels": 512,
    "decoder_use_norm": "batchnorm",
    "in_channels": 3,
    "classes": 150,
    "activation": None,
    "upsampling": 4,
    "aux_params": None
}
Dataset

Dataset name: ADE20K

More Information

This model has been pushed to the Hub using the PytorchModelHubMixin

Runs of smp-hub upernet-convnext-tiny on huggingface.co

65
Total runs
0
24-hour runs
1
3-day runs
7
7-day runs
53
30-day runs

More Information About upernet-convnext-tiny huggingface.co Model

More upernet-convnext-tiny license Visit here:

https://choosealicense.com/licenses/mit

upernet-convnext-tiny huggingface.co

upernet-convnext-tiny huggingface.co is an AI model on huggingface.co that provides upernet-convnext-tiny's model effect (), which can be used instantly with this smp-hub upernet-convnext-tiny model. huggingface.co supports a free trial of the upernet-convnext-tiny model, and also provides paid use of the upernet-convnext-tiny. Support call upernet-convnext-tiny model through api, including Node.js, Python, http.

upernet-convnext-tiny huggingface.co Url

https://huggingface.co/smp-hub/upernet-convnext-tiny

smp-hub upernet-convnext-tiny online free

upernet-convnext-tiny huggingface.co is an online trial and call api platform, which integrates upernet-convnext-tiny's modeling effects, including api services, and provides a free online trial of upernet-convnext-tiny, you can try upernet-convnext-tiny online for free by clicking the link below.

smp-hub upernet-convnext-tiny online free url in huggingface.co:

https://huggingface.co/smp-hub/upernet-convnext-tiny

upernet-convnext-tiny install

upernet-convnext-tiny is an open source model from GitHub that offers a free installation service, and any user can find upernet-convnext-tiny on GitHub to install. At the same time, huggingface.co provides the effect of upernet-convnext-tiny install, users can directly use upernet-convnext-tiny installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

upernet-convnext-tiny install url in huggingface.co:

https://huggingface.co/smp-hub/upernet-convnext-tiny

Url of upernet-convnext-tiny

upernet-convnext-tiny huggingface.co Url

Provider of upernet-convnext-tiny huggingface.co

smp-hub
ORGANIZATIONS

Other API from smp-hub

huggingface.co

Total runs: 39
Run Growth: 23
Growth Rate: 60.53%
Updated:January 16 2025
huggingface.co

Total runs: 18
Run Growth: -1
Growth Rate: -7.14%
Updated:January 16 2025