Cortex.Vision
1.1.0
dotnet add package Cortex.Vision --version 1.1.0
NuGet\Install-Package Cortex.Vision -Version 1.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Cortex.Vision" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cortex.Vision" Version="1.1.0" />
<PackageReference Include="Cortex.Vision" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Cortex.Vision --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Cortex.Vision, 1.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Cortex.Vision@1.1.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Cortex.Vision&version=1.1.0
#tool nuget:?package=Cortex.Vision&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Cortex.Vision
Image and video processing for Cortex with transforms, augmentation pipelines, and ONNX model inference.
Part of the Cortex data science ecosystem for .NET.
Requires .NET 10+ and the
Cortexcore package. Video processing requires FFmpeg (or Apple AVFoundation on macOS).
Features
- Image transforms — resize, crop, normalize, color conversion, and augmentation
- Video processing — frame extraction and batch processing via FFmpeg and Apple AVFoundation
- Augmentation pipelines — composable random transforms for training data
- ONNX model inference — run vision models (classification, embeddings) directly on image DataFrames
- Data loaders — batched, parallel image loading from directories
Installation
dotnet add package Cortex.Vision
Quick Start
using Cortex;
using Cortex.Vision;
var images = ImageDataFrame.LoadFromDirectory("dataset/train",
resize: (224, 224), normalize: true);
var augmented = images.Transform(
new RandomHorizontalFlip(),
new RandomRotation(degrees: 15),
new ColorJitter(brightness: 0.2));
var model = new OnnxVisionModel("resnet50.onnx");
var predictions = model.Predict(images);
Image Pipeline
var pipeline = new ImagePipeline()
.Add(new Resize(224, 224))
.Add(new Normalize(ImageNet.Mean, ImageNet.Std));
var processed = pipeline.Transform(images);
Video Frame Extraction
var frames = VideoIO.ExtractFrames("video.mp4", fps: 1);
var classified = model.Predict(frames);
Related Packages
| Package | Description |
|---|---|
| Cortex | Core DataFrame (required) |
| Cortex.ML.Onnx | General-purpose ONNX model inference |
| Cortex.ML.Torch | TorchSharp training for custom vision models |
| Cortex.GPU | GPU-accelerated image processing |
Links
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Cortex (>= 1.1.0)
- Cortex.ML (>= 1.1.0)
- FFMediaToolkit (>= 4.8.1)
- Microsoft.ML.OnnxRuntime (>= 1.24.4)
- SixLabors.ImageSharp (>= 3.1.12)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.