WAFT
WAFT, Warping-Alone Field Transforms, is an optical flow method by Wang and Deng (ICLR 2026). It replaces RAFT's cost volume with high-resolution feature warping and a ViT refinement loop. LibreYOLO ports the upstream code and mirrors its four zero-shot checkpoints, one per feature encoder.
- Tác vụ
- optical flow
- Cài đặt
pip install libreyolo- Bậc hỗ trợ
- Chỉ suy luận, từ v1.8.0. Chỉ dự đoán, kiểm định và xuất. Không áp dụng các tính năng huấn luyện.
- Thượng nguồn
- WAFT của Princeton Vision & Learning Lab, BSD-3-Clause (s, m and l checkpoints); DINOv3 License (t checkpoint). Bài báo, mã nguồn
- Giấy phép
- Mã nguồn BSD-3-Clause, trọng số BSD-3-Clause (s, m and l checkpoints); DINOv3 License (t checkpoint). Sử dụng thương mại
WAFT drops the correlation volume that RAFT and its descendants
build, and instead warps high-resolution features of the second frame with the
current flow estimate before each refinement step. All four checkpoints are
upstream's zero-shot models (TartanAir, then Chairs, then Things). Pick m,
the a1 checkpoint the upstream README recommends for downstream use, unless
you have a reason to choose a specific encoder.
Install
WAFT needs no optional extra. Everything it imports is in the base install.
pip install libreyoloPredict
Weights download from the LibreYOLO Hugging Face organization on first use.
The class LibreWAFT is also exported from libreyolo if you prefer to build the
model directly.
from libreyolo import LibreYOLO model = LibreYOLO("LibreWAFTm-flow.pt") # weights download on first useresults = model(["frame_0001.jpg", "frame_0002.jpg"]) flow = results[0].flowprint(flow.data.shape) # (H, W, 2) float32, (dx, dy) in pixelsprint(flow.mean_magnitude) # mean displacement in pixelsfrom libreyolo import LibreYOLO model = LibreYOLO("LibreWAFTm-flow.pt") # N frames give N - 1 results; result i is the flow from frame i to i + 1.for result in model("video.mp4", stream=True, save=True, save_flow=True): print(result.flow.max_magnitude)libreyolo predict model=LibreWAFTm-flow.pt source=frame_0001.jpg,frame_0002.jpg save=truelibreyolo predict model=LibreWAFTm-flow.pt source=video.mp4 save=true arrows=true save_flow=trueFlow needs at least two frames: a single image raises. A list of images, a
directory sorted by name, a video or a stream is one sequence, and N frames
give N - 1 results. result.flow is a FlowField with an (H, W, 2) float32
array on the original canvas of the first frame; flow.data[y, x] is
(dx, dy) in pixels, +x right and +y down. WAFT fills no confidence map, so flow.confidence is None. result.boxes is
None. save=True writes the Middlebury colour wheel, arrows=True or
warp=True pick the other views, and save_flow=True also writes each pair's
raw field as a .flo file. The optical flow task
page describes the payload and views in full.
Variants
| Size | Upstream checkpoint | Parameters | File |
|---|---|---|---|
t | a2, DINOv3 ViT-S/16 encoder | 56.5 M | LibreWAFTt-flow-dinov3.pt |
s | a2, Depth Anything V2 ViT-S | 56.9 M | LibreWAFTs-flow-dav2.pt |
m | a1, Depth Anything V2 ViT-S | 64.2 M | LibreWAFTm-flow.pt |
l | a2, Twins-SVT-Large encoder | 136.0 M | LibreWAFTl-flow-twins.pt |
The encoder is the weight variant in the file name, and each size exists only
under the name in the table; any other combination raises with the published
name. LibreWAFT defaults to size m. Prediction runs at native resolution:
the network pads the pair to a multiple of 112, 32 or 16 depending on the
encoder and crops the flow back. Five refinement iterations are baked in, the
upstream evaluation default. imgsz caps the long side (default 8192, in
practice no cap).
Training is not offered: train() raises NotImplementedError.
Validate
val() runs the shared flow validator on a flow dataset (frames per sequence
folder, Middlebury .flo, KITTI 16-bit PNG or .npy ground truth; see the
dataset format). It reports the mean
end-point error metrics/epe, metrics/px1 and metrics/px3 (share of valid
pixels under 1 and 3 px of error) and the KITTI outlier rate
metrics/fl_all.
from libreyolo import LibreYOLO model = LibreYOLO("LibreWAFTm-flow.pt")metrics = model.val(data="my_flow.yaml") print(metrics["metrics/epe"]) # mean end-point error, pixelsprint(metrics["metrics/px1"]) # share of pixels under 1 px errorprint(metrics["metrics/fl_all"]) # KITTI outlier ratelibreyolo val model=LibreWAFTm-flow.pt data=my_flow.yamlExport
| Tác vụ | ONNX | TorchScript | ExecuTorch | TensorRT | OpenVINO | Paddle | MNN | RKNN | Axelera | ncnn | TFLite | CoreML | Core AI |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Optical flow | Optical flow to ONNX: không được hỗ trợ | Optical flow to TorchScript: không được hỗ trợ | Optical flow to ExecuTorch: không được hỗ trợ | Optical flow to TensorRT: không được hỗ trợ | Optical flow to OpenVINO: không được hỗ trợ | Optical flow to Paddle: không được hỗ trợ | Optical flow to MNN: không được hỗ trợ | Optical flow to RKNN: không được hỗ trợ | Optical flow to Axelera: không được hỗ trợ | Optical flow to ncnn: không được hỗ trợ | Optical flow to TFLite: không được hỗ trợ | Optical flow to CoreML: không được hỗ trợ | Optical flow to Core AI: không được hỗ trợ |
Export is not available yet for any format. Optical flow export is blocked
until the two-input graph (image1, image2) and the backend vector-rescale
contract of the flow task are implemented for a family.
Checkpoints
Every published weight file for this family.
| Tệp | Giấy phép trọng số |
|---|---|
| Optical flow | |
| LibreWAFTm-flow.pt | bsd-3-clause |
| LibreWAFTt-flow-dinov3.pt | DINOv3 License |
| LibreWAFTs-flow-dav2.pt | bsd-3-clause |
| LibreWAFTl-flow-twins.pt | bsd-3-clause |
Mọi tệp ở trên hiện đều có trong tổ chức LibreYOLO và được tải xuống trong lần sử dụng đầu tiên.
Licensing
Hãy kiểm tra giấy phép trong repo Hugging Face của trọng số cụ thể mà bạn tải xuống. Mỗi checkpoint trong tổ chức LibreYOLO đều có giấy phép riêng và giấy phép có thể khác nhau trong cùng một họ. Repo đó là nguồn có thẩm quyền; phần tóm tắt dưới đây mô tả các điều khoản áp dụng khi trang này được kiểm chứng lần gần nhất.
Đây là phần mô tả các giấy phép liên quan, không phải tư vấn pháp lý. Nếu câu trả lời có ý nghĩa về mặt thương mại, hãy tự đọc các giấy phép và tham khảo cố vấn của riêng bạn.
- Công trình gốc
- WAFT, Princeton Vision & Learning Lab
- Giấy phép thượng nguồn
- BSD-3-Clause (s, m and l checkpoints); DINOv3 License (t checkpoint)
- Nguồn thượng nguồn
- github.com/princeton-vl/WAFT
- Mã nguồn LibreYOLO
- MIT
- Trọng số
- BSD-3-Clause (s, m and l checkpoints); DINOv3 License (t checkpoint), được phát hành lại tại huggingface.co/LibreYOLO
- Diễn giải
- The license depends on the size, because each checkpoint embeds a different encoder. The s, m and l checkpoints are BSD-3-Clause, a permissive license that allows commercial and closed-source use as long as the copyright notice, conditions and disclaimer are kept on redistribution; their encoders are Apache-2.0 (Depth Anything V2 Small for s and m, Twins-SVT-Large from timm for l), which is also permissive. The t checkpoint contains a DINOv3 ViT-S/16 fine-tuned by the WAFT authors, so Meta's DINOv3 License applies to it: a custom license, not OSI-approved, with its own use restrictions and conditions; read it before relying on t commercially. Upstream publishes no separate weight license, so LibreYOLO hosts the checkpoints under the repository's BSD-3-Clause license plus the encoder license. The code from princeton-vl/WAFT at commit b152ff1 is vendored under libreyolo/models/waft/_vendor/ (BSD-3-Clause); the encoders reuse code already in LibreYOLO (Depth Anything V2, Apache-2.0; DINOv3 from the DEIMv2 vendor, DINOv3 License) and a plain-torch Twins copy derived from timm (Apache-2.0). LibreYOLO's wrapper code is MIT. Weights come from the upstream Google Drive model zoo and are mirrored on the LibreYOLO Hugging Face org without gating. Inference only.
WAFT is the work of Wang and Deng at the Princeton Vision & Learning Lab. The upstream code is vendored under its BSD-3-Clause licence. Upstream publishes no separate weight licence, so LibreYOLO mirrors the checkpoints under the repository's BSD-3-Clause licence plus the licence of the encoder each one embeds, without gating.
s,mandlare BSD-3-Clause. Their encoders are Apache-2.0 (Depth Anything V2 Small forsandm, a Twins-SVT-Large copy derived from timm forl). Commercial and closed-source use is allowed.tcontains a DINOv3 ViT-S/16 fine-tuned by the WAFT authors, so Meta's DINOv3 License applies to it: a custom licence, not OSI-approved, with its own use restrictions and trade-control terms. Read it before usingtcommercially.
Citation
@article{wang2025waft,
title={WAFT: Warping-Alone Field Transforms for Optical Flow},
author={Wang, Yihan and Deng, Jia},
journal={arXiv preprint arXiv:2506.21526},
year={2025}
}Được sao chép từ khối trích dẫn của tác giả tại github.com/princeton-vl/WAFT.