Giter Club home page Giter Club logo

fastflownet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fastflownet's Issues

Evaluation code

Hi, @ltkong218,

Thanks for your exciting work, do you have any plan to release the evaluation code of MPI-Sitel training and KITTI?

div_flow parameter

Hi, i am running your code. I saw in your paper the ground-truth flow was divided by 20 before training, but seems didn't see this parameter in FastFlowNet.py, have you used this div_flow parameter in code?

Installing Correlation package

Hi,
I wanted to install the correlation package using Cuda 9 and Pytorch 0.4 but I found this error:
"119 | #error -- unsupported GNU version! gcc versions later than 6 are not supported!"
So I tried installing older version of gcc but I couldent (The OS didnt allow installing old version)
My ubuntu is version 20 (Kubuntu).
Regards,
Ali

TypeError: forward() missing 1 required positional argument: 'input2'

Hi,I have a problem like this, how should I solve it?

Traceback (most recent call last):
File "/data/FastFlowNet-main/demo.py", line 45, in
output = model(input_t).data
File "/root/anaconda3/envs/FastFlowNet/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/root/anaconda3/envs/FastFlowNet/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "/data/FastFlowNet-main/models/FastFlowNet.py", line 134, in forward
cv6 = torch.index_select(self.corr(f16, f26), dim=1, index=self.index.to(f16).long())
File "/root/anaconda3/envs/FastFlowNet/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/root/anaconda3/envs/FastFlowNet/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
TypeError: forward() missing 1 required positional argument: 'input2'

没办法编译corrlation模块

我是Windows平台下cuda10.2 torch1.9.0,没办法编译你提供的代码种的corrlation模块,然后用你说的那个第三方的库https://github.com/ClementPinard/Pytorch-Correlation-extension 编译过了,但是怎么替换你网络中的self.corr;主要是这两个接口参数完全不一样,spatial_correlation_sample( kernel_size=3,patch_size=1, stride=2,padding=0,dilation=2,dilation_patch=1);你的接口是 Correlation(pad_size=4, kernel_size=1, max_displacement=4, stride1=1, stride2=1, corr_multiply=1);怎么一一对应起来

Run: python setup.py build -- error: command 'gcc' failed with exit status 1

My env: Pytorch: 1.9.0+cu111
GPU: NVIDIA GeForce RTX 2080 Ti
Sys: Ubuntu 18.04.5 LTS

I ran python setup.py build
error: command 'gcc' failed with exit status 1

And no surprise, I encountered ModuleNotFoundError: No module named 'correlation_cuda' when I ran python demo.py

I tried:
sudo apt-get update
sudo apt-get install python-dev
sudo apt-get install python3-dev
sudo apt-get install libevent-dev
sudo apt-get install build-essential
sudo apt-get install libblas-dev libatlas-base-dev
sudo apt install gcc
But still not work.

Help me pls! Thx!

Export to TensorRT

A few questions about exporting FastFlowNet to TensorRT for inference on the Xavier TX2.

  • Which version of TensorRT was used to test FastFlowNet on the Xavier TX2?
  • Which toolkit or opensource project did you use to export FastFlowNet from pytorch to TensorRT? Did you use torch2trt?

run demo.py error

run on colab.research.google.com;
and output:
sh: 1: ping: not found
sh: 1: ping: not found
sh: 1: ping: not found
sh: 1: ping: not found
Traceback (most recent call last):
File "/content/drive/MyDrive/FastFlowNet-main/demo.py", line 45, in
output = model(input_t).data
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/content/drive/MyDrive/FastFlowNet-main/models/FastFlowNet.py", line 134, in forward
cv6 = torch.index_select(self.corr(f16, f26), dim=1, index=self.index.to(f16).long())
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/content/drive/MyDrive/FastFlowNet-main/models/correlation_package/correlation.py", line 59, in forward
result = CorrelationFunction(self.pad_size, self.kernel_size, self.max_displacement,self.stride1, self.stride2, self.corr_multiply)(input1, input2)
File "/usr/local/lib/python3.7/dist-packages/torch/autograd/function.py", line 262, in call
"Legacy autograd function with non-static forward method is deprecated. "
RuntimeError: Legacy autograd function with non-static forward method is deprecated. Please use new-style autograd function with static forward method. (Example: https://pytorch.org/docs/stable/autograd.html#torch.autograd.Function)

I meet some questions No module named 'correlation_cuda'

(base) root@autodl-container-c6d211963c-81d44250:/autodl-fs/FastFlowNet-main# python benchmark.py
Traceback (most recent call last):
File "benchmark.py", line 5, in
from models.FastFlowNet import FastFlowNet
File "/root/autodl-fs/FastFlowNet-main/models/FastFlowNet.py", line 5, in
from .correlation_package.correlation import Correlation
File "/root/autodl-fs/FastFlowNet-main/models/correlation_package/correlation.py", line 4, in
import correlation_cuda
ModuleNotFoundError: No module named 'correlation_cuda'
(base) root@autodl-container-c6d211963c-81d44250:
/autodl-fs/FastFlowNet-main#

Low KITTI 2015 flow accuracy by using pertained weights

Hi there,

I tested the accuracy of the model using pretrained weights in checkpoints/ on KITTI 2015 flow training dataset, and got lower accuracy than that reported in your paper.

Using ./checkpoints/fastflownet_ft_mix.pth gives accuracy of

NOC
0.203071 0.203071 0.284329 0.284329 0.216956 0.216956 1.000000 
OCC
0.301341 0.301341 0.306706 0.306706 0.302163 0.302163 1.000000 

./checkpoints/fastflownet_ft_kitti.pth gives accuracy of

NOC
0.242663 0.242663 0.172001 0.172001 0.230589 0.230589 1.000000 
OCC
0.310403 0.310403 0.192049 0.192049 0.292272 0.292272 1.000000 

The paper shows the model could give (8.21%) Fl-all on KITTI 2015 flow training dataset.

So I'm wondering if the weights that can reproduced the accuracies in paper is included in this repo ? Please clarify.

Thanks so much !

Results are inconsistent with expectations

Platform: xavier. jetpack4.4.1 cuda:10.2 pytorch:1.6

the correlation_packege in this repo is for pytorch0.4 which is not suite for pytorch 1.6, so I used flownet2's (https://github.com/NVIDIA/flownet2-pytorch/tree/master/networks/correlation_package)

then everything is ok.

the output is :

/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py:3384: UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details.
warnings.warn("Default grid_sample and affine_grid behavior has changed "

but the result is not same in the repository.

flow

magic factors when upsample flow

There are some magic factors when upsample flow to higher resolution:
https://github.com/ltkong218/FastFlowNet/blob/main/models/FastFlowNet.py#L140

https://github.com/ltkong218/FastFlowNet/blob/main/models/FastFlowNet.py#L147

https://github.com/ltkong218/FastFlowNet/blob/main/models/FastFlowNet.py#L154

https://github.com/ltkong218/FastFlowNet/blob/main/models/FastFlowNet.py#L161

What's the meaninig of 0.625, 1.25, 2.5, 5? Is there any geometry motivation?

I think the factors should be 2, because when you upsample a flow to a resolution with double height and width, the flow is double due to double pixels between origin points and corresponding points.

problems of optical flow results when finetuning on real scene?

Hi,
have you tried training on real scene such as market or subway? I have finetuned the model according to IRR-PWC by using your './checkpoints/fastflownet_ft_mix.pth' in subway real scene, but the results are much worse than flownet2's.
And I met another weird problem: during predicting, whether I multiply the optical flow result by div_flow(20), there seems no difference on the flow-png(flow result transferred to png).
flownet2_1857
fastflow_train_1857_347

didn't process the occlusion loss?

Hi, I have been trying to train fastflownet. After reference to the IRR-PWC, I found occlusion wasn't considered in fastflownet model, So I'd like to ask: if I want to use occlusion loss, how can occlusion be added to model part?

Why does CDDC output 53 channels?

Hi,

Thanks for sharing. What a nice work!

I have not been able to figure out why does CDDC block yield 53 channels?

Thanks,

LA Tran

Deployment on TX2

Hi Lingtong, the performance of FastFlowNet is surprising. I want to deploy it on TX2. But I find there's a custom layer (correlation layer), thus the model can not be convert to onnx directly. I also try torch2tensorRT, but fail on this layer. How do you deploy it on TX2? Can you share the code about model conversion and test code on TX2 using TensorRT?

spatial-correlation-sampler

i am new to this area, would you relsese the code with "spatial-correlation-sampler" function for me to learn, thank you !

train

能不能提供一下train文件,感谢

Question about warp layer

Hi, Thanks for your great work. I am confused why flow6_up is multiplied by 0.625 here. eg: f25_w = self.warp(f25, flow6_up*0.625)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.