LibreRAFTl-flow-kitti
RAFT (large, 5.3M parameters) optical flow, upstream checkpoint raft-kitti.pth, repackaged for LibreYOLO.
Training schedule: the Sintel model further fine-tuned on KITTI 2015.
from libreyolo import LibreYOLO
model = LibreYOLO("LibreRAFTl-flow-kitti.pt")
r = model(["frame_000.png", "frame_001.png"])[0]
r.flow.data # (H, W, 2) float32, (dx, dy) in pixels, frame 0 to frame 1
r.flow.to_rgb() # Middlebury colour wheel
Inference runs at native resolution, padded to a multiple of 8 as upstream
InputPadder, with 20 refinement iterations (upstream demo.py).
Source
Derived from princeton-vl/RAFT
at commit 2888e15, file raft-kitti.pth from the release models.zip
(sha256 b9d170362415e1a27bd8402ee966a3ddf0d60df9b2df2c0b4949f5ced490a9e6).
Copyright (c) 2020, princeton-vl. Licensed under the BSD 3-Clause License.
Modifications
The DataParallel module. key prefix is stripped and LibreYOLO checkpoint
metadata is added (task: flow). Learned parameters are unchanged. See
weights/convert_raft_weights.py in the
LibreYOLO source repository.
On 9 Sintel demo pairs (1024x436) the LibreYOLO output matches upstream
RAFT bit for bit in fp32 (max abs difference 0.0 px).
License
BSD 3-Clause License. See the LICENSE and
NOTICE files in this repository.