sony / nnabla-examples

Neural Network Libraries https://nnabla.org/ - Examples
Apache License 2.0
306 stars 93 forks source link

FlowNet #344

Closed Armin234 closed 2 years ago

Armin234 commented 2 years ago

Hello, is there an example of FlowNet (Correlation) implementation with nnabla ? Or another simple example for optical flow estimation ?

Regards Armin

TakuyaNarihira commented 2 years ago

Thanks for the query! We have an instance of flow estimator network architecture implementation in our video super-resolution example (TecoGAN). https://github.com/sony/nnabla-examples/blob/master/video-superresolution/tecogan/models.py#L39

# Example usage
frames = F.concatenate(previous_frame, current_frame)  # (N, H, W, C * 2)
flow = flow_estimator(frames)  # (N, H, W, 2)  2 is (dx, dy)

(Note that the channel dimension comes last in this implementation.)

You may get the pre-trained flow estimator from the pretrained tecogan model, or by training the model from scratch using opticalflow dataset.

Sorry that unfortunately we don't have flownet implementation in our repository.

Armin234 commented 2 years ago

thank you, this should help me a lot