Camshowrecordings/model/sam_samantha/5 -

# Convert BGR → RGB img_rgb = cv2.cvtColor(img_resized, cv2.COLOR_BGR2RGB)

# ------------------------------------------------------------------ # 5️⃣ Run inference # ------------------------------------------------------------------ def infer(frame: np.ndarray): x = preprocess(frame, cfg) with torch.no_grad(): # The exact call depends on the model; many SAM‑style models return a mask mask = model(x) # → (B, 1, H, W) logits or probabilities # Post‑process: convert logits → binary mask mask = torch.sigmoid(mask) > 0.5 mask_np = mask.squeeze().cpu().numpy().astype(np.uint8) * 255 return mask_np camshowrecordings/model/sam_samantha/5

# 3️⃣ Install dependencies pip install -r requirements.txt If the repo is private, make sure you have the right SSH key or token. 5️⃣ Inspecting the Model Files Navigate to the model folder: # Convert BGR → RGB img_rgb = cv2