This is the development repository for FRB detection model running on BLADE producing detections in a real time setting. To get started please create the CONDA environment.
# Create a new conda environment with Python
conda create -n frbnn python=3.11
# Activate the environment
conda activate frbnn
# Install pip dependencies from requirements-dev.txt
pip install -r requirements-dev.txt
To generate the data we must first sample the parameter space by running a latin hypercube sampler.
python datagen_latin.py
We can then select the backgrounds. This assumes that data is stored in some local directory in this case it is at the ATA site and contains all possible filterbank files to use for training/validation/testing /mnt/primary/ata/projects/p031. The below script will select the backgrounds for training, validation and testing.
python dataset_generator/save_obs.py
We can then generate the simulation by running
python dataset_generator/generate_simulation.py
The core simulation engine uses dataset_generator/scripts/generator.py
Lastly with all the data generated we can train the model
python CNN/train_mask.py
The model is define CNN/resnet_model_mask.py
We then export our model Convert_ONNX function from CNN/utils.py. This is for deployment stage. We also need to separately convert the preprocessor as well!
Model weights are made public. All model weights during training checkpoints are made public. The best performing model can be found here.