Comments (2)
Don't forget that the input to backwarp isn't normalized images but features - and I also appended an additional channel:
Line 57 in 7023ad1
Anyways, the reason I added this additional channel and why I mask the output based on this auxiliary channel is because the goal of this repository is to mimic the original Caffe implementation in PyTorch. That includes being able to use the weights from the model trained in Caffe and executing it in PyTorch. For that to work, all details need to be the same. This being said, the original Caffe implementation uses a custom backwarp implementation that only backwarps pixels if all four pixels that are being sampled reside inside of the image: https://github.com/NVlabs/PWC-Net/blob/185b0e2beb45ad029bb66d818812f8dcc2aed9c6/Caffe/warping_code/warp_layer.cu#L54-L85
The auxiliary channel/mask that I introduced is used to zero out pixels that sample from the boundary where the original implementation yields zero but PyTorch's grid sampler yields something different. If you train a PWC-Net from scratch then you can safely remove this mechanism.
from pytorch-pwc.
Thanks @sniklaus, I'm training from scratch and I did notice a slight improvement in the losses when I removed that. Glad to know it is safe to remove for a fresh training.
from pytorch-pwc.
Related Issues (20)
- Can it test in CPU device? HOT 1
- Cannot inspect the model using TensorBoard HOT 4
- Generalization to unseen data HOT 1
- how to compute optical flow for small size imgs? HOT 1
- what is the range of optical flow value in an image? HOT 1
- About the direction of estimated flow HOT 2
- About pwc-net pretrained model in pytorch version HOT 1
- Just want to confirm if my analysis of your commit 5f4d7de is correct HOT 7
- In run.py, self.netSix has out_channels = 196. Paper says 192. HOT 1
- Receiving a random error, CUDA_ERROR_ILLEGAL_ADDRESS HOT 9
- CuPy correlation layer error HOT 4
- Cupy cuda error. HOT 1
- the two same images HOT 4
- I already did what @fabiopk said but I am still getting this error HOT 2
- How to change the cuda version of correlation.py to the python version HOT 1
- how to import frames of river videos into PWC-Net codes HOT 7
- cupy issue HOT 2
- Normalization in `backward` function. HOT 1
- Deprecation of cupy.cuda.compile_with_cache() in cupy 13.0 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch-pwc.