Implementation (MATLAB source code) of the procedural model fitting (PMF) method described in our paper: Robust procedural model fitting with a new geometric similarity estimator.
Please cite the following paper:
Zhang, Zongliang and Li, Jonathan and Guo, Yulan and Li, Xin and Lin, Yangbin and Xiao, Guobao and Wang, Cheng. Robust procedural model fitting with a new geometric similarity estimator. Pattern Recognition 85 (2019) 120-131.
Preprint version: https://zhangzongliang.github.io/pdf/pmf.pdf
Final version: https://doi.org/10.1016/j.patcog.2018.07.027
The code has been tested in MATLAB R2018a, and could aslo work in MATLAB R2016 or R2017. To run the code, first unzip the file "data.zip", and then in the main PMF directory type one of the following three commands:
fit_cylinder;
fit_character;
fit_building;
Please be patient! Running the code on a single CPU is quite slow. Taking an Intel(R) Core(TM) i5-3470 CPU @3.20GHz for example, it would consume tens of minutes, a couple of hours, and tens of hours to fit_cylinder, fit_building, and fit_character, respectively. Fortunately, the code can be naturally run in parallel to achieve few-shot character recognition.
Please make sure that at least two points can be sampled from the model. In other words, taking 1-dimensional case as example, every model defined by the input probabilistic program should at least have a length of 2*\delta_{min}. The reason is as follows. The proposed method requires the model to be a continuous point set. If only one point can be sampled from the model, then the model is practically not qualified as a continuous point set.
E-mail address of the first author (Mr. Zongliang Zhang) is: zzl@jmu.edu.cn
E-mail address of the corresponding author (Prof. Jonathan Li) is: junli@xmu.edu.cn
The main code of PMF is under MIT license. PMF employs the code of the cuckoo search algorithm and the code of the Bayesian program learning model, which have their own licenses (can be found in the involved folders). PMF also employs four datasets including MNIST, noisy MNIST, Semantic3D, and SCSC. These datasets have their own licenses also (can be found in the involved folders).