hmmlillian / Gray-Image-Retrieval

The source code of "Color Reference Recommendation" in the paper "Deep Exemplar-based Colorization".
https://arxiv.org/pdf/1807.06587.pdf
46 stars 8 forks source link
deepfeature imageretrieval

Gray Image Retrieval

This is the implementation of "Color Reference Recommendation" in the paper Deep Exemplar-based Colorization.

Introduction

Given a gray input image, Gray Image Retrieval is to search its similar images in semantic content and photometric luminance from ImageNet.

image

The proposed method consists of two ranking steps, Global Ranking which filters out dissimilar images within the same class, and Local Ranking which further prunes the candidates with large difference in spatial layouts and illuminance.

The input is either gray or color image (but it will be automatically converted to gray in the code), and the output is a text file saving the names of its top-N similar images in ImageNet.

Getting Started

Prerequisites

Build

(1) Compile pycaffe:

(2) Install the Matlab engine for Python:

(3) Compile Search.dll:

Download Models

You need to download models and compressed feature database of ImageNet before running a demo.

Demo

Note

To serve for the purpose of colorization reference recommendation, the input images will be converted to gray images for searching whether it is colorful or not. The classification on gray images may be worse than color images.

Citation

If you find Gray Image Retrieval helpful for your research, please consider citing:

@article{he2018deep,
  title={Deep exemplar-based colorization},
  author={He, Mingming and Chen, Dongdong and Liao, Jing and Sander, Pedro V and Yuan, Lu},
  journal={ACM Transactions on Graphics (TOG)},
  volume={37},
  number={4},
  pages={47},
  year={2018},
  publisher={ACM}
}