* Use only a fraction of labels for the multiclass SVM in SSL example
This change makes the self-supervised example more close to reality:
usually, only a fraction of the dataset is labeled, but we can harness
the whole dataset by using a self-supervised method and then train the
classifier using the fraction of labeled data.
Using 10% of the labels results in a test accuracy of 87%, compared to
the 89% we got when training the multiclass SVM with all labels.
I just added an option to change the fraction of labeled data, so that
users can experiment with it.
* Update examples/dnn_self_supervised_learning_ex.cpp
Co-authored-by: Davis E. King <davis685@gmail.com>
* [MATH] beginnings of some special math stuff like bessel functions and so on. This will be useful for filter design and further down the line computing STFTs and who knows, maybe some DSP
* placeholder code
* copy pasted from libstdc++ pretty much
* [MATH] refactoring and unit tests
* [MATH] added constants
* [MATH] more tests
* Am i missing a namespace ? What the hell is gcc-11 complaining about
* - missing header for std::max (algorithm)
- bad brackets
- unambiguous call to cyl_bessel_(i/j)
* - added kaiser function
* - added kaiser function
* - inline
* - use dlib/numeric_constants.h
- made all the constants constexpr. Don't think it makes a difference but make things constexpr if you can
- added some decimals so it's consistent with what's in the standard library
* stripped boost
* float and double aren't constexpr-able
* - explicit implementation without frills. Not as accurate as libstdc++ or boost but much simpler, does the job and no license
* - use DLIB_ASSERT
- added documentation
* fix spelling
* - check template parameters are floating point
- added tests for kaiser using data generated from numpy
* - use strong types and function overloading
* - added more window functions
* - better docs
- don't need inline templates, just templates
* - added the Hann window. That's the default used for STFT in scipy and matlab
* - added window overloads for dlib::matrix
* - added kaiser overloads for dlib::matrix
* - suppress complaint about narrowing
* - unit tests for the matrix overloads
* - unit tests for the matrix overloads
* - you can now call windows using an enum
* - refactored Window to WindowType and Windowtype to WindowSymmetry to avoid conflicts with GUI library which also defines Window
* compute real values
* first draft at stft(), istft(), stftr() and istftr()
* Added tests for stft()
* more stft() tests
* fix mismatched signed-ness
* more tests
* - more checks
- docs
* - signed vs unsigned comparision warning
* - more tests
* - added more precision to the scipy generated data and lowered tol
* made docs a little bit more explicit
* removed new lines
* test all the windows
* reduced tol a bit
* - mods as per code review
* - mods as per code review
* - mods as per code review
* - tol is reduced
* - refactored WindowType to window_type
- added abstract file for windows
* Got rid of switch-wrapped window function
* Got rid of switch-wrapped window function
* Don't need matrix expressions for windows anymore
* Don't need matrix expressions for windows anymore
* Don't need matrix expressions for windows anymore
* Not using an enum to control the window type anymore.
* Not using an enum to control the window type anymore.
* Not using an enum to control the window type anymore.
* can't use a generic lambda in C++11
* reduced number of tests
* Don't needlessly convert float to double to float to double to float ... Added static assert in bessel functions. Use lambdas!
* If we're going to start using C++14, we don't need trailing return types. Just use auto. Much easier. Just let your IDE tell you want the return type is.
* Enable C++14. This is a basic change. I feel like all the cmake stuff in dlib needs to be updated to the v3 era.
* c++14 simplification
* trying another approach at enforcing C++14, and make sure dtest uses it
* keep windows happy
* trying to keep windows happy
* revert change
* Apply suggestions from code review
* - removed print statement
* - more accurate docs
* - don't use /*!!*/ for comments. That messes with dlib docgen
- more docs
* - better function names. Hopefully, it's clearer what they are doing
* Update dlib/matrix/matrix_fft_abstract.h
* Update dlib/matrix/matrix_fft_abstract.h
* Update dlib/matrix/matrix_fft_abstract.h
* Update dlib/matrix/matrix_fft_abstract.h
Co-authored-by: pfeatherstone <peter@me>
Co-authored-by: pf <pf@me>
Co-authored-by: Davis E. King <davis685@gmail.com>
* Use add_compile_definitions, enable -Wpedantic and use colors
* Use lround in rectangle and drectangle
* Use round in bigint
* Use round in canvas_drawing
* Modernize image_transforms
* Modernize image_pyramid
* Fix error in image_pyramid
* Modernize matrix
* Fix error in image_pyramid again
* Modernize fhog test
* Modernize image_keypoint/surf
* Remove extra ;
* Add some improvements to the YOLO loss layer
Notably:
- stabilized bounding box regression loss during training by smoothing the gradient
- added the possibility to compute the iou_anchor_threshod adaptively with ATSS
(adaptive training sample selection)
- make use of the detection_confidence field in the truth box for class balanced loss
- added an optional gamma parameter to be able to use the focal loss in the classifier
* Added method to return a non-const reference to yolo_options
Also added the gamma_cls to loss_details operator<<
* Add focal gamma for objectness, too
* Fix yolo_options deserialization logic
* Remove non-const reference method to yolo_options
* use weight only for positive class, and be more consistent with floating types
* Use chrono in console progress indicator and add finish method
* Default print status to std::clog
* Print ellapsed time in parallel_for_verbose
* Fix typo
* Fix typo again
* Update release notes
* Fix spacing
* [TYPE_SAFE_UNION] removed explicit swap(). let the compiler define swap from move semantics
* - added type traits:
are_nothrow_move_construtible
are_nothrow_move_assignable
are_nothrow_copy_construtible
are_nothrow_copy_assignable
- everything has (conditional) noexcept specifiers
* - formatting
- bug fix
* - added .swap() back in
* - type traits
- added .swap(item) and swap(a,b) back in, but with some cleanup and all the noexcept
* added docs for swap(a,b) back in
Co-authored-by: pfeatherstone <peter@me>
* Add BGR(A) to pixel_traits
* add support for reading webp
* Apply Davis' suggestions and fix formatting
* Fix signed/unsigned warning
* Update decoding paths
* update pixel traits documentation
* Add support for writing WebP images
* Simplify image_saver code
* WIP: add tests, PSNR is low but images look good
* Add lossless compression for quality > 100
* Fix build when WebP support is disabled
* Use C++ stream instead of C-style FILE
* Fix indentation
* Use reinterpret_cast instead of C-style cast
* Improve impl::impl_save_webp signature
* Remove empty line
* Use switch statement and clean up code
* Update Copyright and test libwebp on Linux
* Fix formatting in github workflow
* Fix operator== for bgr_alpha_pixel
* Show where the test fails
* Add libwebp to CI for the remaining Linux workflows
* Use filename consistently
* Improve message with wrong pixel type
* Fix tests for WebP images
* Prevent saving images which are too large and improve error messages
* Use max dimension from WebP header directly
* Update documentation, index and release notes
* Update dlib/image_saver/save_webp_abstract.h
Co-authored-by: Martin T. H. Sandsmark <martin.sandsmark@kde.org>
Co-authored-by: Davis E. King <davis685@gmail.com>