Shortcuts

raft_small

torchvision.models.optical_flow.raft_small(*, weights: Optional[Raft_Small_Weights] = None, progress=True, **kwargs) RAFT[source]

RAFT “small” model from RAFT: Recurrent All Pairs Field Transforms for Optical Flow.

Please see the example below for a tutorial on how to use this model.

Parameters:
  • weights (Raft_Small_Weights, optional) – The pretrained weights to use. See Raft_Small_Weights below for more details, and possible values. By default, no pre-trained weights are used.

  • progress (bool) – If True, displays a progress bar of the download to stderr. Default is True.

  • **kwargs – parameters passed to the torchvision.models.optical_flow.RAFT base class. Please refer to the source code for more details about this class.

class torchvision.models.optical_flow.Raft_Small_Weights(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

The metrics reported here are as follows.

epe is the “end-point-error” and indicates how far (in pixels) the predicted flow is from its true value. This is averaged over all pixels of all images. per_image_epe is similar, but the average is different: the epe is first computed on each image independently, and then averaged over all images. This corresponds to “Fl-epe” (sometimes written “F1-epe”) in the original paper, and it’s only used on Kitti. fl-all is also a Kitti-specific metric, defined by the author of the dataset and used for the Kitti leaderboard. It corresponds to the average of pixels whose epe is either <3px, or <5% of flow’s 2-norm.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources