ravindrakapse/drywall-clipseg
0
drywall-clipseg
CLIPSeg fine-tune (HF CIDAS/clipseg-rd64-refined backbone, decoder + FiLM unfrozen) for prompted binary segmentation on drywall imagery. Single checkpoint covers two classes selected by text prompt:
"segment crack"→ wall-crack mask"segment taping area"→ drywall taping-seam mask
Test metrics (focal_dice loss, threshold 0.6)
Load + predict
from huggingface_hub import hf_hub_download
import torch
from src.models.clipseg_wrapper import CLIPSegFT
ckpt_path = hf_hub_download(repo_id="ravindrakapse/drywall-clipseg", filename="best.pt")
model = CLIPSegFT(pretrained="CIDAS/clipseg-rd64-refined").cuda()
state = torch.load(ckpt_path, map_location="cuda")
model.load_state_dict(state["model"])
model.eval()See `load_models.py` for the full inference pipeline (letterbox + TTA + un-letterbox).
