Iris
Documentation | API Reference | Contributing
A Rust-powered, cross-platform computer vision and deep learning library designed with a clean, modular, library-first architecture. Completely native with zero external C dependencies.
If you love Iris, make sure to give it a star!
[!NOTE] This project is still in active development. APIs and features may change before the first stable release.
- Prerequisites & Supported Platforms
- Features of Iris
- Installation
- Library Usage
- Examples
- Cargo Features
- License
| Feature | Description |
|---|---|
| Image Representation | Custom Image<B> wrapping a Burn Tensor<B, 3> for high performance. |
| Image I/O | Native load and save support for PNG, JPEG, GIF, QOI, ICO, BMP, TIFF, WebP, APNG. |
| Color Conversions | RGB, Grayscale, HSV, HLS, XYZ, LAB, YUV, YCrCb conversions with channel split/merge. |
| Geometric Operations | Warp, crop, flip, rotate, scale, affine/perspective transforms, remapping, resize. |
| Filtering & Blur | Box, Gaussian, median, bilateral, separable, custom kernel convolution (filter2D). |
| Edge Detection | Canny, Sobel, Scharr, Laplacian, LoG (Laplacian of Gaussian). |
| Thresholding | Binary, Otsu's, Triangle, adaptive (mean/Gaussian) thresholding. |
| Histogram | Histogram equalization, CLAHE, apply LUT, compare histograms (4 methods), per-channel operations. |
| Morphological Operations | Dilation, erosion, opening, closing, gradient, top/bottom hat, custom kernels. |
| Contours & Shapes | Suzuki-Abe boundary tracking, convex hull, moments, bounding boxes, polygon approximation, distance transform. |
| Drawing Canvas | Lines, rectangles, circles, ellipses, polygons, arrows, markers, text rendering with bitmap font. |
| Noise Generation | Gaussian, salt-and-pepper, and speckle noise with custom parameters. |
| Feature Detection | ORB feature detection (FAST corners + BRIEF descriptors), template matching (6 methods). |
| Dense Optical Flow | Farneback multi-scale Gaussian pyramid flow estimation. |
| Sparse Optical Flow | Lucas-Kanade pyramidal feature tracking. |
| Object Tracking | MOSSE correlation filter tracker. |
| Video Module | Read/write video files, frame iteration, GIF/APNG/JPEG/QOI/PNG output, metadata extraction. |
| DNN Inference | Native ONNX, Safetensors, and Burn weight loading, NMS. |
| ArUco & QR Detection | Marker tracking, pose estimation, and QR/barcode reader pipelines. |
| Image Utilities | addWeighted blending, convert_scale_abs, copy_to with mask, normalize, in_range masking. |
| WGPU & GPU Acceleration | Native acceleration across CUDA, Vulkan, Metal, and WGPU through Burn's backend. |
| Parallel Processing | Rayon-powered parallelism across filters, gradients, morphology, thresholding, and warping. |
Prerequisites
Before installing Iris, ensure you have:
- Rust: v1.85.0+ (Rust 2024 Edition). Install via rustup:
| - Cargo: Comes bundled with Rust. Verify with
cargo --version.
Supported Platforms
Iris supports a wide range of platforms and architectures:
- Windows 10+ / 11+
- Linux (Vulkan/CUDA acceleration support)
- macOS (Metal acceleration support)
Installation
Build from Source
Library Usage
To use iris in your Rust project, run:
Or add it directly to your Cargo.toml under dependencies:
[]
= "0.0.0"
Development Version (Git)
To use the latest development branch directly from GitHub, run:
Or add the following to your Cargo.toml:
[]
= { = "https://github.com/muhammad-fiaz/iris-cv" }
In your Rust code:
use *;
use ;
Examples
Run any example to see Iris in action. All examples require the wgpu feature:
Cargo Features
Iris provides several features to customize compilation and backend acceleration:
| Feature | Description | Enabled by Default |
|---|---|---|
ndarray |
Lightweight, pure CPU ndarray execution backend (used for tests). | Yes |
safetensors |
Enables native loading of model weights in .safetensors format. |
Yes |
wgpu |
Enables the WGPU backend support for hardware-accelerated deep learning via Burn. | No |
gpui |
Enables GPU-accelerated desktop UI window rendering using Zed's GPUI framework. | No |
cuda |
Enables CUDA acceleration for the Burn backend. | No |
tch |
Enables LibTorch backend acceleration. | No |
Note:
rayonis a required dependency for parallel processing — it is always included.
License
This project is licensed under the MIT License. See LICENSE for details.