Downloads · 30 days
0
zyuzuguldu/garment-segmentation-unet-resnet50
garment-segmentation-unet-resnet50 is a image segmentation model from zyuzuguldu. Use it for the image segmentation task on the model card, and read the license before you ship it in a product. It is set up for pytorch. The card lists the license as apache-2.0.
This model performs binary segmentation to extract upper-body garments and clothing items from images. It was trained on the DeepFashion2 dataset using the Unet architecture with a resnet50 encoder.
Downloads · 30 days
0
Access
Public
Updated Jan 12, 2026
Parameters
32.6M
521 MB on disk
Likes
0
Public
Click a slice to open those files.
.ckpt391 MB · 75%
From the Hugging Face model README
This model performs binary segmentation to extract upper-body garments and clothing items from images. It was trained on the DeepFashion2 dataset using the Unet architecture with a resnet50 encoder.
import torch
import segmentation_models_pytorch as smp
from safetensors.torch import load_file
# Load the model
model = smp.Unet(
encoder_name="resnet50",
classes=1,
activation=None,
decoder_channels=(256, 128, 64, 32, 16)
)
# Load weights from safetensors
state_dict = load_file("model.safetensors")
model.load_state_dict(state_dict)
model.eval()
# Use for inference
with torch.no_grad():
prediction = model(input_image) # Input: (B, 3, 768, 768)
mask = torch.sigmoid(prediction) > 0.5 # Binary mask
This model is designed for virtual try-on applications, fashion image editing, and garment extraction tasks.