-
Notifications
You must be signed in to change notification settings - Fork 87
/
Copy pathdemo.m
48 lines (44 loc) · 2.08 KB
/
demo.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
% =========================================================================
% TCDCN face alignment tool (68 points)
% =========================================================================
% The provided tool is a re-implementation of the papers:
%
% [1] Zhanpeng Zhang, Ping Luo, Chen Change Loy, Xiaoou Tang. Facial Landmark Detection
% by Deep Multi-task Learning, in Proceedings of European Conference on Computer Vision (ECCV), 2014
%
% [2] Zhanpeng Zhang, Ping Luo, Chen Change Loy, Xiaoou Tang. Learning Deep Representation for Face Alignment
% with Auxiliary Attributes. Technical report, arXiv:1408.3967v2, 2014.
% =========================================================================
% Prerequisites:
% 1. Piotr's Computer Vision Matlab Toolbox (http://vision.ucsd.edu/~pdollar/toolbox/doc/index.html,
% https://github.com/pdollar/toolbox)
%
%Usuage:
%
% IN:
% - "listFileName " is a file that contains the images to be tested.
% OUT:
% - "outputFileName" a file that will be generated by this tool and records the computed facial landmark locations.
% =========================================================================
% Format:
%
% Format of the listfile:
% Each of line contains the image path, followed by the left, top, width and height of the face bounding boxe.
% (see the example file "list.txt" in the package and "boundingbox.jpg" illusrates how large the bounding box should be.)
%
% Format of the outputFile:
% Each line contrains input image path followed by the 68 facial landmark locations (x1,y1,x2,y2....x68,y68).
% To view the format of the output file, see visualize.m.
% Notice
% 1) This demo has been tested on Windows 7 64 bit, Matlab 2013a.
%
% *More details of our implementation, please feel free to drop me an email, zhzhanp@gmail.com.
% =========================================================================
clear; clc;
addpath('./TCDCN/');
%% paramter setup
listFileName = 'list.txt';
modelFile = 'model.mat';
outputFileName = 'output.txt';
%% run
main(listFileName,modelFile,outputFileName)