Commit Graph

6749 Commits

Author SHA1 Message Date
Davis King c10f43308c Fixing travis-ci config. 2017-07-11 18:16:15 -04:00
Davis King 6266b98773 Make travis-ci build the python api 2017-07-11 18:12:47 -04:00
MambaWong 373ca59369 Update webcam_face_pose_ex.cpp (#702)
Test on a given video like this cv::VideoCapture cap("Sample.avi") may be broken when the video frames are not enough before the main window is closed by the user.
2017-07-11 14:11:06 -04:00
Davis King 6081fea5fa Fixed typo in spec. 2017-07-09 12:20:21 -04:00
Davis King f00ec0cb1e Added Juha Reunanen serialize test case, but one with dlib:: in front and one
without to make sure both types of lookup work.
2017-07-08 16:53:29 -04:00
Davis King 29897305fd Work around funny name lookup rules for serialize() call. 2017-07-08 16:50:38 -04:00
Davis King 32fb83b3ad Fixed name lookup problem for calls to serialize() on network objects. 2017-07-08 15:56:40 -04:00
Davis King a6602c3717 Improved error message from the svmstruct object detector. 2017-07-07 10:42:29 -04:00
Davis King ebdc064c61 merged 2017-07-07 10:31:26 -04:00
Juha Reunanen 0ed1ce6153 Add new loss for weighted pixel inputs (#685)
* Add new loss for weighted pixel inputs (may be useful e.g. to emphasize rare classes)

* Deduplicate method loss_multiclass_log_per_pixel_(weighted_)::to_label

* Add a simple test case for weighted inputs
(also, fix a typo in test_tensor_resize_bilienar's name)

* Add loss_multiclass_log_per_pixel_weighted_ to loss_abstract.h

* Decrease the amount of weighting

* There's no need to train for a very long time
2017-07-07 10:26:29 -04:00
Ian Philips 8de627e105 added check for libpython_version#m.dylib present in some virtual environments (#687) 2017-07-06 13:02:47 -04:00
Davis King 917dcad316 Made ctrl+c detection in a mex file work more reliably in newer versions of
matlab.
2017-07-06 10:04:02 -04:00
Davis King 26524fe7a1 Renamed a few things to make the code and messages clearer. 2017-07-05 12:12:43 -04:00
bot1131357 5089196e04 Check for __ARM_NEON__ for libpng (#679)
*  Added check to see if __ARM_NEON__ is defined. Now we can use the following command: cmake --build --config Release ..

* Rename to use_arm_neon.cmake to check_if_neon_available.cmake for clarity, minor tidying up of script, and simplifying try_compile() code for ARM NEON.
2017-07-05 11:53:48 -04:00
Davis King 2b832d1c5a merged 2017-07-04 13:19:41 -04:00
Davis King c1c9a59cd3 Added upsample_ layer that upsamples a tensor using bilinear interpolation. 2017-07-04 13:14:05 -04:00
Davis King 198569460e Added tt::resize_bilinear() and tt::resize_bilinear_gradient(). 2017-07-04 11:52:56 -04:00
Davis King 9cd06ce372 Clarified spec slightly. 2017-07-04 08:52:12 -04:00
Juha Reunanen 4ec04bd51f Disable IntelliSense for all DNN unit tests (#678)
* Problem:    Visual Studio's vcpkgsrv.exe constantly uses a single CPU core,
            apparently never finishing whatever it's trying to do. Moreover,
            this issue prevents some operations like switching from Debug to
            Release (and vice versa) in the IDE. (Your mileage may vary.)
Workaround: Keep manually killing the vcpkgsrv.exe process.
Solution:   Disable IntelliSense for some files. Which files? Unfortunately
            this seems to be a trial-and-error process.

* Disable IntelliSense for the ResNet declarations

* Disable IntelliSense for even more stuff

* Disable IntelliSense for all DNN unit tests
2017-07-03 16:24:45 -04:00
Davis King 64052a3ff1 Added a comment 2017-07-02 08:43:45 -04:00
Davis King 963e8e8266 Removed default argument from process_batch since it upsets older versions of
gcc and I can imagine scenarios where having it leads to user errors anyway.
2017-07-02 08:16:16 -04:00
Davis King 1928723aae Moved label_to_ignore into loss_multiclass_log_per_pixel_ and also cleaned up a
few minor things.
2017-07-01 16:26:58 -04:00
Juha Reunanen 4bc6c1e5b4 Add new loss layer for semantic segmentation (pixel-wise classification) (#540)
* #288 - add new layer loss_multiclass_log_matrixoutput for semantic-segmentation purposes

* In semantic segmentation, add capability to ignore individual pixels when computing gradients

* In semantic segmentation, 65535 classes ought to be enough for anybody

* Divide matrix output loss by matrix dimensions too, in order to make losses related to differently sized matrices more comparable
- note that this affects the required learning rate as well!

* Review fix: avoid matrix copy

* Review fix: rename to loss_multiclass_log_per_pixel

* Review fix: just use uint16_t as the label type

* Add more tests: check that network params and outputs are correct

* Improve error message when output and truth matrix dimensions do not match

* Add test case verifying that a single call of loss_multiclass_log_per_pixel equals multiple corresponding calls of loss_multiclass_log

* Fix test failure by training longer

* Remove the test case that fails on Travis for some reason, even though it works on AppVeyor and locally
2017-07-01 16:12:34 -04:00
Davis King 37a77ad86e Fixed broken copy constructor and assignment operator of con_, which became
broken about an hour ago.  Oops.
2017-07-01 15:46:25 -04:00
Davis King d780f8bcd8 suppress compiler warnings 2017-07-01 15:24:25 -04:00
Davis King f31480980d merged 2017-07-01 14:47:05 -04:00
Davis King f5574434db Upgraded loss_mmod_ to support objects of varying aspect ratio. This changes
the API for the mmod_options struct slightly.
2017-07-01 14:46:27 -04:00
Davis King dcfff1c463 Added process() and process_batch() to add_loss_layer. These routines let you
easily pass arguments to any optional parameters of a loss layer's to_tensor()
routine.  For instance, it makes it more convenient to set loss_mmod_'s
adjust_threshold parameter.
2017-07-01 12:12:30 -04:00
Davis King 78103a582c updated spec about con_ 2017-07-01 11:54:20 -04:00
Davis King 8b805c99d9 updated docs 2017-07-01 11:53:53 -04:00
Davis King b377f752d9 Made it so you can set the number of output filters for con_ layers at runtime. 2017-07-01 11:53:38 -04:00
Davis King 8eb9e295ee Made dnn_trainer sync its state to two separate sync files that it alternates
between.  This should make syncing more robust to sudden hardware failure that
happens right when saving to disk.
2017-07-01 11:41:26 -04:00
Davis King a06b5292bd Added select_oldest_file() and select_newest_file() 2017-07-01 11:37:16 -04:00
Davis King 0796ce79b4 updated docs 2017-07-01 11:34:35 -04:00
Davis King 2f4e373b21 Added file::last_modified() for windows version of code. 2017-07-01 11:20:45 -04:00
Davis King e00352aa09 merged 2017-07-01 10:39:05 -04:00
Davis King 56428eb9c0 Added last_modified() method to dlib::file. 2017-07-01 10:38:15 -04:00
Juha Reunanen 2ee26aa5bd Problem: Visual Studio's vcpkgsrv.exe constantly uses a single CPU core, (#666)
apparently never finishing whatever it's trying to do. Moreover,
            this issue prevents some operations like switching from Debug to
            Release (and vice versa) in the IDE. (Your mileage may vary.)
Workaround: Keep manually killing the vcpkgsrv.exe process.
Solution:   Disable IntelliSense for some files. Which files? Unfortunately
            this seems to be a trial-and-error process.
2017-06-30 05:47:21 -04:00
Davis King 023e13982d merged 2017-06-28 08:55:47 -04:00
Davis King e44da57705 Minor change to avoid errors from some versions of cmake. 2017-06-28 08:53:43 -04:00
Davis King c68af9dcbf Merge branch 'OranjeeGeneral-master' 2017-06-26 21:08:55 -04:00
Davis King 31bcddd5e4 Cleaned up documentation for conv_. Also removed unnecessary tensor
reallocation and copying inside conv_'s backward pass.  Doing this
required adding an add_to_output boolean option to the methods of
tensor_conv.
2017-06-26 21:06:59 -04:00
Davis King b3d5dbd3b3 Fixed typo in comment. 2017-06-26 21:01:47 -04:00
Davis King f9bb4f472b Merge branch 'master' of git://github.com/OranjeeGeneral/dlib into OranjeeGeneral-master 2017-06-26 14:59:03 -04:00
OranjeeGeneral ecb7095e4a refactored interface to reduce complexity so conv and convt layers forward passes have to call setup explicit now and there is only one ()-operator 2017-06-22 17:55:20 +01:00
Davis King 48c68f218e Fixed mex class code printing 2017-06-21 17:06:48 -04:00
Davis King c5847374f4 Added operator= for simd8f so assignment from float compiles. 2017-06-21 09:10:34 -04:00
Davis King cbd187fb61 merged 2017-06-19 20:55:51 -04:00
Davis King 39be45ada2 Made is so pressing e in imglab toggles between views of the image where the
histogram is equalized or unmodified.  This way, if you are looking at
particularly dark or badly contrasted images you can toggle this mode and maybe
get a better view of what you are labeling.
2017-06-19 20:54:45 -04:00
Davis King ba72c2f95c Updated code to work with new random_cropper interface. 2017-06-18 08:11:54 -04:00