Skip to content

Repository files navigation

SYNDOF (Synthetic Defocus Blur Image Dataset)
Paper | Supp | DMENet Repo

This repository contains the official matlab implementation of SYNDOF generation used in the following paper:

Deep Defocus Map Estimation using Domain Adaptation
Junyong Lee1, Sungkil Lee2, Sunghyun Cho3, and Seungyong Lee1
1POSTECH, 2Sungkyunkwan University, 3DGIST
IEEE Computer Vision and Pattern Recognition (CVPR) 2019

Teaser imagePicture:Outputs generated from our code– from left to right, synthetic input, defocus map output and defocused image.

Getting Started

Prerequisites

Tested environment

Matlab

  • Download and unzip the synthetic datasets (OneDrive | Dropbox) under ./data:
    ├── data
    │ ├── synthetic_datasets
    │ │ ├── ...
    

SYNDOF Generation

  • On matlab console, type

    # max_coc, input_offset, output_offset, is_random_gen, is_gpu, gpu_num
    generate_blur_by_depth(29, 'data', 'out', false, true, 1)
  • check the results under ./out, which is structured as,

    ├── ...
    ├── out
    │ ├── blur_map/ # directory for output defocus map
    │ ├── blur_map_binary/ # directory for binarized defocus map
    │ ├── blur_map_norm/ # directory for normalized defocus map
    │ ├── depth_decomposed/ # directory for decomposed depth
    │ ├── image/ # directory for input image (with its modified name)
    

Reading SYNDOF

  • We rounded real values of defocus map into the nearest 10-th. When you read a defocus map, for example in python, read the file as follows:
    image = (np.float32(cv2.imread(file_name, cv2.IMREAD_UNCHANGED))/10.)[:, :, 1]
    image = image / 7. # 7 = (maxCoC - 1) / 4, where maxCoC is 29 in this case.

Contact

Open an issue for any inquiries. You may also have contact with junyonglee@postech.ac.kr

License

License CC BY-NC
This software is being made available under the terms in the LICENSE file. Any exemptions to these terms require a license from the Pohang University of Science and Technology.

Citation

If you find this code useful, please consider citing:

@InProceedings{Lee2019DMENet,
author = {Junyong Lee and Sungkil Lee and Sunghyun Cho and Seungyong Lee},
title = {Deep Defocus Map Estimation Using Domain Adaptation},
booktitle = {IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
year = {2019}
}

About

The official matlab implementation of SYNDOF generation used in the paper, 'Deep Defocus Map Estimation using Domain Adaptation', CVPR 2019

Resources

Stars

56 stars

Watchers

2 watching

Forks

Used by

Contributors

Languages