## FlowNet2 (TensorFlow)
This repo contains FlowNet2[1] for TensorFlow. It includes FlowNetC, S, CS, CSS, CSS-ft-sd, SD, and 2.
### Installation
```
pip install enum
pip install pypng
pip install matplotlib
pip install image
pip install scipy
pip install numpy
pip install tensorflow
```
Linux:
`sudo apt-get install python-tk`
You must have CUDA installed:
`make all`
### Download weights
To download the weights for all models (4.4GB), run the `download.sh` script in the `checkpoints` directory. All test scripts rely on these checkpoints to work properly.
### Flow Generation (1 image pair)
```
python -m src.flownet2.test --input_a data/samples/0img0.ppm --input_b data/samples/0img1.ppm --out ./
```
Available models:
* `flownet2`
* `flownet_s`
* `flownet_c`
* `flownet_cs`
* `flownet_css` (can edit test.py to use css-ft-sd weights)
* `flownet_sd`
If installation is successful, you should predict the following flow from samples/0img0.ppm:
![FlowNet2 Sample Prediction](/data/samples/0flow-pred-flownet2.png?raw=true)
### Training
If you would like to train any of the networks from scratch (replace `flownet2` with the appropriate model):
```
python -m src.flownet2.train
```
For stacked networks, previous network weights will be loaded and fixed. For example, if training CS, the C weights are loaded and fixed and the S weights are randomly initialized.
### Fine-tuning
TODO
### Benchmarks
Benchmarks are for a forward pass with each model of two 512x384 images. All benchmarks were tested with a K80 GPU and Intel Xeon CPU E5-2682 v4 @ 2.30GHz. Code was executed with TensorFlow-1.2.1 and python 2.7.12 on Ubuntu 16.04. Resulting times were averaged over 10 runs. The first run is always slower as it sets up the Tensorflow Session.
| | S | C | CS | CSS | SD | 2
| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- |
| First Run | 681.039ms | 898.792ms | 998.584ms | 1063.357ms | 933.806ms | 1882.003ms |
| Subsequent Runs | 38.067ms | 78.789ms | 123.300ms | 161.186ms | 62.061ms | 276.641ms |
### Sources
[1] E. Ilg, N. Mayer, T. Saikia, M. Keuper, A. Dosovitskiy, T. Brox
FlowNet 2.0: Evolution of Optical Flow Estimation with Deep Networks,
IEEE Conference in Computer Vision and Pattern Recognition (CVPR), 2017.
没有合适的资源?快使用搜索试试~ 我知道了~
flownet2-tf:FlowNet 2.0:深度网络的光流估计的发展
共86个文件
py:39个
cc:20个
h:7个
5星 · 超过95%的资源 需积分: 10 9 下载量 159 浏览量
2021-02-06
07:30:31
上传
评论 1
收藏 16.7MB ZIP 举报
温馨提示
FlowNet2(TensorFlow) 此仓库包含用于TensorFlow的FlowNet2 [1]。 它包括FlowNetC,S,CS,CSS,CSS-ft-sd,SD和2。 安装 pip install enum pip install pypng pip install matplotlib pip install image pip install scipy pip install numpy pip install tensorflow Linux: sudo apt-get install python-tk 您必须安装CUDA: make all 下载砝码 要下载所有模型
资源详情
资源评论
资源推荐
收起资源包目录
flownet2-tf-master.zip (86个子文件)
flownet2-tf-master
logs
.gitkeep 0B
checkpoints
download.sh 102B
README.md 299B
corr.py 1KB
test.py 6KB
src
ops
downsample
downsample_op.cc 951B
downsample_kernel.h 508B
downsample_kernel.cc 2KB
downsample_kernel_gpu.cu.cc 4KB
correlation
correlation_kernel.cc 5KB
pad.cu.cc 2KB
correlation_grad_kernel.cu.cc 12KB
correlation_kernel.h 3KB
pad.h 574B
correlation_grad_kernel.cc 6KB
correlation_kernel.cu.cc 6KB
correlation_op.cc 3KB
flow_warp
flow_warp_op.cc 686B
flow_warp_grad.cu.cc 4KB
flow_warp.cc 2KB
flow_warp_grad.cc 2KB
flow_warp.h 999B
flow_warp.cu.cc 4KB
build
.gitkeep 0B
preprocessing
kernels
data_augmentation.cu.cc 14KB
flow_augmentation.h 717B
augmentation_base.cc 11KB
flow_augmentation_gpu.cu.cc 4KB
data_augmentation.cc 18KB
data_augmentation.h 767B
augmentation_base.h 8KB
flow_augmentation.cc 5KB
preprocessing.cc 4KB
correlation.py 2KB
dataloader.py 14KB
flow_warp.py 477B
utils.py 2KB
flownet_c
train.py 491B
test.py 1KB
__init__.py 0B
flownet_c.py 10KB
downsample.py 213B
__init__.py 0B
flownet_css
train.py 661B
test.py 1KB
__init__.py 0B
flownet_css.py 2KB
net.py 6KB
flowlib.py 13KB
flownet2
train.py 766B
flownet2.py 7KB
test.py 1KB
__init__.py 0B
flownet_cs
train.py 642B
test.py 1KB
__init__.py 0B
flownet_cs.py 2KB
flownet_sd
train.py 502B
test.py 1KB
__init__.py 0B
flownet_sd.py 10KB
training_schedules.py 301B
dataset_configs.py 4KB
flownet_s
train.py 498B
test.py 1KB
__init__.py 0B
flownet_s.py 9KB
scripts
convert_fc_to_tfrecords.py 4KB
caffe
convert_caffe_weights_to_tf.sh 1KB
README.md 530B
convert_caffe_weights_to_npy.py 28KB
convert_npy_weights_to_tf.py 1KB
LICENSE 1KB
README.md 2KB
Makefile 4KB
data
samples
0img0.ppm 576KB
1img1.ppm 576KB
0flow.flo 1.5MB
0flow-pred-flownet2.png 69KB
1img0.ppm 576KB
1flow-pred-flownet2.png 35KB
0img1.ppm 576KB
1flow.flo 1.5MB
README.md 298B
tfrecords
fc_sample.tfrecords 15.24MB
.gitignore 114B
共 86 条
- 1
生物医药从业者
- 粉丝: 17
- 资源: 4616
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论2