GithubHelp home page GithubHelp logo

caihao / iseecube Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chenli2049/iseecube

0.0 0.0 0.0 7.76 MB

Neutrino Events Reconstruction with Transformer.

License: MIT License

Python 1.25% Jupyter Notebook 98.75%

iseecube's Introduction

ISeeCube

Introduction

The goal of this project is to reconstruct the direction of neutrino events detected by IceCube Neutrino Observatory. It is based on the Kaggle competition IceCube - Neutrinos in Deep Ice. And the arXiv link is [2308.13285] Refine Neutrino Events Reconstruction with BEiT-3.

Install

  1. Clone the repository:

    git clone https://github.com/ChenLi2049/ISeeCube.git
  2. Navigate to the repository folder:

    cd ISeeCube
  3. Create conda environment iseecube:

    conda create -n iseecube python=3.8
  4. Install the required packages:

    pip install -r requirements.txt

Dataset

Please download the dataset and put it in the folder of this repository, the data folder should look likes this:

data/
├── sample_submission.parquet
├── sensor_geometry.csv
├── test
│   └── batch_661.parquet
├── test_meta.parquet
└── train
    ├── batch_1.parquet
    └── batch_2.parquet

Now you can run visualize_dataset.ipynb.

Train

  1. Download splitted train_meta and put it in the data folder.

  2. Download icecube_transparency and put it in the data folder.

  3. Run this command to create Nevents.pickle file in the data folder:

    python prepare_data.py

Now the data folder should looks like this:

data/
├── Nevents.pickle
├── ice_transparency.txt
├── sample_submission.parquet
├── sensor_geometry.csv
├── test
│   └── batch_661.parquet
├── test_meta.parquet
├── train
│   ├── batch_1.parquet
│   └── batch_2.parquet
└── train_meta
    ├── train_meta_1.parquet
    └── train_meta_2.parquet

To train S_RegA model on about 654 batches divided into 8 epochs, First create a folder named S_RegA and an empty file named history.csv in the created folder, then run this command:

python train.py

You can change the configuration of train.py to train a classification model, or load a pre-trained model and finetune it. For IceCubeModel_RegA, the 0~32 epochs are trained with L=196 and the 33∼40 epochs are trained with L=256.

Predict

Download pretrained model and put it in the pretrained_model folder in the folder of this repository. Then run predict.ipynb.

Acknowledgements

  • Thanks to IceCube and Kaggle for this amazing competition.
  • Lots of code are from 2nd place solution in the Kaggle competition. I really appreciate it.
  • Thanks to these repositories: torchscale, graphnet, fastai.
  • Kaggle solutions, discussions and notebooks are helpful.
  • Thanks to arxiv-style for such a beautiful LaTeX template.
  • Thanks to many other developers and communicators for their dedication.

iseecube's People

Contributors

chenli2049 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.