Commit Graph

8262 Commits

Author SHA1 Message Date
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
Adrià Arrufat
631c47c7fd
fix letterbox_image in yolo example (#2911) 2024-02-05 08:07:16 -05:00
Adrià Arrufat
85aa29a4e8
Return shortcut in disturb_colors (#2909)
* Return shortcut in disturb_colors

No need to do anything if both gamma and color magnitudes are set to 0.

* Fix typo

This happens for being lazy and making the change directly from GitHub...
2024-01-28 10:04:12 -05:00
Adrià Arrufat
b0f6be8058
loss_barlow_twins: add get_eccm member function (#2906)
This allows us to greatly simplify the self supervised learning example:
- the computation in user code was a bit too distracting
- avoids duplicated computation/allocation of this matrix
- avoids edge case where net outputs are zero due to trainer synchronization
2024-01-08 21:59:09 -05:00
Davis E. King
46e59a2174
Disable mac osx CI 2023-12-07 22:28:12 -05:00
Adrià Arrufat
19a952c3a4
extend letterbox behavior (#2899)
* extend letterbox behavior

* simplify scale logic and update docs

* oops, forgot one line in the yolo example

* make dpoint const
2023-12-07 22:22:05 -05:00
Adrià Arrufat
b20e97446b
Add find_convex_hull using Graham scan (#2889) 2023-11-12 20:10:47 -05:00
avkarenow
f7d99ae0dc
Make use of CMAKE_BUILD_PARALLEL_LEVEL (#2879) 2023-10-11 19:39:48 -04:00
avkarenow
13c6b7a5b1
Remove cmake from pyproject.toml (#2878) 2023-10-11 19:00:01 -04:00
pfeatherstone
106c5a265d
[PNG] save_png() now works with std::vector and std::ostream (#2873)
* save_png() works with buffers and streams

* optimization for bgr_pixel

* explicit overloads for matrix<> and matrix_exp<>. Added docs for new savers

* refactored loading implementations details. In my view, easier to read, mirrors saving implementations details, and supports iostreams. We could make the callback API public, and we could support a ton of APIs...

* test for iostreams

* oops

* - reduced code size by templating byte type
- docs

* spelling

* i hope i haven't made a pig's breakfast out of this

---------

Co-authored-by: pf <pf@me>
2023-10-11 18:54:34 -04:00
pfeatherstone
3624bf9f05
[scope] Adding scope_exit (#2875)
* initial commit

* is this enough?

* is this enough docs? I'm not great at writing docs

---------

Co-authored-by: pf <pf@me>
Co-authored-by: pf <pf@pf>
2023-10-06 22:57:11 -04:00
pfeatherstone
afede571cb
potential fix for gcc 5.1 onward (#2870)
Co-authored-by: Your Name <you@example.com>
2023-09-30 11:11:13 +00:00
Davis King
57b77a0e41 fix incorrect assert and typo in docs 2023-09-24 15:05:33 -04:00
pfeatherstone
b74a6710d1
simplify and fix bug (#2866) 2023-09-20 07:07:36 -04:00
pfeatherstone
dad29bfae7
Apple Clang complains about sprintf. Use snprintf instead. (#2862)
Co-authored-by: Your Name <you@example.com>
2023-09-19 08:12:02 -04:00
pfeatherstone
c53ff25952
bug fix when multiple streams are present (#2863)
Co-authored-by: Your Name <you@example.com>
2023-09-19 08:09:55 -04:00
Davis King
4161cc3017 oops, fix build error 2023-09-17 21:34:25 -04:00
Davis King
1ffab7c210 update docs and some cleanup 2023-09-17 21:26:29 -04:00
Marc Paterno
b4acae25a2
Apply archiver flags only on Apple using Apple compilers (#2854) 2023-09-12 08:30:58 -04:00
Davis E. King
f6c58c2d21
Make type safe union docs more clear regarding exceptions. 2023-08-26 19:55:59 -04:00
Davis King
c6c865ba71 Make test threshold a little more robust. 1e-6 was right on the edge and sometimes failed. 2023-08-06 09:33:09 -04:00
Facundo Galán
be2fa7f93c
Add fuse layers for conv+affine+relu and conv+relu (#2842)
* Add fuse layers for conv+affine+relu and conv+relu

* Add relu to tensor_conv for cpu

* Update convolution serialization

* Move disable_duplicative_biases documentation from layers_abstract to visitors_abstract

* Fix convolution copy

* Update dlib/dnn/layers_abstract.h

---------

Co-authored-by: Facundo Galan <fgalan@danaide.com.ar>
Co-authored-by: Davis E. King <davis685@gmail.com>
2023-08-05 12:38:29 -04:00
Davis King
efae642813 Work around bug in gcc 11.4.0 causing spurious compile error 2023-08-05 12:24:42 -04:00
Prashanth
9a9b4af6c5
updated cudnn path (#2843)
* updated cudnn path

* adding cudnn path

* Use same format as command below

---------

Co-authored-by: Davis E. King <davis685@gmail.com>
2023-08-05 09:39:56 -04:00
Davis King
ba66152ad9 Add filter rules for matlab CI 2023-07-27 20:19:39 -04:00
Davis King
efaa213b6e remove clang 13 CI since the install method isn't working anymore and we have another test for clang 2023-07-27 20:18:13 -04:00