Code Monkey home page Code Monkey logo

dsrnet's Introduction

RGB guided depth map super-resolution

Environment

Linux

pytorch 0.4.1(python 2.7)

tensorboardX and tensorflow(just for visualization)

Usage

Your dataset should include thress sub-directory: lr* hr* img*

Warning: You should use the same format to name your images and PFM files

For training basic_res:

python main.py --maxdisp 144 --model basic_res --mask_disp 0.25 --datapath ./dataset -- epoches 50 --learning 1e-4 --savemodel ./trained_model --log_dir ./log

Decrease the mask_disp each time can improve the proformance. For example, the first time, mask_disp = 0.25, the second time, mask_disp = 0.15, the third time, mask_disp = 0

For training iternativenet:

The first stage:

python main.py --maxdisp 144 --model itnet --stage first --mask_disp 0.25 --datapath ./dataset -- epoches 50 --learning 1e-4 --savemodel ./trained_model --log_dir ./log

The second stage(distill stage):

python main.py --maxdisp 144 --model itnet --stage distill --loadmodel ./trained_model/checkpoint_50.tar --mask_disp 0 --datapath ./dataset -- epoches 50 --learning 1e-4 --savemodel ./trained_model --log_dir ./log

For testing

one image

python simple_test.py  --model basic_res--img ./dataset/img_20190503_4/0m.png --lr ./dataset/lr_disp/0_disp.pfm --output_dir ./result --loadmodel ./trained_model/checkpoint_40.tar

or put your images and lr_pfms in your folders

python simple_test.py --model basic_res --img ./dataset/img_20190503_4 --lr ./dataset/lr_disp --output_dir ./result --loadmodel ./trained_model/checkpoint_40.tar

output: imagebasename_sr_vis.png, imagebasename_sr.pfm and imagebasename_res.pfm

If you use itnet, you should match the stage with the checkpoint. The output of the first stage is just like basic_res, and the output of the distill stage include imagebasename_res1.pfm imagebasename_res2.pfm in addition to basic output.

dsrnet's People

Contributors

zhangmaoxiansheng avatar zhu-ty avatar

Stargazers

 avatar

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.