-
Notifications
You must be signed in to change notification settings - Fork 2
/
data_driven_descent.proto
119 lines (89 loc) · 2.42 KB
/
data_driven_descent.proto
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
package ddd;
enum WarpType {
FORWARD = 0;
BACKWARD = 1;
}
enum DeformationType {
AFFINE = 0;
LANDMARK = 1;
}
enum SampleType {
RANDOM = 0;
ONLY_TRANSLATION = 1;
}
message DeformationSpec {
// Type of warp, forward or backward.
optional WarpType warp_type = 1;
// Type of deformation
optional DeformationType deformation_type = 2;
// Image width.
optional int32 image_width = 3;
// Image height.
optional int32 image_height = 4;
// Parameters to specify the landmark locations.
optional int32 num_landmarks = 5;
// [x1, x2, x3, ..., y1, y2, y3, ...,]
repeated float landmarks = 6;
// Total degrees of freedom.
optional int32 dof = 7;
}
message Region {
optional int32 id = 1;
optional int32 left = 2;
optional int32 top = 3;
optional int32 width = 4;
optional int32 height = 5;
// Subset of landmarks (x and y components are separated.)
repeated int32 subsets = 6;
// Magnitude of deformation field
optional float max_magnitude = 8 [default = 1e10];
optional float min_magnitude = 9 [default = 0];
}
// Design the sample specification.
message SampleSpec {
// Number of samples to be generated.
optional int32 num_samples = 1;
optional SampleType sample_type = 2;
// Sample derivation.
optional float sigma = 3;
// Power used to generate samples.
optional float power = 4 [default = 1.0];
}
// Layer specification.
message LayerSpec {
// Layer number.
optional int32 layer = 1;
// Sample specification.
optional SampleSpec sample_spec = 2;
// Regions within each layer.
repeated Region regions = 3;
// Number of (inner) iterations for each layer.
optional int32 num_iterations = 4 [default = 1];
// Density of image pixels to be sampled.
optional int32 num_samples_per_dim = 5;
}
// Design the algorithm specification.
message AlgSpec {
repeated LayerSpec layers = 1;
// Nearest neighbor constant.
optional int32 nearest_neighbor = 2 [default = 1];
// Whether or not we use Pyramid.
optional bool use_pyramid = 3;
// If we do not use pyramid, how much blur we should apply for each layer.
optional float blur_sigma = 4;
// Whether to dump intermediate results.
optional bool dump_intermediate = 5;
}
// Results
message Result {
message Frame {
optional int32 t = 1;
optional float error = 2;
repeated float representation = 3;
repeated float estimates = 4;
}
// Estimated parameters.
repeated float estimates = 1;
// Results per frame.
repeated Frame frames = 2;
}