rust-ndarray
image
Our great sponsors
rust-ndarray | image | |
---|---|---|
20 | 37 | |
3,235 | 4,419 | |
2.6% | 1.9% | |
7.4 | 8.9 | |
6 days ago | 7 days ago | |
Rust | Rust | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
rust-ndarray
-
Some Reasons to Avoid Cython
I would love some examples of how to do non-trivial data interop between Rust and Python. My experience is that PyO3/Maturin is excellent when converting between simple datatypes but conversions get difficult when there are non-standard types, e.g. Python Numpy arrays or Rust ndarrays or whatever other custom thing.
Polars seems to have a good model where it uses the Arrow in memory format, which has implementations in Python and Rust, and makes a lot of the ndarray stuff easier. However, if the Rust libraries are not written with Arrow first, they become quite hard to work with. For example, there are many libraries written with https://github.com/rust-ndarray/ndarray, which is challenging to interop with Numpy.
(I am not an expert at all, please correct me if my characterizations are wrong!)
-
faer 0.8.0 release
Sadly Ndarray does look a little abandoned to me: https://github.com/rust-ndarray/ndarray
-
Status and Future of ndarray?
The date of the last commit of [ndarray](https://github.com/rust-ndarray/ndarray) lies 6 month in the past while many recent issues are open and untouched.
-
Announcing Burn: New Deep Learning framework with CPU & GPU support using the newly stabilized GAT feature
Burn is different: it is built around the Backend trait which encapsulates tensor primitives. Even the reverse mode automatic differentiation is just a backend that wraps another one using the decorator pattern. The goal is to make it very easy to create optimized backends and support different devices and use cases. For now, there are only 3 backends: NdArray (https://github.com/rust-ndarray/ndarray) for a pure rust solution, Tch (https://github.com/LaurentMazare/tch-rs) for an easy access to CUDA and cuDNN optimized operations and the ADBackendDecorator making any backend differentiable. I am now refactoring the internal backend API to make it as easy as possible to plug in new ones.
-
Pure rust implementation for deep learning models
Looks like it's an open request
-
The Illustrated Stable Diffusion
https://github.com/rust-ndarray/ndarray/issues/281
Answer: you can’t with this crate. I implemented a dynamic n-dim solution myself but it uses views of integer indices that get copied to a new array, which have indexes to another flattened array in order to avoid duplication of possibly massive amounts of n-dimensional data; using the crate alone, copying all the array data would be unavoidable.
Ultimately I’ve had to make my own axis shifting and windowing mechanisms. But the crate is still a useful lib and continuing effort.
While I don’t mind getting into the weeds, these kinds of side efforts can really impact context focus so it’s just something to be aware of.
-
Any efficient way of splitting vector?
In principle you're trying to convert between columnar and row-based data layouts, something that happens fairly often in data science. I bet there's some hyper-efficient SIMD magic that could be invoked for these slicing operations (and maybe the iterator solution does exactly that). Might be worth taking a look at how the relevant Rust libraries like ndarray do it.
-
Rust or C/C++ to learn as a secondary language?
ndarray and numpy crates provide good way to operate on numpy ndarrays from python
-
Enzyme: Towards state-of-the-art AutoDiff in Rust
I don't think any of the major ML projects have GPU acceleration because ndarray doesn't support it.
-
Announcing Rust CUDA 0.2
Not sure about ndarray: https://github.com/rust-ndarray/ndarray/issues/840
image
-
Transitioning From PyTorch to Burn
With the help of the image crate, loading an image from disk is fairly straightforward.
-
CVE-2023-4863: Heap buffer overflow in WebP (Chrome)
FTR there is a WebP decoder implementation in safe Rust in the image crate: https://github.com/image-rs/image
It used to be quite incomplete for a long time, but work last year has implemented many webp features. Chromium now has a policy of allowing the use of Rust dependencies, so maybe Chromium could start adopting it?
-
Porting a local app to Web
Hello! So I have a local app that I am currently running on desktop (windows). I'm using egui for the UI, and the program basically opens a folder, gets all the images in the folder, and then uses the image-rs library to resize and create a grid of images / some other operations.
-
png crate gets an ultrafast compression mode, up to 4x faster decompression
png is the de-facto standard Rust crate for reading and writing PNG images, used e.g. by the image crate.
-
What's everyone working on this week (12/2023)?
There's also a CLI to convert between formats. It uses the crate image.
-
The `exr` crate got up to 3x faster, even better performance coming soon
exr is a is a 100% Rust and 100% safe code library for reading and writing OpenEXR images. It is used by the popular image crate to read and write OpenEXR.
-
Announcing zune-jpeg: Rust's fastest JPEG decoder
We're currently looking for contributors to add support for zune-jpeg to the image crate. The image maintainers are open to it, but don't have the capacity to do it themselves. You can find more details here.
-
picst - a CLI tool to resize clipboard images on the fly
It uses https://github.com/1Password/arboard and https://github.com/image-rs/image under the hood. I haven't tested deeply but I assume it should handle many formats out of the box.
-
From C# to Rust, what do i need to know?
You can use the image crate.
-
Hey Rustaceans! Got a question? Ask here! (27/2022)!
As for image processing, I'd start on crates.io and search for "image processing" and skim through to find the most downloaded crates -- image seems to be the most popular, with over 7 million downloads, so I'd check if that has what you want, and if not photon-rs seemed relatively mature with perhaps more features (albeit far less commonly used)
What are some alternatives?
nalgebra - Linear algebra library for Rust.
opencv-rust - Rust bindings for OpenCV 3 & 4
Rust-CUDA - Ecosystem of libraries and tools for writing and executing fast GPU code fully in Rust.
photon - ⚡ Rust/WebAssembly image processing library
imageproc (PistonDevelopers) - Image processing operations
imageproc - An advanced image processing library for Rust.
neuronika - Tensors and dynamic neural networks in pure Rust.
oxipng - Multithreaded PNG optimizer written in Rust
Raster - An image processing library for Rust
utah - Dataframe structure and operations in Rust
magick-rust - Rust bindings for ImageMagick
linfa - A Rust machine learning framework.