spacedrive/crates/images/Cargo.toml

39 lines
1.1 KiB
TOML
Raw Normal View History

[package]
name = "sd-images"
version = "0.1.0"
authors = [
"Jake Robinson <jake@spacedrive.com>",
"Vítor Vasconcellos <vitor@spacedrive.com>",
]
license = { workspace = true }
repository = { workspace = true }
edition = { workspace = true }
[features]
heif = ["dep:libheif-rs", "dep:libheif-sys"]
[dependencies]
# Workspace dependencies
[ENG-1479] AI Prototype (#1845) * First draft on image labeling * Fixing execution providers for other OSs * Better error handling and shutdown * Working with shallow media processor * bruh * Fix warnings * Now hooked to media processor job * Link desktop app with libonnxruntime to avoid TLS error during startup * Be able to change models on runtime Revert to use labels table instead of tags * A bug on a model-less inference * Show AI labels on Inspector - Change yolo inference to use half precision - Add labels api to core * Remove LD_PRELOAD * Fix race condition on model executor shutdown * Don't load all images in memory moron * Embeed yolo model in prod build - Change yolo model path to new one relative to executable * Disable volume watcher on linux, it was crashing the app - Invalidate labels when they are updated * Rust fmt * Minor changes * Gate onnxruntime linking to the ai-models feature * Add build script to sd-server to handle onnxruntime linking workaround * Move AI stuff to its own crate and normalize deps * Rust fmt * Don't regenerate labels unless asked to * Now blazingly fast * Bad merge * Fix * Fix * Add backend logic to download extra yolo models * Add models api route - Add api call to get available model version - Add api call to change the model version * Improve new model download logic - Add frontend to change image labeler model * Fix new model downloader * Fix model select width * invalidate labels count after media_processor generates a new output * Rename AI crate and first draft on download notifications * fix types --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com> Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-12-19 09:28:57 +00:00
image = { workspace = true }
once_cell = { workspace = true }
rspc = { workspace = true, optional = true } # error conversion
[ENG-1096] Image Conversions (#1364) * derive `Type` on `*Extension` * update `image`, `webp` and add `rspc::Error` support to the `sd-images` crate * rename function for verbosity * cleanup clippy allows and use scaling fn for svg conversions * remove dead comment * specify `generic` image extensions and add fn to enumerate all compatible extensions * re-exports and inline hot provided method * another inline on a provided method * `formatter` -> `handler` and return an explicit error if the extension isn't supported, and add `convert_image()` * `get_ext()` inlined helper fn * add mutation for conversion and query for getting all supported extensions * fix `svg` scaling and generation * update bindings * rm old const * temporary test for all exts * verbosity and no manual drop * remove dbg test * big enum and remove `cur` extension as `image` doesn't support it * add huge extension enum * hopefully get path from file path id and location id * main merge fix * chore: update toml and lockfile * security: update webp * comment entire crypto crate for build times * add bincode, huge enum and custom ser/de * Revert "comment entire crypto crate for build times" This reverts commit 458addaad60fe845c476402f21404f40330e706b. * lockfile * theoretically working ser/de * add svg scaling * fix pdf matching bug and use options * move image scaling fn * major consts overhaul with good ser/de * disable heif checking for now due to new trait api * make the generic handler truly generic * fix pdf types * fix pdf scaling so that it's 120dpi A4 paper size by default - height/aspect res are maintained * heavy cleanup * note to myself * bindings & update core to use the scaling fn from the images crate (reducing code dupes) * move vulnerable `aovec` to be a dev dep so it stays out of release builds (it's only used in tests) * remoev exif crate from the core as it's handled in a sep. crate * silence a clippy warning and update lockfile * lower the maximum file size a slight amount * bindings and minor dep bumps * Some improvements --------- Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-10-10 02:57:37 +00:00
specta = { workspace = true, optional = true }
serde = { workspace = true, optional = true, features = ["derive"] }
[ENG-1479] AI Prototype (#1845) * First draft on image labeling * Fixing execution providers for other OSs * Better error handling and shutdown * Working with shallow media processor * bruh * Fix warnings * Now hooked to media processor job * Link desktop app with libonnxruntime to avoid TLS error during startup * Be able to change models on runtime Revert to use labels table instead of tags * A bug on a model-less inference * Show AI labels on Inspector - Change yolo inference to use half precision - Add labels api to core * Remove LD_PRELOAD * Fix race condition on model executor shutdown * Don't load all images in memory moron * Embeed yolo model in prod build - Change yolo model path to new one relative to executable * Disable volume watcher on linux, it was crashing the app - Invalidate labels when they are updated * Rust fmt * Minor changes * Gate onnxruntime linking to the ai-models feature * Add build script to sd-server to handle onnxruntime linking workaround * Move AI stuff to its own crate and normalize deps * Rust fmt * Don't regenerate labels unless asked to * Now blazingly fast * Bad merge * Fix * Fix * Add backend logic to download extra yolo models * Add models api route - Add api call to get available model version - Add api call to change the model version * Improve new model download logic - Add frontend to change image labeler model * Fix new model downloader * Fix model select width * invalidate labels count after media_processor generates a new output * Rename AI crate and first draft on download notifications * fix types --------- Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com> Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-12-19 09:28:57 +00:00
thiserror = { workspace = true }
tracing = { workspace = true }
# Specific Images dependencies
bincode = { version = "=2.0.0-rc.3", features = [
"derive",
"alloc",
[ENG-1096] Image Conversions (#1364) * derive `Type` on `*Extension` * update `image`, `webp` and add `rspc::Error` support to the `sd-images` crate * rename function for verbosity * cleanup clippy allows and use scaling fn for svg conversions * remove dead comment * specify `generic` image extensions and add fn to enumerate all compatible extensions * re-exports and inline hot provided method * another inline on a provided method * `formatter` -> `handler` and return an explicit error if the extension isn't supported, and add `convert_image()` * `get_ext()` inlined helper fn * add mutation for conversion and query for getting all supported extensions * fix `svg` scaling and generation * update bindings * rm old const * temporary test for all exts * verbosity and no manual drop * remove dbg test * big enum and remove `cur` extension as `image` doesn't support it * add huge extension enum * hopefully get path from file path id and location id * main merge fix * chore: update toml and lockfile * security: update webp * comment entire crypto crate for build times * add bincode, huge enum and custom ser/de * Revert "comment entire crypto crate for build times" This reverts commit 458addaad60fe845c476402f21404f40330e706b. * lockfile * theoretically working ser/de * add svg scaling * fix pdf matching bug and use options * move image scaling fn * major consts overhaul with good ser/de * disable heif checking for now due to new trait api * make the generic handler truly generic * fix pdf types * fix pdf scaling so that it's 120dpi A4 paper size by default - height/aspect res are maintained * heavy cleanup * note to myself * bindings & update core to use the scaling fn from the images crate (reducing code dupes) * move vulnerable `aovec` to be a dev dep so it stays out of release builds (it's only used in tests) * remoev exif crate from the core as it's handled in a sep. crate * silence a clippy warning and update lockfile * lower the maximum file size a slight amount * bindings and minor dep bumps * Some improvements --------- Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
2023-10-10 02:57:37 +00:00
], optional = true }
# Disable defaults for libheif* to avoid bindgen and use pre-compiled headers
libheif-rs = { version = "1.0", default-features = false, optional = true }
libheif-sys = { version = "2.1", default-features = false, optional = true }
pdfium-render = { version = "0.8.15", features = [
"sync",
"image",
"thread_safe",
] }
resvg = "0.42.0"