StarNet2 CLI for macOS
======================

StarNet2 removes stars from astronomical images. This standalone command-line
release can also write a subtractive star mask and an unscreen star-layer
output.

This package is for the command-line tool. It is not a PixInsight module
installer.


Quick Start
-----------

Run the executable from this directory:

  ./starnet2 --input input.tif --output starless.tif

Optional outputs:

  ./starnet2 --input input.tif --output starless.tif --mask starmask.tif
  ./starnet2 --input input.tif --output starless.tif --unscreen stars.tif


Common Options
--------------

  --input, -i       Input image path.
  --output, -o      Starless output path.
  --mask, -m        Optional subtractive star-mask output path.
  --unscreen, -n    Optional unscreen star-layer output path.
  --weights, -w     Optional path to StarNet2 weights.
  --stride, -s      Tile stride. Must be even and between 2 and 512.
  --upsample, -u    Use intermediate 2x upsampling.
  --quiet, -q       Reduce terminal output.
  --eight, -e       Write TIFF/PNG output as 8-bit instead of 16-bit.
  --help, -h        Show command help.


Inputs And Outputs
------------------

Supported input sample depths:

  - 8-bit integer
  - 16-bit integer

Unsupported input depths, including 32-bit floating-point images, are rejected.
Convert those images to 16-bit integer before running the CLI tool.

By default, TIFF and PNG outputs are written as 16-bit integer images. Use
--eight to force 8-bit TIFF/PNG output.


macOS Notes
-----------

Keep the executable, weights file, and lib/ directory together. The package is
self-contained and uses package-local runtime libraries.

Current macOS release lanes:

  - Apple Silicon / arm64: Torch build, preferred forward release lane.
  - Intel / x64: TensorFlow legacy compatibility lane.

On first launch macOS may verify the notarized executable. If Gatekeeper blocks
execution, use the normal macOS security prompt to allow the application.


Legal
-----

See LICENSE.txt and files under lib/ for license information. By using this
software you agree to the applicable license terms.
