LibreNeuFlowv2s-flow-things
NeuFlow v2 optical flow weights (the FlyingThings3D training stage (before Sintel / KITTI fine-tuning)), repackaged for LibreYOLO's flow task.
NeuFlow v2 is a 9M-parameter flow network built for edge devices.
Training-data variant things; the canonical checkpoint is LibreNeuFlowv2s-flow.
Source
Weights derived from neuflow_things.pth in
neufieldrobotics/NeuFlow_v2
at commit 204b5e3744461d90303b9ff82caa7a1bb56a2ca2.
Copyright (c) 2024 Zhiyong Zhang, Aniket Gupta, Huaizu Jiang, Hanumant Singh.
Paper: "NeuFlow v2: Push High-Efficiency Optical Flow To the Limit", arXiv:2408.10161.
Modifications
State-dict metadata-wrap only: keys and learned parameters are unchanged; the
checkpoint is wrapped in the LibreYOLO v1.0 schema (task=flow, nc=1,
names={0: "flow"}, variant=things, canvas 432x768). On an
RTX 3090 in fp32 the LibreYOLO model reproduces the upstream NeuFlow module
bit for bit (max absolute difference 0.0 px). See
weights/convert_neuflowv2_weights.py and weights/parity_neuflowv2.py in the
LibreYOLO source repository.
Usage
from libreyolo import LibreYOLO
model = LibreYOLO("LibreNeuFlowv2s-flow-things.pt")
results = model(["frame_000.png", "frame_001.png"]) # N frames in, N - 1 flows out
flow = results[0].flow.data # (H, W, 2) float32, (dx, dy) pixels, original canvas
rgb = results[0].flow.to_rgb() # Middlebury colour wheel
License
Apache License 2.0. Upstream commits this checkpoint in its Apache-2.0
repository without a separate weight licence; LibreYOLO redistributes it under
that repository licence, an implied grant from the releasing project and
LibreYOLO's disclosed interpretation, not one confirmed by the authors. See the
LICENSE and NOTICE files in this repository.