ONNX-NeuFlowV2-Optical-Flow

Python scripts performing optical flow estimation using the NeuFlowV2 model in ONNX.

MIT License

Stars
27

ONNX NeuFlowV2 Optical Flow Estimation

Python scripts performing optical flow estimation using the NeuFlowV2 model in ONNX.

Requirements

  • Check the requirements.txt file.
  • For ONNX, if you have a NVIDIA GPU, then install the onnxruntime-gpu, otherwise use the onnxruntime library.

Installation

git clone https://github.com/ibaiGorordo/ONNX-NeuFlowV2-Optical-Flow.git
cd ONNX-NeuFlowV2-Optical-Flow
pip install -r requirements.txt

ONNX model

  • If the model file is not found in the models directory, it will be downloaded automatically from the Release Assets.
  • Available models: neuflow_mixed.onnx, neuflow_sintel.onnx, neuflow_things.onnx
  • You can export a custom model using the Pytorch Inference repository below.

Pytorch Inference / ONNX Export

Original NeuflowV2 model

The original NeuflowV2 model can be found in this repository: https://github.com/neufieldrobotics/NeuFlow_v2

Examples

  • Image inference:
python image_optical_flow.py
  • Webcam inference:
python webcam_optical_flow.py
  • Video inference:
python video_optical_flow.py

Install first YOLOv10 detection library: pip install yolov10-onnx

python video_detection_optical_flow.py

References:

Related Projects