Commit 71fca2a1 authored by Davis King's avatar Davis King

Fixed shape_predictor_trainer padding so that it behaves as it used to. In

dlib 19.7 the padding code was changed and accidentally doubled the size of the
applied padding when in the older (and still default) landmark_relative padding
mode.  It's not a huge deal either way, but this change reverts back to the
intended behavior.
parent b4644120
......@@ -744,10 +744,10 @@ namespace dlib
// Figure out the bounds on the object shapes. We will sample uniformly
// from this box.
matrix<float> temp = reshape(initial_shape, initial_shape.size()/2, 2);
double min_x = min(colm(temp,0))-padding;
double min_y = min(colm(temp,1))-padding;
double max_x = max(colm(temp,0))+padding;
double max_y = max(colm(temp,1))+padding;
double min_x = min(colm(temp,0));
double min_y = min(colm(temp,1));
double max_x = max(colm(temp,0));
double max_y = max(colm(temp,1));
if (get_padding_mode() == bounding_box_relative)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment