Commit Graph

6648 Commits

Author SHA1 Message Date
Davis King
bdd5016d85 Added options to input_rgb_image_pyramid that let the user set create_tiled_pyramid()'s padding parameters.
Also changed the default outer border padding from 0 to 11. This effects even
previously trained models.  So any model that doesn't explicitly set the outer
patting to something else will have a padding of 11.  This should be a more
reasonable value for most networks.
2017-08-25 22:01:02 -04:00
Davis King
cf77875dce Gave create_tiled_pyramid() the ability to include padding around the outsides
of the pyramid image.
2017-08-25 20:35:47 -04:00
Davis King
02cf246dce Changed the functions that transform between input tensor coordinates and
output tensor coordinates to use dpoint instead of point.  This way, we can
obtain sub-pixel coordinates if we need them.
2017-08-25 18:38:40 -04:00
Davis King
2883650b0a Made resize_image() and functions that use it like the pyramid objects produce
better results when run on float and double images.  There was needless
rounding to integers happening in the bilinear interpolation.  Now if you work
with a float image the entire process will run without integer rounding.
2017-08-25 18:21:35 -04:00
Davis King
5a0824c0f3 Clarified spec 2017-08-25 18:20:17 -04:00
Davis King
e7774a4c59 Clarified spec 2017-08-25 12:59:55 -04:00
Deniz Evrenci
6fbe3c6055 C++11 features (#778)
* Make noncopyable constructor and destructor default

C++11 provides the functionality.
Defining empty functions cause all classes derived from noncopyable
to be non-trivially constructible and non-trivially destructible.

For example, matrix with compile-time layout by definition does not
require an explicit destructor and should be trivially destructible
; however, deriving from noncopyable makes it non-trivially
destrutible. This also affects vector<T, 2> and vector<T, 3>.

* Delete array2d copy constructor and assignment operators
2017-08-25 05:40:22 -04:00
Deniz Evrenci
ef25c56fbb Include drectangle.h to point_transforms.h (#777) 2017-08-25 05:39:07 -04:00
Davis King
ba8cc45538 updated docs 2017-08-24 19:51:12 -04:00
Davis King
8e6132463a Fixed grammar 2017-08-24 19:42:22 -04:00
Davis King
6a96269097 Fixed spelling error in comment. 2017-08-24 19:24:28 -04:00
Davis King
df03b6fbed merged 2017-08-24 18:42:01 -04:00
Davis King
30ca8b4228 Fully qualified boost::python::list to hopefully avoid compiler errors in some environments. 2017-08-24 18:41:07 -04:00
Evgeniy Fominov
18c42f3e77 Clang support for windows (#772) 2017-08-24 08:12:31 -04:00
ipeterson
faa75fa9f7 Pull in external libpng dependencies properly (#770)
PNG_LIBRARY set by libpng's FindPNG.cmake does not contain zlib dependancy.  This causes the CHECK_FUNCTION_EXISTS(png_create_read_struct LIBPNG_IS_GOOD) to fail with liner errors, and for dlib to use it's internal copy of PNG.

Updated to use libpng's PNG_LIBRARIES variable.  This also sets both PNG and ZLib libraries in dlib_needed_libraries.
2017-08-23 21:33:52 -04:00
Davis King
9ba7889f0f merged 2017-08-22 22:36:53 -04:00
Davis King
a94aa00eb0 updated docs 2017-08-22 22:36:19 -04:00
Davis King
c3fa856c9f Fixed grammar 2017-08-22 22:02:19 -04:00
Davis King
ebb0f85fac Fixed incorrect size() for simd8i. 2017-08-21 21:32:36 -04:00
Davis King
d92728b334 Made windows testing bat file use rmdir rather than rm since rm isn't always available on windows. 2017-08-21 21:27:38 -04:00
Davis King
f566b05a2e Fixed linker errors when building pyhton on windows. This fixes a bug that was introduced in a recent PR.
Also fixed compiler errors that occurred in visual studio.
2017-08-21 21:27:12 -04:00
Davis King
05c8391cb2 Fixed warning in visual studio. 2017-08-21 19:35:42 -04:00
Davis King
1db46949ee Made the test loss in the verbose output messages from the dnn_trainer not jump
in variance when the learning rate resets.
2017-08-20 20:47:00 -04:00
Davis King
d009916e76 Added serialization support for the running_stats_decayed object. 2017-08-20 20:39:44 -04:00
Davis King
dc45871a31 Made the loss value management a little more conservative. 2017-08-20 20:08:03 -04:00
Davis King
dc071ceae1 Made the input_tensor_to_output_tensor() and output_tensor_to_input_tensor()
coordinate mappings work on networks that contain skip layers.
2017-08-20 19:42:12 -04:00
Davis King
620178db05 Changed the default get_test_iterations_without_progress_threshold() from 200
to 500.  Now that we have a better history management of loss values in the
trainer it's much more sensible to have a larger value here.
2017-08-20 19:30:11 -04:00
Davis King
dd62b0e2ff Made the dnn_trainer not forget all the previous loss values it knows about
when it determines that there have been a lot of steps without progress and
shrinks the learning rate.  Instead, it removes only the oldest 100.  The
problem with the old way of removing all the loss values in the history was
that if you set the steps without progress threshold to a really high number
you would often observe that the last few learning rate values were obviously
not making progress, however, since all the previous loss values were forgotten
the trainer needed to fully populate it's loss history from scratch before it
would figure this out.  This new style makes the trainer not waste time running
this excessive optimization of obviously useless mini-batches.
2017-08-20 19:28:08 -04:00
Davis King
618f1084d2 The input_rgb_image_sized is supposed to be convertible to input_rgb_image,
which it was in all ways except you couldn't deserialize directly like you
would expect.  This has now been fixed.
2017-08-20 07:14:40 -04:00
Davis King
ba430be591 Make DLIB_ASSERT statements not abort the python interpreter, but just trigger an exception. 2017-08-19 08:48:48 -04:00
Davis King
33513abdeb Suppress compiler warning 2017-08-19 08:42:17 -04:00
Davis King
3156a5f440 merged 2017-08-18 21:24:49 -04:00
Adam Geitgey
b6d2329c5e Add a python wrapper for using the mmod face detector (#753) 2017-08-18 16:30:33 -04:00
Davis King
2241e2c210 merged 2017-08-18 05:31:14 -04:00
Davis King
98cf44e8e3 Changed the random_cropper so that it samples background patches uniformly
across scales regardless of the input image size.  Previously, if you gave
really large images or really small images it had a bias towards giving only
large patches or small patches respectively.
2017-08-18 05:30:11 -04:00
Davis King
0863386849 merged 2017-08-15 15:52:16 -04:00
Davis King
48a56f36ab Fixed spelling error 2017-08-15 15:52:00 -04:00
Davis King
96619c859f merged 2017-08-15 09:32:26 -04:00
Davis King
4541a1b90a Fixed grammar 2017-08-14 21:36:18 -04:00
Davis King
d6a1e273c0 Updated solvers to correctly pull in cont_'s bias parameter multipliers. 2017-08-14 14:04:16 -04:00
Davis King
9043c7415e Added extract_ layer 2017-08-14 13:50:47 -04:00
Davis King
525cfc71af Added more tests for copy_tensor() 2017-08-14 12:48:37 -04:00
Davis King
7078cfaff5 Added an "add_to" option to tt:copy_tensor(). There was also a bug in the
concat layer's backward() method.  It was assigning the gradient to previous
layers instead of adding the gradient, as required by the layer interface
specification.  This change also noticeably speeds up concat layers since only
one CUDA kernel launch now happens per concat operation, rather than one
kernel launch for each sample in a tensor.
2017-08-14 12:28:26 -04:00
Davis King
89c9267e46 Made copy_tensor() use cudaMemcpyAsync() rather than cudaMemcpy(). 2017-08-14 09:52:53 -04:00
Davis King
aafa411672 Added mult_prev layer. 2017-08-11 17:47:19 -04:00
Davis King
f7310f4bbc Added multiply_zero_padded() 2017-08-11 16:39:00 -04:00
Davis King
46a02d9447 Made swig always run when you rebuild to avoid stale swig outputs. 2017-08-10 17:05:35 -04:00
Davis King
4ab360e439 Added DLIB_NO_ABORT_ON_2ND_FATAL_ERROR for dlib::fatal_error as a generic
switch for use in plugin environments.
2017-08-10 16:07:42 -04:00
Davis King
2630029cb4 Fixed missing java:: qualifiers. 2017-08-10 16:07:12 -04:00
Davis King
e99d47cc7c Removed exit call on load library failure. 2017-08-10 15:31:02 -04:00