PWC光流估计网络

PWC光流估计网络

1、代码地址
https://github.com/goutamgmb/deep-burst-sr

2、下载预训练模型
pwc-net的pytorch代码中有个download.bash,执行bash文件或者直接复制下载链接,或者直接执行命令。下载好模型(network-default.pytorch)放在pwcnet下面,和run.py同级。下载预训练模型的sh文件内容如下。

#!/bin/bash
wget --verbose --continue --timestamping http://content.sniklaus.com/github/pytorch-pwc/network-chairs-things.pytorch
wget --verbose --continue --timestamping http://content.sniklaus.com/github/pytorch-pwc/network-default.pytorch
3、使用PWC-NET估计两张图片的光流
测试自己的图片,测试命令
python run.py --model default --first ./images/0_0.png --second ./images/0_1.png --out ./out.flo
其中first和second分别指输入的两张图片,./out.flo表示输出光流文件名字
4、光流文件.flo可视化
(1)前往http://vision.middlebury.edu/flow/submit/下载imageLib工具包,选择flow-code.zip文件并下载。
(2)解压并编译
sudo apt-get install libpng-dev
cd /home/leipeng/pzh/lib/
unzip flow-code.zip
Command ‘unzip’ not found, but can be installed with:
sudo apt install unzip
unzip flow-code.zip
cd flow-code/
cd imageLib
make
cd …
make

(3)测试
./color_flow input.flo output.png

5、可视化结果

在这里插入图片描述

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值