Interactive Segmentation and Visualization for Tiny Objects in Multi-megapixel Images

Chengyuan Xu, Boning Dong, Noah Stier, Curtis McCully, D. Andrew Howell, Pradeep Sen, Tobias Höllerer · DOI

Abstract

Detecting tiny, pixel-sized objects in massive high-resolution images is a significant challenge in scientific imaging. We present an open-source, browser-based framework that unifies deep-learning inference, high-dynamic-range (HDR) visualization, and manual mask editing. Originally designed for cosmic ray detection in astronomical data, this toolkit enables a human-in-the-loop workflow for multi-megapixel data across various scientific domains.

Introduction: The "Needle in a Haystack" Problem

In astronomical imaging, high-energy cosmic rays (CRs) frequently contaminate CCD sensors, appearing as bright streaks or spots. These artifacts are often only a few pixels wide, making them difficult to distinguish from stars or galaxies. The challenge is compounded by the scale of modern images (up to 3,000 megapixels) and the high dynamic range (HDR) of the data, which requires specialized scaling for visualization. Existing workflows are often fragmented, requiring researchers to switch between multiple software tools for detection, visualization, and correction.

The Cosmic-CoNN Toolkit

To address these challenges, we developed a "three-in-one" toolkit built on a Flask backend and a JavaScript frontend. The framework provides three distinct interfaces to cater to different user needs: a web-based interactive application, a Python API, and a command-line interface (CLI).

The Cosmic-CoNN framework supports multiple interaction modes, including a Python API for model initialization and a CLI for batch processing of FITS files.

Interactive Web Application

The core of the toolkit is the browser-based GUI, which facilitates seamless human-in-the-loop interaction. Key features include:

  • Synchronized Dual-Window Visualization: Users can view the science image and the segmentation mask side-by-side. Panning or zooming in one window automatically updates the other, allowing for immediate verification of detections.
  • HDR Image Processing: The tool implements specialized mapping algorithms, such as zscale, to convert 16-bit HDR data into viewable 8-bit formats in real-time.
  • Thumbnail Shortcuts: To navigate massive images, the UI provides thumbnails of detected objects, ranked by size, allowing users to jump instantly to specific regions of interest.
  • Manual Editing and Thresholding: Users can globally adjust the detection probability threshold or use a pixel-level "pencil tool" to manually add or remove mask pixels.
The interactive web application UI features synchronized windows for image and mask, a gallery of detection thumbnails, and controls for real-time thresholding and editing.

Datasets and Performance

The framework was evaluated using the Cosmic-CoNN dataset, comprising over 4,500 observations from the Las Cumbres Observatory (LCO). This dataset presents an extreme class imbalance (1:10,000 CR-to-background pixels).

The underlying deep learning model achieved a 99.91% true-positive rate (TPR) with a minimal 0.01% false-positive rate on LCO data. Furthermore, the model demonstrated strong generalization, maintaining over 96.40% TPR on data from external observatories. In terms of efficiency, the toolkit can process and render a 4-megapixel image in approximately 3 seconds on a consumer-grade GPU.

Conclusion and Future Work

By integrating complex deep learning models into an accessible web interface, this toolkit lowers the barrier for domain experts to utilize state-of-the-art AI. Future developments will focus on instance segmentation to distinguish overlapping objects and the integration of active learning to improve models based on user edits in real-time.

Source: Interactive Segmentation and Visualization for Tiny Objects in Multi-megapixel Images (Xu et al.)
Code & Data: https://github.com/cy-xu/cosmic-conn

Summary updated

BibTeX
@inproceedings{xu2022interactive,
  author = {Chengyuan Xu and Boning Dong and Noah Stier and Curtis McCully and D. Andrew Howell and Pradeep Sen and Tobias Höllerer},
  title = {{Interactive Segmentation and Visualization for Tiny Objects in Multi-megapixel Images}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
  doi = {10.1109/cvpr52688.2022.02077},
}
Figure