{"id":50897792,"url":"https://github.com/MisterEkole/vx-rs","last_synced_at":"2026-07-03T16:01:27.292Z","repository":{"id":341895432,"uuid":"1168923695","full_name":"MisterEkole/vx-rs","owner":"MisterEkole","description":"A computer vision library in Rust that talks directly to Apple Silicon GPUs through Metal Shading Language.","archived":false,"fork":false,"pushed_at":"2026-03-30T10:42:10.000Z","size":376,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-30T12:26:23.059Z","etag":null,"topics":["apple-silicon","computer-vision","metal-shading"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MisterEkole.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-28T00:24:32.000Z","updated_at":"2026-03-30T10:42:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/MisterEkole/vx-rs","commit_stats":null,"previous_names":["misterekole/vx-rs"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/MisterEkole/vx-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MisterEkole%2Fvx-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MisterEkole%2Fvx-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MisterEkole%2Fvx-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MisterEkole%2Fvx-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MisterEkole","download_url":"https://codeload.github.com/MisterEkole/vx-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MisterEkole%2Fvx-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35092185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-03T02:00:05.635Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple-silicon","computer-vision","metal-shading"],"created_at":"2026-06-16T01:31:30.079Z","updated_at":"2026-07-03T16:01:27.279Z","avatar_url":"https://github.com/MisterEkole.png","language":"Rust","funding_links":[],"categories":["computer-vision"],"sub_categories":[],"readme":"# VX\n\n[![CI](https://github.com/MisterEkole/vx-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/MisterEkole/vx-rs/actions/workflows/ci.yml)\n[![crates.io](https://img.shields.io/crates/v/vx-vision.svg)](https://crates.io/crates/vx-vision)\n[![license](https://img.shields.io/crates/l/vx-vision.svg)](LICENSE)\n\nA computer vision library in Rust that talks directly to Apple Silicon GPUs through Metal Shading Language.\n\n## Why\n\nOpenCV and similar libraries treat the GPU as a separate device — data gets copied from CPU memory to GPU memory and back, over and over. On Apple Silicon this is wasteful because the CPU and GPU share the same physical memory (Unified Memory Architecture). VX skips the copies entirely.\n\nThe library uses Rust bindings to Metal via `objc2-metal`, giving us type-safe GPU access with Rust's ownership model enforcing buffer safety at compile time. Metal Shading Language (MSL) kernels run the actual pixel-level computation on the GPU, while Rust handles orchestration, memory management, and a clean public API.\n\nThe result: real-time classical vision algorithms with zero-copy memory, no C++ interop layer, and no Xcode project required.\n\n## Architecture\n\nVX is a three-layer stack:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/src/vx_architecture_diagram.svg\" alt=\"VX Architecture\" width=\"700\"\u003e\n\u003c/p\u003e\n\n**Naming convention:** In this codebase, *shaders* refer to the MSL functions that run on the GPU (`shaders/*.metal`), and *kernels* refer to the Rust bindings that orchestrate them (`src/kernels/*.rs`).\n\n**Memory Layer** (`vx-core`) manages shared GPU/CPU buffers. `UnifiedBuffer\u003cT\u003e` wraps Metal buffers with type safety, and `GpuGuard\u003cT\u003e` prevents CPU access while a buffer is in-flight on the GPU.\n\n**Kernel Layer** (`vx-vision`) contains Rust bindings for each MSL shader. Each kernel is a struct holding a compiled pipeline — constructed once, dispatched cheaply per frame. The `Context` and `Texture` wrappers hide all Metal internals so users never import `objc2-metal`.\n\n**Application Layer** is your code. The API looks like this:\n\n```rust\nuse vx_vision::Context;\nuse vx_vision::kernels::fast::{FastDetector, FastDetectConfig};\nuse vx_vision::kernels::harris::{HarrisScorer, HarrisConfig};\n\nlet ctx = Context::new()?;\nlet fast = FastDetector::new(\u0026ctx)?;\nlet harris = HarrisScorer::new(\u0026ctx)?;\n\nlet texture = ctx.texture_gray8(img.as_raw(), w, h)?;\nlet corners = fast.detect(\u0026ctx, \u0026texture, \u0026FastDetectConfig::default())?;\nlet scored = harris.compute(\u0026ctx, \u0026texture, \u0026corners.corners, \u0026HarrisConfig::default())?;\n```\n\nNo `unsafe` in user code. No Metal imports. No GPU boilerplate.\n\n## Available Kernels\n\n| Category | Kernels |\n|---|---|\n| **Feature Detection** | FAST-9, Harris, ORB descriptors, DoG/SIFT-like pipeline |\n| **Image Processing** | Gaussian blur, bilateral filter, Sobel, Canny edge, morphology (erode/dilate), threshold (binary/Otsu), histogram (compute/equalize), color conversion |\n| **Geometry** | Resize (bilinear), image pyramid, warp (affine/perspective), homography, lens undistortion |\n| **Analysis** | Template matching (NCC), Hough lines, integral image, distance transform (JFA), connected components |\n| **Motion \u0026 Stereo** | KLT optical flow, dense flow, stereo matching, brute-force descriptor matching |\n| **3D Reconstruction** | SGM stereo, depth filter (bilateral/median), depth inpaint, depth-to-cloud, normal estimation, outlier removal, voxel downsample, TSDF fusion (integrate/raycast), marching cubes, triangulation |\n| **Visualization** | Point cloud renderer, mesh renderer (Phong), depth colorize (turbo/jet/inferno) |\n| **Utilities** | Non-maximum suppression, texture pool, pipeline batching, PLY/OBJ export |\n\n## Building\n\nRequires macOS with Xcode command line tools (`xcode-select --install`).\n\n```\ncargo build\ncargo test\ncargo run --example fast_demo -- path/to/image.png\n```\n\nThe build script automatically compiles all `.metal` shaders into a single metallib and embeds it in the binary.\n\nSee the [documentation](docs/src/getting-started.md) for a detailed setup guide.\n\n## Feature Flags\n\nThe 3D reconstruction and visualization APIs are behind feature flags to keep default builds lean:\n\n| Flag | What it enables |\n|---|---|\n| `reconstruction` | 3D types, depth kernels, point cloud ops, TSDF fusion, meshing, export |\n| `visualization` | Point cloud and mesh renderers, offscreen render targets |\n| `datasets` | TUM RGB-D, EuRoC, KITTI dataset loaders |\n| `full` | Everything |\n\n```\ncargo build --features reconstruction\ncargo run --features full --example tsdf_fusion_demo\n```\n\n## Documentation\n\nFull documentation is available at **[misterekole.github.io/vx-rs](https://misterekole.github.io/vx-rs/)**.\n\n- [Getting Started](https://misterekole.github.io/vx-rs/getting-started.html) — installation, core concepts, first program\n- [Architecture](https://misterekole.github.io/vx-rs/architecture.html) — three-layer stack, shader-kernel contract, memory model\n- [API Reference](https://misterekole.github.io/vx-rs/api/detection.html) — every kernel with usage examples\n- [3D Reconstruction](https://misterekole.github.io/vx-rs/api/reconstruction.html) — depth estimation, TSDF fusion, meshing, point clouds\n- [Stereo-to-Mesh Tutorial](https://misterekole.github.io/vx-rs/reconstruction-guide.html) — end-to-end reconstruction pipeline\n- [Pipeline \u0026 Performance](https://misterekole.github.io/vx-rs/performance.html) — batching, TexturePool, optimization\n- [Adding a Kernel](https://misterekole.github.io/vx-rs/adding-a-kernel.html) — contributor guide\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMisterEkole%2Fvx-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMisterEkole%2Fvx-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMisterEkole%2Fvx-rs/lists"}