← Back to home
AI TOOLS

AI Tools

Polaris comes with a full set of AI image-processing tools, and all of them run on your own hardware. No cloud, no subscription, nothing leaving your device. Besides the GraXpert models and four star-removal networks, Polaris trains and ships models of its own, released under the AGPL and built to run on the NPUs of the boards people actually buy.

At a glance

11 tools covering background extraction, denoising, deconvolution (AI and classical), star removal, halo removal, and 2x upscaling

5 backends browser GPU (WebGPU/WebGL), SBC GPU via OpenCL, Rockchip RKNN NPU, Qualcomm Hexagon NPU (QAIRT), plus an always-available CPU fallback

100% local all inference runs on your device; models are cached in IndexedDB after the first download

4 precisions fp32, fp16, int16 and int8 (Quantization-Aware Training). The int16 and int8 builds are what make the NPU backends possible

Image Processing Tools

🌫️

Background Gradient Extraction

BGE Polaris + GraXpert models

Removes light-pollution gradients, vignetting, and uneven sky glow from linear frames. The neural network predicts the background plane itself rather than fitting a polynomial, so it follows structure a fitted surface cannot. Two models are available: GraXpert's, and Polaris's own, trained from scratch and released under the AGPL.

  • Two models: the GraXpert model (NonCommercial licence) and the Polaris model (AGPL, trained from scratch on real astrophotos). Both are downloaded on demand; pick whichever suits your licensing and hardware
  • NPU-ready: the Polaris model also ships an int16 build, which is what lets it run on the Rockchip and Hexagon NPUs; the GraXpert model is fp32/fp16 only
  • Predicts the background: the model outputs the gradient surface, which is then subtracted, so real nebulosity is not flattened away with the gradient
  • Linear frames: run it before stretching, on calibrated masters, for the cleanest result
  • Where: FILES tab, AI Tools toolbar, and the image Editor

AI Denoise

Denoise Polaris + GraXpert models

Removes sensor noise (shot noise, read noise, thermal noise) while preserving fine astronomical detail. Three models are available: GraXpert v2 and v3, and Polaris's own, trained from scratch and released under the AGPL. Processing is tiled with cosine-feathered blending so no tile seam appears in the output.

  • Three models: GraXpert v2 (lighter, for slower hardware) and v3 (higher capacity, better on faint detail and star spikes), both NonCommercial; plus the Polaris model (AGPL)
  • The only one that fits every NPU: the Polaris model ships int16 and int8 builds. GraXpert v3 cannot run on the Qualcomm Hexagon at all, because it uses LayerNorm and that needs a V73 or newer NPU
  • Tiled with feathered borders: images of any size are processed in overlapping patches, so no boundary artefact is visible
  • Colour and mono: both RGB and single-channel FITS are supported; the pipeline handles the channel layout automatically
  • Linear and stretched: works at both stages; best results on linear calibrated masters before stretching
  • Where: FILES tab, AI Tools toolbar, and the image Editor

AI Deconvolution: Stars

Decon GraXpert model

Sharpens point sources (stars) blurred by atmosphere, tracking error, or optical diffraction using a GraXpert neural network trained specifically on star fields. Produces tight, round stars without the ringing artefacts common in classical approaches.

  • Star-focused: the model is trained to sharpen compact point sources; it understands that stars should be round and not produce halos
  • Complements the Objects model: run Stars first, then Objects to sharpen both point sources and extended structure
  • Tiled 256x256: feathered overlap blending; safe on full-resolution masters
  • Before/after slider: inline comparison slider in the UI lets you judge the effect before saving
  • Where: FILES tab and AI Tools toolbar, under AI Sharpen
🌌

AI Deconvolution: Objects

Decon GraXpert model

Sharpens extended objects such as galaxies, nebulae, and clusters. The GraXpert Objects model is optimized for spatially extended structure rather than point sources, recovering fine detail in galaxy arms, dust lanes, and emission regions.

  • Extended structure: trained on galaxy and nebula images to sharpen fine structural detail without over-sharpening smooth emission regions
  • Pair with Stars: for full-image processing, run the Objects model after the Stars model; each complements the other
  • Tiled 256x256: feathered overlap blending; no tile seams in the output
  • Strength control: adjustable strength slider (0.1 to 1.0) lets you dial in the effect
  • Where: FILES tab and AI Tools toolbar, under AI Sharpen
🔭

Polaris Deconvolution (Detail)

Detail v1.2 Polaris model

Polaris's own deconvolution network, trained from scratch on synthetic (sharp, blurred) pairs: every real astro image is already blurred by seeing, so there is no clean ground truth to learn from. Convolving sharp targets with a known PSF gives perfect pairs in unlimited quantity.

  • Quantization-first architecture: designed so the int8 and int16 exports lose nothing. BatchNorm instead of LayerNorm, nearest-upsample plus conv instead of ConvTranspose, and a single input tensor
  • Why those choices: they come from the NPU work. The Hexagon V68 rejects LayerNorm outright (it needs V73 or newer), ConvTranspose produces checkerboard artefacts that quantize badly, and GraXpert's multi-input design is what kept its deconvolution CPU-only
  • Runs everywhere: one model lowers cleanly to Hexagon (int8/int16), Rockchip RKNN (fp16), the Adreno GPU, plain CPU, and the browser through ORT Web
  • Versions: v1.1 ships fp32, fp16, int16 and int8; v1.2 adds a w8a16 build tuned for the Hexagon HTP
  • Where: FILES tab, AI Tools toolbar, and the image Editor
🔬

Classical RL Deconvolution

Physics-based Algorithm

Richardson-Lucy deconvolution driven by a PSF measured directly from the stars in the frame. The algorithm reverses the blurring introduced by atmosphere, tracking, and optics using the actual optical response of the imaging system rather than a generic neural network.

  • Measured PSF: Moffat profile fit to real stars in the frame extracts FWHM, eccentricity, and orientation; the PSF is specific to that capture session
  • White 1994 damping: corrections are gated by a per-pixel noise model; low-SNR regions are left untouched, preventing noise amplification
  • Photon-transfer noise model: sigma is estimated from the frame itself using a shot + read noise model (sigma = sqrt(A*S + B)); no calibration input needed
  • Star protection: a feathered mask around detected stars composites original star cores back after deconvolution, preventing ringing at bright sources
  • FWHM and star stats: FWHM in pixels, eccentricity, and number of stars used are reported after each run
  • Where: FILES tab under AI Sharpen, Classical RL option
🗺️

Field Deconvolution

Spatially varying Algorithm

Extends Classical RL to handle field curvature, coma, and tilt: the PSF is measured independently in a configurable grid of tiles across the frame. Each tile gets its own PSF, and the results are blended with cosine feathering. Ideal for wide-field imagers where star shapes change from center to corner.

  • Per-tile PSF: Moffat profiles fitted in each grid cell independently; a corner affected by coma uses a different kernel than the center
  • Configurable grid: 2x2 to 8x8 tiles; more tiles give finer spatial correction at the cost of longer measurement time
  • Feathered blending: cosine blend between adjacent PSF regions; the transition is invisible in the final image
  • Fallback: tiles with too few stars fall back to the nearest measured PSF, so the whole frame is always processed
  • Where: FILES tab under AI Sharpen, Field RL option
🌐

Browser RL Deconvolution

Client-side Algorithm

A new mode where the server measures the PSF and noise model (typically 5 to 15 seconds), returns a compact JSON payload, and the browser runs the heavy Richardson-Lucy iteration loop entirely in JavaScript. The SBC server CPU stays free for guiding, sequencing, and capture during the job.

  • Server does the science: PSF extraction, noise model fit, and star detection all run server-side; these are fast and CPU-light
  • Browser does the work: a pure-JavaScript FFT engine (radix-2 Cooley-Tukey) runs 512x512 tiled overlap-save RL iterations in the browser
  • Real-time progress: a progress bar updates after each iteration; you can see the image sharpen live in the before/after slider
  • Same algorithm: identical White 1994 damped RL, star protection, and noise gating as the server-side version
  • Enable it: in the AI Sharpen modal, check the 'Run in browser' checkbox (global RL mode only; field mode stays server-side)
🚫

Star Removal

4 models GraXpert model

Removes stars while preserving nebulosity, for narrowband and starless processing workflows. Polaris offers four different star-removal networks rather than one, and three of them are MIT-licensed, so they can be used commercially.

  • nox colour and nox gray (MIT): StarNet-like networks in separate colour and monochrome builds; pick the one matching your data. 208 MB each, or 104 MB in FP16
  • starrem2k13 (MIT): a lighter U-Net at 119 MB (59 MB FP16), the fastest of the four and a good first choice on an SBC
  • StarNet++ (NonCommercial): the original network, included for compatibility with existing workflows. Its licence forbids commercial use, which is why the MIT alternatives exist
  • arm64 throughout: all four run as ONNX on Raspberry Pi, Orange Pi and Radxa boards. StarNet v2 is excluded on purpose: it is an x86-only binary
  • Blend-back control: after removal the original stars can be blended back at any opacity, for a final image with softened rather than absent stars
  • Where: FILES tab and AI Tools toolbar, Remove Stars option
💫

Halo Removal

Polaris v1.0 Polaris model

Polaris's own neural network, trained from scratch on real astrophotos, removes the diffraction halo rings that appear around bright stars in fast refractors and Newtonians. Unlike classical approaches, the model understands the spatial context of each star and avoids removing genuine nebulosity near bright sources.

  • Polaris-native model: trained on our own dataset of real astrophotos with synthetic halo augmentation; not a GraXpert repackage
  • Context-aware: RGB 3-channel input gives the model enough context to distinguish halos from nearby nebulosity and emission regions
  • Evaluated at 50+ dB PSNR: fp16 variant is essentially lossless vs fp32; int16 is within 0.03 dB
  • Four precisions: fp32 (reference), fp16 (recommended), int16 (NPU/PTQ), int8 with QAT for maximum compression
  • Where: AI Tools toolbar and the Editor's AI section, Halo Removal option
  • Precisions: fp32, fp16 and int16; the int16 build is the one that runs on the NPUs
🔍

AI Upscaling

Polaris v1.0 Polaris model

Super-resolution 2x upscaling using Polaris's own UpscaleNet, a residual U-Net architecture trained on real astrophotos and designed for NPU-friendly int8 quantization. Useful for preparing images for large prints, high-DPI displays, or recovering more detail at the pixel level.

  • Polaris UpscaleNet: custom residual U-Net; internally 2x-upsamples before the encoder, so the network processes the full high-resolution feature space
  • Evaluated at 50.22 dB PSNR: fp16 (50.22 dB) is indistinguishable from fp32 (50.21 dB); int16 within 0.03 dB
  • int8 via QAT: Quantization-Aware Training brings int8 back to near-lossless after PTQ showed a 3.3 dB degradation
  • 2x scale: output is double the input dimensions in both axes; a 3000x2000 frame becomes 6000x4000
  • Where: AI Tools toolbar and the Editor's AI section, Upscale option
  • Precisions: fp32, fp16, int16 and an int8 build produced by Quantization-Aware Training, at 19 MB the smallest model Polaris ships

Acceleration Backends

Polaris automatically selects the best available inference backend for your hardware. Models are downloaded once and cached; the backend probe runs at startup and can be overridden in Settings.

🌐

ORT Web (Browser GPU)

WebGPU / WebGL

ONNX Runtime Web runs models directly in your browser using the GPU on your viewing device, keeping the SBC server CPU free. WebGPU is selected first (requires HTTPS), falling back to WebGL on HTTP or older browsers.

  • Zero server load: inference runs entirely in the browser; the server only serves the model file once
  • IndexedDB cache: models are stored in browser storage after the first download; subsequent runs are instant even offline
  • fp16 native: GPU shaders run fp16 at full speed; WebGPU also supports fp32 for reference
  • HTTPS for WebGPU: WebGPU requires a secure context; Polaris includes a self-signed certificate for LAN use

OpenCL (SBC GPU)

Adreno / Mali / other

The server-side GPU accelerates compute-heavy pixel operations (stacking, alignment, normalization) via OpenCL. Works on Adreno, Mali, PowerVR, and other OpenCL 1.2+ GPUs common in ARM SBCs. Automatic probe with CPU fallback.

  • Pixel math: stacking (sigma-clip, kappa, mean), star alignment, per-pixel normalization all run on the GPU
  • Auto-probe: Polaris tests the GPU at startup; if the probe fails it silently falls back to CPU
  • Silk.NET binding: cross-platform P/Invoke via Silk.NET.OpenCL; no vendor SDK required
  • Toggle: enable or disable in Settings; benchmark shows GPU vs CPU throughput on your hardware
🧠

RKNN / NPU

Rockchip RK3588

The Neural Processing Unit in Rockchip RK3588 SoCs (Orange Pi 5 Pro, Radxa Rock 5, and others) runs ONNX models at 5x the CPU speed via the RKNN runtime. Models are converted to RKNN format with optional INT8 quantization.

  • 5x speedup: measured 91 ms vs 457 ms per BGE/denoise tile vs CPU on RK3588
  • RKNN conversion: a bundled conversion script turns ONNX fp16/int8 models into .rknn format; the runtime loads them transparently
  • INT8 support: RKNN do_quantization with our calibration set gives a further 2x memory reduction over fp16
  • Auto-fallback: if the RKNN runtime is not available or a model conversion fails, the system falls back to CPU ORT
📱

QAIRT / QNN

Qualcomm Hexagon

Qualcomm AI Runtime (QAIRT, formerly QNN) runs models on the Hexagon NPU (HTP) in Qualcomm SBCs such as the Radxa Dragon Q6A (QCS6490, Hexagon V68). The Hexagon HTP is integer-only, so Polaris ships int16 models as the default, near-fp16-quality path.

  • Hexagon HTP (int16): the production path runs int16 models at about 29.5 ms/tile on the Q6A - roughly 150x the CPU onnxruntime baseline - freeing the CPU for live stacking
  • int8 turbo: an int8 model is ~4x faster (~7.3 ms/tile) but visibly lower quality on denoise, so it is an optional 'turbo' mode rather than the default
  • Integer-only, fp16 falls back: the QCS6490 HTP has no fp16; fp16 models run on the GPU or CPU instead. The resolver prefers fp16 → int16 → int8, keeping fp16 for future SoCs whose HTP supports it
  • Auto-detect + override: detected via the Hexagon FastRPC bridge and the bundled QAIRT runtime; force it off with POLARIS_DISABLE_QNN=1
  • Tested on: Radxa Dragon Q6A (QCS6490, Hexagon V68); CPU benchmark score 317, the fastest board in our benchmark table
💻

CPU Fallback

Always available

All models run on CPU via ONNX Runtime when no hardware accelerator is available or selected. No configuration required; performance scales with the number of CPU cores and threads.

  • Zero setup: ORT CPU is always the last resort; Polaris will always be able to run AI tools regardless of GPU availability
  • Multi-threaded: ORT uses all available CPU threads for tiled inference; a Raspberry Pi 5 (4 cores) achieves acceptable throughput for light use
  • fp32 and fp16: CPU backend supports both precision levels; int8 via ORT INT8 quantized operators
  • Override: you can force CPU in Settings to reproduce a reference result or to leave the GPU free for other workloads

Model Precision

Each AI model ships in multiple precision variants. Polaris's own models are produced using a full training pipeline: fp32 baseline, near-lossless fp16 export, static int16 PTQ, and int8 Quantization-Aware Training (QAT) for artefact-free compression.

fp32 Reference

Full 32-bit floating-point. Largest files, highest memory, used as training baseline and for CPU reference runs.

All exported models start here. Rarely used in production but essential for verifying that quantized variants are lossless.

fp16 Recommended

16-bit float exported via onnxconverter-common. Essentially lossless vs fp32 (delta less than 0.01 dB PSNR in our evaluations). Roughly 2x smaller. Runs natively on GPU and NPU accelerators.

Default for ORT Web (WebGPU/WebGL), OpenCL, and RKNN fp16 paths. Best balance of quality, speed, and file size.

int16 NPU-friendly

16-bit integer via static Post-Training Quantization (PTQ). Lossless in practice (within 0.03 dB of fp32). Preferred for RKNN and Qualcomm QNN deployments that want integer arithmetic without int8 accuracy loss.

QDQ (Quantize-Dequantize) nodes inserted by onnxruntime-tools around every tensor. The calibration set comes from the training data.

int8 (QAT) Maximum compression

8-bit integer produced by Quantization-Aware Training: STE fake-quant hooks inserted during fine-tuning so the model learns to compensate for quantization error from the start.

PTQ int8 showed -3.3 dB PSNR degradation for upscale. QAT brings this back to near-lossless. Halo Removal and Upscaling now ship with QAT models; bge and denoise to follow.

All tools run locally. No subscriptions. Your images stay on your device.

Download Polaris