z.fanglue (at)



FIT Building 3-524, Tsinghua Univeristy,

Beijing, P.R. China, P.C.: 100084


I am now a Ph.D. student in Tsinghua University (Beijing, China),

under the guidance of Prof. Shi-Min Hu.

I was with the Graphics and Geometric Computing Group from 2009.


My research interests include:



- Image Editing and Enhancement


- Image and Video Processing






PatchNet: A Patch-based Image Representation for Interactive Library-driven Image Editing


Shi-Min Hu*1    Fang-Lue Zhang1    Miao Wang1    Ralph R. Martin2    Jue Wang3   


1Tsinghua National Laboratory for Information Science and Technology, Tsinghua University, Beijing

2Cardiff University

3Adobe Research








We introduce PatchNets, a compact, hierarchical representation describing structural and appearance characteristics of image regions, for use in image editing. In a PatchNet, an image region with coherent appearance is summarized by a graph node, associated with a single representative patch, while geometric relationships between different regions are encoded by labelled graph edges giving contextual information. The hierarchical structure of a PatchNet allows a coarse-to-fine description of the image. We show how this PatchNet representation can be used as a basis for interactive, library-driven, image editing. The user draws rough sketches to quickly specify editing constraints for the target image. The system then automatically queries an image library to find semanticallycompatible candidate regions to meet the editing goal. Contextual image matching is performed using the PatchNet representation, allowing suitable regions to be found and applied in a few seconds, even from a library containing thousands of images.





PatchNet: A Patch-based Image Representation for Interactive Library-driven Image Editing [Large] [Compressed] [Video] [Slides]

Shi-Min Hu,

Fang-Lue Zhang, Miao Wang, Ralph R. Martin and Jue Wang





  author = {Hu, Shi-Min and Zhang, Fang-Lue and Wang, Miao and Martin, Ralph R. and Wang, Jue},
  title = {PatchNet: A Patch-based Image Representation for Interactive Library-driven Image Editing},
  journal = {ACM Transactions on Graphics},
  year = {2013},
  volume = {},
  number = {},
  pages = {},


Source Code


The core sections of our PatchNet code can be downloaded by the following links. They are written with OpenCV 2.3.1.

The project for searching local regions using PatchNets will come soon.

Code for building a PatchNet for one image

Graph matching/searching algorithm using PatchNet

Help functions

Example of intermediate data



Data Set


Testing Data Set

The data set we use in our experiment.