Skip to content

KangLiao929/OrdinalDistortion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Deep Ordinal Distortion Estimation Approach for Distortion Rectification

Introduction

This is the official implementation for OrdinalDistortion (IEEE TIP'21).

Kang Liao, Chunyu Lin, Yao Zhao

Problem

Given a radial distortion image capture by wide-angle lens, this work aims to predict the ordinal distortion and rectify the distortion.

Features

  • Propose a learning-friendly representatiion (ordinal distortion) for wide-angle image rectification, which is customized for neural networks and solves a more straightforward estimation problem than the traditional distortion parameter regression
  • Ordinal distortion is homogeneous as all its elements share a similar magnitude and description, compared with the heterogeneous distortion parameter
  • Ordinal distortion can be estimated using only a part of a wide-angle image, enabling higher efficiency of rectification algorithms

Requirements

  • Python 3.5.6 (or higher)
  • Tensorflow 1.12.0
  • Keras 2.2.4
  • OpenCV
  • numpy
  • matplotlib
  • scikit-image

Installation

git clone https://github.com/KangLiao929/OrdinalDistortion.git
cd OrdinalDistortion/

Getting Started & Testing

  • Download the pretrained models through the following links (GoogleDrive), and put them into weights/.

  • To test images in a folder, you can call test.py with the opinion --test_path. For example:

    python test.py --test_num 50 --test_path "./imgs/*.jpg" --save_weights_path './weights/OrdinalDistortionNet.h5' --save_img_path "./results/"

    or write / modify test.sh according to your own needs, then execute this script as (Linux platform):

    sh ./test.sh

The visual evaluations will be saved in the folder ./results/.

Training

  • Generate the training dataset into the path dataset/train/.
  • To train OrdinalDistortionNet, you can call train.py with the opinion --train_path. For example:
    python train.py --train_num 20000 --train_path "./dataset/train/A/*.jpg" --save_weights_path "./weights/" 
    or write / modify train.sh according to your own needs, then execute this script as:
    sh ./train.sh

Citation

If our solution is useful for your research, please consider citing:

@article{liao2021deep,
  title={A Deep Ordinal Distortion Estimation Approach for Distortion Rectification},
  author={Liao, Kang and Lin, Chunyu and Zhao, Yao},
  journal={IEEE Transactions on Image Processing},
  volume={30},
  pages={3362--3375},
  year={2021}
}

About

TIP2021 - A Deep Ordinal Distortion Estimation Approach for Distortion Rectification

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published