Skip to main content
net8.0-windows10.0.19041

AI-powered image segmentation using Qualcomm SINet ONNX model. Separates foreground from background in images. Model downloads automatically at build time. Requires Windows 10 SDK 19041 or later.

Published
Feb 4, 2026
8mo ago
Total Downloads
340
340

Install

dotnet add package Contoso.AI.ImageSegmenterSINet --version 0.1.0-beta
ProductVersions
.NET
net8.0-windows10.0.19041

README

Contoso.AI.ImageSegmenterSINet

AI-powered image segmentation using Qualcomm's SINet (Salient Image Network) ONNX model. Separates foreground from background in images with NPU hardware acceleration.

Quick Start

using Contoso.AI;
using System.Drawing;

// Create segmenter (model downloads automatically at build time)
using var segmenter = await ImageSegmenterSINet.CreateAsync();

// Segment an image
using var bitmap = new Bitmap("photo.jpg");
var result = segmenter.SegmentImage(bitmap);

// Extract foreground with transparent background
using var foreground = ImageSegmenterSINet.ExtractForeground(bitmap, result);
foreground.Save("foreground.png");

Features

  • ✅ Foreground/background segmentation using SINet
  • ✅ NPU hardware acceleration (QNN Execution Provider)
  • ✅ Automatic model download at build time (both float and quantized models)
  • ✅ Intelligent model selection: quantized for NPU, float for CPU
  • ✅ Easy-to-use async factory pattern
  • ✅ Multiple output formats (mask, overlay, extracted foreground)

Requirements

  • Windows 10 SDK 19041+
  • .NET 8.0+
  • NPU recommended for best performance (falls back to CPU automatically)

Model Selection

The library automatically downloads two ONNX models at build time:

  • Quantized (int8) model - Optimized for QNN NPU acceleration
  • Float (fp32) model - Optimized for CPU execution

At runtime, CreateAsync() intelligently selects:

  • Quantized model when QNN NPU is available
  • Float model when falling back to CPU

This ensures optimal performance and compatibility across different hardware configurations.

API

Method Description
ImageSegmenterSINet.GetReadyState() Check if feature is available
ImageSegmenterSINet.EnsureReadyAsync() Prepare dependencies
ImageSegmenterSINet.CreateAsync() Create segmenter instance
SegmentImage(Bitmap) Perform segmentation
CreateMaskOverlay(...) Visualize segmentation
ExtractForeground(...) Extract foreground with transparency

License

MIT License - see LICENSE file for details.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.