Skip to content

expnn/SwinYNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

markdown

Swin YNet – Transformer-based Real-time FRB & Pulsar Detection

Swin YNet is an end-to-end Transformer model that simultaneously detects Fast Radio Bursts (FRBs) / pulsars, segments their signals at pixel-level, and estimates Dispersion Measure (DM) & Time-of-Arrival (ToA)without de-dispersion preprocessing.
Trained only on simulated data, it generalises to real FAST observations and enables real-time, petabyte-scale blind searches on a single GPU.


🌟 Key Features

Feature Description
One-for-All Detection + Segmentation + DM/ToA estimation in a single forward pass.
No de-dispersion Operates directly on raw time–frequency data; no DM trials, no dedispersion cost.
SOTA performance on FAST-FREX F1 = 97.8%, Recall = 95.7%, and Precision = 100%.
Real-time speed Achieved 1.3–2.3× real-time speed on FAST CRAFTS data.
Petabyte ready Already processed 2.8 PB CRAFTS data, found 2 known pulsars.
Plug-and-play Outputs plug straight into PRESTO/prepfold and fitburst for refined folding & fitting.
Open & Easy Pure PyTorch; install with uv in one minute; supports FITS & SIGPROC files.

🚀 Quick Start

1. Install uv (if not yet)

curl -LsSf https://astral.sh/uv/install.sh | sh   # macOS / Linux
# Windows: powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

2. Clone & create environment

git clone https://github.com/expnn/SwinYNet.git
cd SwinYNet
uv venv --python 3.11 --managed-python
uv sync  # installs all deps (PyTorch, numpy, astropy, etc.)

Mainland China?
uv sync --index-url https://pypi.tuna.tsinghua.edu.cn/simple

3. Run inference

swinynet -c cfgs/te8hjj4j.yaml \
         -p data/input-fits-files \
         -o data/output/manifest.json

Get help anytime:
swinynet -h


📁 Repository Layout

SwinYNet
├── frbd/           # Core package
│   ├── model/         # Swin YNet architecture
│   ├── cfgs/          # YAML configs
│   ├── data/          # Data structures, FAST-FITS & SIGPROC readers
│   ├── config.py      # global configurations of this project
│   ├── theory.py      # Formulas & basic operations related to FRB or FRB data processing.
│   └── main.py        # Swin YNet inference entrypoint. 
└── cache/             # weights of the trained models. 

🔌 Integration with Existing Pipelines

Tool How Benefit
PRESTO / prepfold swinynetToA & DMDM & Periodprepfold faster & much fewer candidate files
fitburst Model masks & DM/ToA as priors fitting success ↑ 65% → 96%

📄 License

MIT © 2025 cyc – see LICENSE.

About

Swin YNet is a deep learning model for FRB detection, signal segmentation, and DM parameter estimation.

Resources

License

Stars

Watchers

Forks

Packages