PL-Stitch / README.md
nielsr's picture
nielsr HF Staff
Add pipeline tag and improve model card
1095d31 verified
|
raw
history blame
2.28 kB
metadata
license: mit
pipeline_tag: image-feature-extraction

PL-Stitch

📚 Paper - 🤖 GitHub

This is the official repository for the CVPR 2026 paper A Stitch in Time: Learning Procedural Workflow via Self-Supervised Plackett-Luce Ranking.

PL-Stitch is an image foundation model that captures visual changes over time, enabling procedural activity understanding. It takes an image as input and produces a feature vector as output, leveraging the novel Plackett-Luce temporal ranking objective to build a comprehensive understanding of both the static semantic information and the procedural context within each frame.

Sample Usage

You can download the checkpoint and run the following code to extract features from your video frames. Note that this requires the pl_stitch package from the GitHub repository.

import torch
import numpy as np
from PIL import Image
from pl_stitch.build_model import build_model

# Load the pre-trained pl_stitch model
# Ensure you have the checkpoint file (e.g., pl_lemon.pth) locally
pl_stitch = build_model(pretrained_weights = 'path/to/pl_lemon.pth')
pl_stitch.eval()

# Load the image and convert it to a PyTorch tensor
img_path = 'path/to/your/image.jpg'
img = Image.open(img_path).convert('RGB')
img = img.resize((224, 224))
img_tensor = torch.tensor(np.array(img)).permute(2, 0, 1).float().unsqueeze(0).to('cuda')

# Extract features from the image
with torch.no_grad():
    outputs = pl_stitch(img_tensor)

Citation

If you use our model or code in your research, please cite our paper:

@misc{che2025stitchtimelearningprocedural,
      title={A Stitch in Time: Learning Procedural Workflow via Self-Supervised Plackett-Luce Ranking}, 
      author={Chengan Che and Chao Wang and Xinyue Chen and Sophia Tsoka and Luis C. Garcia-Peraza-Herrera},
      year={2025},
      eprint={2511.17805},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2511.17805}, 
}