Piecewise Flat Embedding (PFE) is a new nonlinear embedding for image segmentation. Based on the theory of sparse signal recovery, piecewise flat embedding attempts to recover a piecewise constant image representation with sparse region boundaries and sparse cluster value scattering. The resultant piecewise flat embedding exhibits interesting properties such as suppressing slowly varying signals, and offers an image representation with higher region identifiability which is desirable for image segmentation or high-level semantic analysis tasks.
Some examples of embedding results:
- A boundary detector is required to generate boundary probability map which is used to build the affinity matrix in PFE. There are piles of choices for boundary detection such as HED, DB and COB.
- The code has been tested with MATLAB R2014a and R2016b in Ubuntu.
- run_im2ucm_all.m: generate and save segmentation results for all images the chosen dataset;
- run_bench.m: evaluate segmentation results using boundary (Fb) and segmenation (Fop, Covering, PRI and VI) metrics;
- different versions of PFE can be set in get_parameters.m. Set p=1 to use the L1-regularized PFE in demo.m.
Contour driven segmentations of methods integrating swPFE0.8 precomputed on Standford Background Dataset(SBD), MSRC, and testing subset of BSDS500 and PASCALContext, can be downloaded in the following links.
- Use COB as local bounadry: BSDS500, SBD, MSRC, PASCALContext;
- Use DB as local boundary: BSDS500, SBD, MSRC, PASCALContext.
If you use this code, please cite the following papers:
@inproceedings{yu2015piecewise,title={Piecewise flat embedding for image segmentation}, author={Yu, Yizhou and Fang, Chaowei and Liao, Zicheng}, booktitle={Proceedings of the IEEE International Conference on Computer Vision}, pages={1368--1376}, year={2015} }
@article{fang2018piecewise, title={Piecewise Flat Embedding for Image Segmentation}, author={Fang, Chaowei and Liao, Zicheng and Yu, Yizhou}, journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, year={2018}, publisher={IEEE} }
Enjoy!