Commit Graph

8287 Commits

Author SHA1 Message Date
Davis King 39240959fa Make event_correlation() work on fractional counts 2024-10-22 22:26:14 -04:00
Adrià 6d29e0c7d4
Remove vscode stuff (#3028) 2024-10-17 07:24:33 -04:00
Cydral 856707536b
Add embeddings_ layer and supporting utility functions (#3021)
* Fix Stride Indexing Bugs in `reorg` and `reorg_gradient` Functions (CPU & CUDA) and Add `add_to` Parameter

* 'add_to' parameter missing in cuda call reorg_gradient.launch_kernel()

* Cleanup: remove using namespace std; (#3016)

* remove using namespace std from headers

* more std::

* more std::

* more std:: on windows stuff

* remove uses of using namespace std::chrono

* do not use C++17 features

* Add Davis suggestion

* revert some more stuff

* revert removing include

* more std::chrono stuff

* fix build error

* Adjust comment formatting to be like other dlib comments

* Add positional encodings layer to Dlib

* Implement embeddings_ layer and add supporting utility functions to tensor_tools.h

* Updates

* Updates

* Updates

* Updates

* Update

* Update dlib/cuda/tensor_tools.h

---------

Co-authored-by: Adrià <1671644+arrufat@users.noreply.github.com>
Co-authored-by: Davis King <davis@dlib.net>
Co-authored-by: Davis E. King <davis685@gmail.com>
2024-10-16 23:48:55 -04:00
Davis King 488ee5c59e handle empty proto objects 2024-10-06 12:57:24 -04:00
Davis King 44689c1e9b added docs 2024-10-04 22:52:02 -04:00
Adrià fa5d37a62f
add serialization support to chip_details (#3026) 2024-10-04 22:50:09 -04:00
Cydral 4e53f83160
Add tril_ layer for lower triangular matrix operations (#3018)
* Add tril_ layer for lower triangular matrix operations

* Improved layer consistency

* Added constant_wrapper to fix the issue of the float in the template in c++17

* Looking for a solution for c++ 14

* Refactor tril_ layer for improved flexibility and C++14 compatibility

* Updates

* Updates

* Updates

* Updates

* Updates

* Updates
2024-09-29 21:59:21 -04:00
Cydral 72822fe4f9
Fix stride indexing bugs in `reorg` and `reorg_gradient` functions (CPU & CUDA) (#3012)
* Fix Stride Indexing Bugs in `reorg` and `reorg_gradient` Functions (CPU & CUDA) and Add `add_to` Parameter

* 'add_to' parameter missing in cuda call reorg_gradient.launch_kernel()

* Cleanup: remove using namespace std; (#3016)

* remove using namespace std from headers

* more std::

* more std::

* more std:: on windows stuff

* remove uses of using namespace std::chrono

* do not use C++17 features

* Add Davis suggestion

* revert some more stuff

* revert removing include

* more std::chrono stuff

* fix build error

* Adjust comment formatting to be like other dlib comments

---------

Co-authored-by: Adrià <1671644+arrufat@users.noreply.github.com>
Co-authored-by: Davis King <davis@dlib.net>
2024-09-23 07:44:21 -04:00
Cydral 90c8d7830f
Add Transpose Layer for 2D matrix transposition in 4D tensors (#3013) 2024-09-23 07:26:02 -04:00
Adrià fe6e052e03
Cleanup: remove using namespace std; (#3016)
* remove using namespace std from headers

* more std::

* more std::

* more std:: on windows stuff

* remove uses of using namespace std::chrono

* do not use C++17 features

* Add Davis suggestion

* revert some more stuff

* revert removing include

* more std::chrono stuff
2024-09-23 07:18:11 -04:00
Cydral fafdac37f1
Add RMS Normalization Layer (#2999)
* Add RMS Normalization Layer

* Update dnn.cpp

* Missing entry in visitors.h to take into account the new rms_norm_ layer

* Fix test function name

* Fix dangling pointer issue in CUDA implementation of rms_normalize_gradient

* Fixing the dnn.cpp test program for the new rms_norm_ layer

* General update of the rms_norm_ class
2024-09-07 13:29:40 -04:00
Adrià 253098eb1b
Fix layer_normalize gradients (#3001)
* Fix layer_normalize gradients

* fix layer_norm CPU

* attempt to fix the cuda version

* fix gamma_grad and beta_grad

* update cuda test

* use a block of size 1 to avoid race conditions

* improve the speed of CUDA path of layer_norm

* improve the speed of CUDA path of layer_norm
2024-09-01 09:05:09 -04:00
Cydral 27a0135220
Add customizable dropout layer with compile-time rate specification (#3000)
* Add customizable dropout layer with compile-time rate specification

* Update to the name of the new dropout rate customisation class

* Fix: Replace float template parameter with int for C++17 compatibility

* Update dlib/dnn/layers_abstract.h

---------

Co-authored-by: Davis E. King <davis685@gmail.com>
2024-08-29 07:40:10 -04:00
Davis King 98d26dfaf5 change the version back 2024-08-09 15:25:41 -04:00
Davis King 986889d978 make a new dlib version to get us cmake installer instructions for python users 2024-08-09 15:14:38 -04:00
Davis King aba96b576a Give python users clear instructions about how to install cmake 2024-08-09 15:13:57 -04:00
pfeatherstone 3ca155da68
[FFMPEG] support ffmpeg 7 (#2987)
* support ffmpeg 7

* you need assembler

---------

Co-authored-by: pfeatherstone <pfeatherstone@pf>
2024-08-01 08:48:47 -04:00
Davis King 58b50552fe put version back to .99 2024-08-01 08:46:15 -04:00
Davis King a2eec6aa19 just to tag v19.24.5 2024-08-01 08:45:38 -04:00
Davis King c2364600e9 remove deprecated setuptools test stuff 2024-07-30 22:12:20 -04:00
Adrià 6ae301a117
Disable FFmpeg support when building the Python wheel (#2978) 2024-07-09 08:56:22 -04:00
Drew Risinger 0947215ddb
global_optimization: add template argument list (#2973)
Fixes error (-Wmissing-template-arg-list-after-template-kw) from clang-19 compiler.

Co-authored-by: Drew Risinger <drewrisinger@users.noreply.github.com>
2024-06-25 22:01:12 -04:00
James Yuzawa 6233808ce9
Update Pybind11 to v2.12.0 for numpy v2 support (#2970) 2024-06-23 09:46:17 -04:00
Davis King 1a51998ff0 Make docs more clear 2024-06-23 09:38:35 -04:00
kSkip 51c7a35979
Add input_tensor input type (#2951) 2024-05-11 20:07:36 -04:00
Davis E. King fa0e3ff954
Hide windows.h in .cc file (#2952) 2024-04-27 10:57:23 -04:00
Andreas Schwab e9bd9b864a
Add support for riscv64 (#2949) 2024-04-27 08:50:02 -04:00
Davis King 87da2959d8 suppress another one 2024-04-27 08:43:27 -04:00
Davis King b9355f08c4 suppress incorrect warning 2024-04-27 08:41:42 -04:00
pfeatherstone 48e6331705
fixed bug in decoder (#2946)
Co-authored-by: pfeatherstone <pfeatherstone@pf>
2024-04-12 07:59:46 -04:00
Davis King 2dbc7b9f7c fix typo (which turns out builds on gcc) 2024-04-09 22:07:47 -04:00
Davis King 73c990dd18 Use size_t to avoid possible numeric overflow for the very largest images. 2024-04-09 21:49:07 -04:00
Davis King 792b744402 better docs 2024-04-09 21:39:33 -04:00
Adrià Arrufat ca7fd9d1ad
Actually load rgb_alpha images. (#2942)
This should've been added in #2925.

The only doubt I have around the function name:

- `load_rgb_alpha_image`: following the `rgb_alpha_pixel` in dlib
- `load_rgba_image`: shorter and maybe nicer?
2024-04-03 19:26:02 -04:00
Chainfire 8edfa542b8
Remove MMX header (#2939)
MMX is not actually used by dlib and including the header breaks SIMD support detection and usage on platforms that support SSE but not MMX, such as emcc
2024-03-31 16:04:44 -04:00
PowerLay f8bf6caef3
Fix incorrect version check for libgif (#2936) 2024-03-31 15:36:12 -04:00
Davis King 0af9e7a8db adjust head back to .99 2024-03-31 15:34:08 -04:00
Davis King de5c1c8665 tagging another minor version 2024-03-31 15:33:15 -04:00
Chainfire 1db5a38539
Reduce FOREVER from 290 to 200 years (#2938)
Prevents wrap observed in emcc, causing find_max_global to exit immediately unless a custom (and non-wrapping) max_runtime is provided.
2024-03-31 15:26:49 -04:00
Davis King 4d6b41c7a5 Update HTML docs more 2024-03-31 15:23:23 -04:00
Julien Schueller 14ba5572e7
CMake: Set LAPACK libs as public (#2923) 2024-03-26 19:15:42 -04:00
Adrià Arrufat c26b1238df
jxl: use float for quality (#2930) 2024-03-13 08:14:59 -04:00
Juha Reunanen 1529b690da
Apply the new patch from Davis (#2929) 2024-03-10 12:59:49 -04:00
Adrià Arrufat d5909ed977
allow reading and writing rgb-alpha images in Python (#2925) 2024-03-05 20:17:36 -05:00
Adrià Arrufat d45f534d68
Add missing magic number for JPEG XL (#2924)
* Add missing magic number for JPEG XL

* do not force JXL container
2024-03-05 20:15:10 -05:00
Adrià Arrufat 9a30c6d48f
Add JXL support (#2917)
* WIP: preparation for JPEG XL support

* jxl: add loading support

* update jxl abstract

* add support for saving jxl (lossless not working)

* everything works except setting lossless explicitly

* remove unused header

* fix wrong quality logic

* remove debugging statements

* fix lossless encoding

* improve support for grayscale images

* use JXL instead of JPEGXL everywhere

* oops do not make libjxl a requirement

* update years

* silence some warnings

* simplify loader fast path logic

* allow python to save jxl and webp

* update error message with supported formats

* Allow setting image quality in Python

The setting is ignored where it does not make sense.

* round quality in JPEG saver

* improve error message in CMake

* add jxl support to imglab

* add Davis's suggestion

Co-authored-by: Davis E. King <davis685@gmail.com>

* Apply suggestions from code review

Co-authored-by: Davis E. King <davis685@gmail.com>

* make sure grayscale is 8 bit

* update abstract: JPEG XL can store grayscale images

* add more methods to query basic info from JXL

* documentation formatting

* Apply Davis' suggestions

---------

Co-authored-by: Davis E. King <davis685@gmail.com>
2024-03-04 07:56:31 -05:00
Adrià Arrufat c7ba757bc1
add nr and nc methods to jpeg, png and webp loaders (#2920)
* add nr and nc methods to jpeg, png and webp loaders

* Oops, forgot to declare methods in jpeg_loader.h
2024-03-04 07:30:18 -05:00
pfeatherstone 405536051b
Use STD in testing suite (#2922)
* use std

* make gcc happy

---------

Co-authored-by: pfeatherstone <pfeatherstone@pf>
2024-03-04 07:29:17 -05:00
Adrià Arrufat 3d3bd7cee1
Fix documentation of inv_color_transform (#2918) 2024-02-28 19:44:24 -05:00
Adrià Arrufat f775b55cd9
Add color transform and inv color transform (#2914)
* add color transform

* simplify inv_color_transform

* fix typo

* Update dlib/image_transforms/random_color_transform.h

* Update dlib/image_transforms/random_color_transform.h

---------

Co-authored-by: Davis E. King <davis685@gmail.com>
2024-02-21 06:44:15 -05:00