CoolFace
Modelpublic

S-4-G-4-R/clipseg-drywall-qa

sourceHugging Facemitupdated 6mo agoView on Hugging Face
0likes21downloads
Model Card

CLIPSeg — Fine-tuned for Drywall QA

Fine-tuned version of CIDAS/clipseg-rd64-refined for text-conditioned binary segmentation of drywall defects.

Supported Prompts

PromptTarget RegionVal mIoUVal Dice
segment crackWall cracks0.73520.8336
segment taping areaJoint / tape seam0.49850.6256

Training Details

SettingValue
Base modelCIDAS/clipseg-rd64-refined
Epochs20
Batch size4
Learning rate1e-4 (AdamW)
SchedulerCosineAnnealingLR
LossBCE 0.5 + Dice 0.5
Image size352 × 352
Threshold0.5
Seed42
HardwareTesla T4 (Google Colab)
Train time~65.3 min
Avg inference13.0 ms / image

Datasets

Quick Usage

python
import torch
from PIL import Image
from transformers import CLIPSegProcessor, CLIPSegForImageSegmentation

processor = CLIPSegProcessor.from_pretrained("S-4-G-4-R/clipseg-drywall-qa")
model     = CLIPSegForImageSegmentation.from_pretrained("S-4-G-4-R/clipseg-drywall-qa")
model.eval()

image  = Image.open("your_image.jpg").convert("RGB")
prompt = "segment crack"   # or "segment taping area"

inputs = processor(
    text=prompt, images=image,
    return_tensors="pt", padding=True
)

with torch.no_grad():
    logits = model(**inputs).logits

mask = (torch.sigmoid(logits[0]) > 0.5).numpy()   # boolean H×W mask

Test Results (best checkpoint — epoch 15)

Metricsegment cracksegment taping area
mIoU0.6900 (test) / 0.7352 (val)0.4985 (val)
Dice0.7957 (test) / 0.8336 (val)0.6256 (val)