Skip to content

About

High-precision astrophotography analysis, full-resolution photometric star counting, DirectML YOLO11n AI detection, multi-panel mosaic stitching, blind geometric plate solving, 3D celestial sphere planetarium & two-way Stellarium sync.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

23 Commits

Folders and files

Repository files navigation

AstroCounter v1.3.0

Language / Dil: English (Default) | TΓΌrkΓ§e DokΓΌmantasyon (TR)

Build & Test Version License: MIT Framework ONNX Runtime Stellarium


Note

Project Scope:
AstroCounter is an open-source desktop application designed for astrophotography analysis, full-resolution photometric source extraction, multi-panel mosaic stitching, blind geometric plate solving, 3D celestial sphere visualization, and real-time Stellarium synchronization. It ships with a trained neural network model (models/astro_yolo11n.onnx) fine-tuned on Sloan Digital Sky Survey (SDSS DR16) astronomical cutouts and an embedded J2000 reference star and deep-sky catalog.


Overview

High-resolution astrophotography frames and multi-panel sky mosaics frequently exceed 24 MP to 100 MP+ and exhibit extreme dynamic range variationsβ€”from severely underexposed linear stacks to frames affected by urban sky glow or lossy JPEG compression. Standard object detection pipelines downscale full frames into small input tensors, causing faint stellar point sources and compact deep-sky objects to vanish.

AstroCounter v1.3.0 integrates four core astrophotography processing layers into a modern, minimalist Windows interface with movable in-app floating windows:

  1. Multi-Engine Source Detection (Hybrid Fusion, Photometry, DirectML): Combines analytical point-spread-function signal-to-noise ratio photometry (DAOStarFinder standard) with Slicing Aided Hyper Inference (SAHI) powered by a hardware-accelerated YOLO11n ONNX model via Windows DirectML.
  2. Format-Aware Per-Photo Auto-Confidence & Simultaneous Multi-Photo Light Processing: Automatically computes optimal noise knee-point thresholds per photograph in the backgroundβ€”applying stricter filtering on lossy formats (.jpg/.jpeg) to suppress compression artifacts while preserving faint 2σ–3Οƒ structures on lossless scientific formats (.tiff, .fits, .png). Display & Light adjustments (MTF Auto-Balance, Brightness, Exposure, Contrast) apply in real time across all selected photos in both 2D and 3D views.
  3. Blind Geometric Plate Solving & Multi-Tile Mosaic Alignment: Extracts sub-pixel stellar centroids, matches scale- and rotation-invariant geometric invariants against an embedded J2000 catalog using RANSAC, bridges adjacent panels via pairwise star-correspondence homography, and deduplicates 100,000+ stars across overlapping mosaic frames in spherical sky coordinates (RA/Dec).
  4. 2D Infinite Sky Canvas, 3D Planetarium Dome & 2-Way Stellarium Sync: Provides unconstrained 2D infinite canvas panning, an interactive 360Β° 3D celestial dome, bidirectional real-time camera synchronization with Stellarium in both 2D and 3D modes, and 360Β° Γ— 180Β° equirectangular panoramic exporting.

AstroCounter 3D Celestial Dome and Multi-Photo Light Controls


System Architecture and Processing Workflow

flowchart TD
    A["Input Astrophotographs (FITS / TIFF / PNG / JPG / BMP)"] --> B["Radiometric Analysis & Format-Aware Noise Knee-Point"]
    B --> C{"Exposure & Format State"}
    C -->|Underexposed| D["Astronomical MTF Stretch"]
    C -->|Overexposed| E["Bilinear Sky-Glow Subtraction"]
    C -->|Lossy vs Lossless| F["Per-Photo Auto-Confidence Calibration"]
    D --> G["Normalized Multi-Panel Image Buffers"]
    E --> G
    F --> G
    G --> H["Photometric PSF / SNR Engine"]
    G --> I["SAHI 640x640 Tiling + DirectML (YOLO11n ONNX)"]
    G --> J["Integral-Image Bright Star Extractor"]
    H --> K["Spherical RA/Dec Deduplication & Interactive Filtering"]
    I --> K
    J --> L["RANSAC Catalog Plate Solver + Pairwise Mosaic Bridging"]
    L --> M["Gnomonic WCS Solution (RA, Dec, Scale, Rotation)"]
    M --> N["2D Infinite Canvas & 3D Celestial Sphere Projection"]
    M <--> O["Two-Way 1:1 Stellarium HTTP Synchronization (2D & 3D)"]
Loading

Key Capabilities in v1.3.0

1. Modern Minimalist UI & Movable Floating Panels

  • In-Window Draggable Tool Panels: All utility drawersβ€”View & Layers (🏷️), Display & Light (β˜€οΈ), Auto-Confidence (⚑), Mosaic Tiles Management (πŸ–ΌοΈ), Advanced Export (πŸš€), and User Guide & Help Center (❓)β€”are movable floating windows that can be dragged anywhere inside the workspace.
  • Multi-Photo Selection & Clean Borderless Rendering:
    • Click photo cards in the Photos panel, use All (β˜‘), or hold Ctrl/Shift while double-clicking photos on the 2D/3D canvas to select multiple panels simultaneously.
    • Unselected photos render cleanly with no artificial outline border; only selected photos display an active cyan highlight border.
    • Double-clicking empty space in either 2D or 3D immediately clears all active selections.
  • Drag-and-Drop Layer Reordering: Reorder overlapping mosaic panels by dragging and dropping photo cards directly inside the Photos drawer or using quick layer buttons, paired with cosine S-curve feathered alpha blending.
  • Real-Time Multi-Stage Backend Telemetry: The status bar reports exact background operations stage by stage ([Stage 1/3 - Astrometry], [Stage 2/3 - Mosaic Alignment], [Stage 3/3 - Full-Resolution Star Counting]) so heavy multi-panel analyses remain responsive and transparent.

2. Dual Detection Engine (DirectML + Photometry) & SDSS-Trained YOLO11n

  • Toolbar Engine Selector & AI Badge: Switch seamlessly between Hybrid Fusion, Photometry, and DirectML modes, backed by the embedded AI Model: YOLO11n ONNX (models/astro_yolo11n.onnx) trained on real Sloan Digital Sky Survey (SDSS DR16) celestial cutouts (stars, galaxies, nebulae, and transient/satellite artifacts).
  • Format-Aware Per-Photo Auto-Confidence: Automatically calculates each photo's background noise knee-point upon import, adjusts sensitivity according to file format (lossy JPEG vs. lossless TIFF/FITS/PNG), and provides individual per-photo confidence sliders alongside global presets.
  • 2D Region-of-Interest (ROI) Scan Tools: Draw rectangular or polygonal Include (Scan only) and Exclude masks directly on the 2D canvas to isolate specific nebulae or mask out landscape foregrounds.

3. Simultaneous 2D/3D Display & Light Processing

  • Non-Linear Astronomical MTF & Manual Grading: Adjust Opacity, Brightness, Exposure (Gamma), Contrast, and Auto Exposure & Color Balance (MTF) in real time: $$\text{MTF}(t, m) = \frac{(m - 1)t}{(2m - 1)t - m}$$
  • Multi-Selection Synchronization: Adjustments made in the Display & Light (β˜€οΈ) panel apply simultaneously to all currently selected photos (or all loaded photos if none are explicitly selected) across both the 2D View and the 3D Celestial Dome.

4. 2D Infinite Canvas, 3D Planetarium Dome & 2-Way Stellarium Sync

  • Unconstrained 2D Infinite Panning: Pan freely in any direction beyond photograph edges on the 2D canvas without hitting scroll boundaries, and zoom smoothly around the cursor from 5% to 2000%.
  • Two-Way 1:1 Stellarium Synchronization (2D & 3D):
    • Clicking Live Sync: Connect automatically connects to (or launches) Stellarium with its HTTP Remote Control service on port 8090.
    • Panning or zooming in either AstroCounter's 2D View or 3D Celestial Dome updates Stellarium's sky position and FOV in real time, and steering Stellarium's camera updates AstroCounter synchronously.
  • 2D Mosaic & 360Β° Equirectangular Panoramic Export: Export either the 2D Canvas / Mosaic or a full 360Β° Γ— 180Β° Equirectangular Panoramic Sky Map (1x or 2x Super-Res 4K) in PNG, Lossless TIFF, JPG, CSV, or JSON formats with customizable overlay layers.

Screenshots and Interface Preview

1. High-Precision Photometric Detection, Multi-Photo Manager & Per-Photo Confidence

Sub-pixel stellar centroid extraction across signal-to-noise confidence tiers (>10Οƒ, 5-10Οƒ, 3-5Οƒ) with format-aware per-photo Auto-Confidence controls and drag-and-drop mosaic layer management. Photometric Detection and Per-Photo Confidence

2. 3D Celestial Sphere Planetarium Dome & Simultaneous Display & Light Controls

Interactive 3D celestial sphere projection with Hipparcos reference stars, constellation lines, and real-time multi-photo brightness, gamma exposure, contrast, and MTF auto-balance adjustments. 3D Celestial Dome and Display Light Settings

3. In-Frame Celestial Target Selection & View Layers Control

Automatic scanning of embedded celestial catalogs filtered strictly to objects inside the camera's field of view, paired with the draggable View & Layers floating window. In-Frame Catalog Target Selection

4. Spherical Coordinate Grid & Interactive Help Center

Gnomonic tangent-plane World Coordinate System (WCS) solution projecting curved Right Ascension and Declination lines onto the 2D infinite canvas alongside the bilingual User Guide & Help Center (❓). Plate Solved Coordinate Grid and Help Center

5. Advanced Export: 2D Mosaic Canvas & 360Β° Panoramic Sky Map

Export annotated 2D mosaics or 360Β° Γ— 180Β° equirectangular panoramic sky maps in PNG, Lossless TIFF, JPG, CSV, or JSON formats at 1x or 2x (4K) resolution. Advanced 2D and 360 Panoramic Export


Stellarium Installation and Configuration

To use two-way sky synchronization in 2D and 3D views, install the Stellarium desktop application on your system.

1. Download and Install Stellarium

2. Automatic Connection (Recommended)

If Stellarium is installed in its default directory (C:\Program Files\Stellarium), no manual configuration is required:

  1. Launch AstroCounter and click Live Sync: Connect on the top toolbar.
  2. AstroCounter automatically starts Stellarium in windowed mode with the HTTP Remote Control endpoint enabled on port 8090 and establishes a live two-way connection.

Installation and Usage

Option A: Portable Release (No Installation Required)

  1. Extract the AstroCounter-v1.3.0-Portable directory.
  2. Run AstroCounter.UI.exe directly on Windows 10/11 x64. No Python, CUDA, or separate .NET runtime installation is required.

Option B: Build from Source

Requirements: Windows 10/11 x64 and .NET 10.0 SDK.

# Clone the repository
git clone https://github.com/ghostkronos/AstroCounter.git
cd AstroCounter

# Run the automated xUnit test suite
dotnet test AstroCounter.sln -c Release

# Launch the application
dotnet run --project src/AstroCounter.UI/AstroCounter.UI.csproj -c Release

To build a self-contained portable release:

dotnet publish src/AstroCounter.UI/AstroCounter.UI.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:EnableCompressionInSingleFile=true -o ../AstroCounter-v1.3.0-Portable

Training a Custom YOLO11 ONNX Model on SDSS Survey Cutouts

AstroCounter includes an automated dataset builder and training script (scripts/train_real_astro_dataset.py) that downloads real astronomical survey cutouts from the Sloan Digital Sky Survey (SDSS DR16 SkyServer) and fine-tunes models/astro_yolo11n.onnx:

pip install ultralytics onnx onnxruntime requests pillow numpy
python scripts/train_real_astro_dataset.py

Repository Structure

AstroCounter/
β”œβ”€β”€ Directory.Build.props                # Deterministic build configuration
β”œβ”€β”€ AstroCounter.sln                     # Solution file
β”œβ”€β”€ assets/                              # UI logos, icons, sample images, and documentation screenshots
β”‚   └── screenshots/                     # v1.3.0 interface preview screenshots
β”œβ”€β”€ models/
β”‚   └── astro_yolo11n.onnx               # SDSS DR16 fine-tuned YOLO11n ONNX model
β”œβ”€β”€ scripts/
β”‚   └── train_real_astro_dataset.py      # SDSS DR16 real astronomical dataset builder & YOLO11 trainer
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ AstroCounter.Core/               # Core library (Photometry, SAHI, WCS, Mosaic, Stellarium API)
β”‚   β”‚   β”œβ”€β”€ Astrometry/                  # RANSAC star-pattern solver, pairwise mosaic solver, WCS, catalog
β”‚   β”‚   β”œβ”€β”€ Export/                      # 2D Mosaic, 360Β° Equirectangular Panorama, CSV & JSON exporters
β”‚   β”‚   β”œβ”€β”€ Inference/                   # DirectML ONNX and photometric detection engines
β”‚   β”‚   β”œβ”€β”€ Models/                      # Data contracts and ROI geometry
β”‚   β”‚   β”œβ”€β”€ Processing/                  # FITS/TIFF decoders, MTF auto-brightness, SAHI tiler
β”‚   β”‚   └── Stellarium/                  # Stellarium HTTP client and windowed launcher
β”‚   β”œβ”€β”€ AstroCounter.UI/                 # WPF desktop interface (MVVM, bilingual EN/TR, 2D & 3D Dome)
β”‚   └── AstroCounter.Tests/              # xUnit automated test suite (108 tests)
β”œβ”€β”€ README.md                            # English documentation (Default)
└── README.tr.md                         # Turkish documentation

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

High-precision astrophotography analysis, full-resolution photometric star counting, DirectML YOLO11n AI detection, multi-panel mosaic stitching, blind geometric plate solving, 3D celestial sphere planetarium & two-way Stellarium sync.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages