GithubHelp home page GithubHelp logo

aobol / cpu-net Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 3.0 16.13 MB

Cyclic Positional U-Net (CPU-Net) is a transfer learning model for ad-hoc pulse shape translation in HPGe detectors.

License: MIT License

Python 1.07% Jupyter Notebook 98.93%

cpu-net's Introduction

CPU-Net

Cyclic Positional U-Net (CPU-Net) is a transfer learning model for ad-hoc pulse shape translation in HPGe detectors.

Key Highlights

  • CPU-Net utilizes a cycle GAN architecture coupled with positional encoding to accurately translate pulse shapes.
  • Utilizes U-Net architecture with positional encoding for its generators (A2B and B2A). This allows for accurate pulse translation between real and simulated data while maintaining cycle and identity consistency.
  • Discriminators (DA and DB) are Recurrent Neural Networks (RNN) with attention mechanisms, evaluating translated pulses and optimizing the performance of generators through adversarial training.
  • CPU-Net accurately translates the simulated pulses to match data pulses, while reproducing the ensemble distribution of the data.
  • Although designed for HPGe detectors, CPU-Net's architecture is adaptable to different scientific domains for convoluting and deconvoluting noise.

Dataset Preparation

The model expects datasets in .pickle format containing dictionaries with pulse data and attributes. Structure your dataset accordingly and update the dataset paths in the provided notebooks to point to your data files.

Usage

Files and Directories

  • network.py: Contains the CPU-Net model architecture.
  • dataset.py: Defines a function for loading and preprocessing pulse data into Pytorch Dataloader.
  • tools.py: Includes utilities for data processing, pulse analysis, and evaluation metrics.
  • TrainAndPlot.ipynb: Jupyter notebook for training the model and visualizing results.
  • Analysis.ipynb: Notebook for model performance analysis on unseen data.

Training

Open TrainAndPlot.ipynb and follow the steps for data loading, model training, and visualization of results. The notebook outlines the training process, including:

  • Data preprocessing.

  • Model initialization.

  • Training loop execution.

  • Model saving.

  • GPU: Nvidia A100 GPUs

  • RAM usage: About 6Gb

  • Training Time: 60 mins

Analysis

Use Analysis.ipynb to evaluate the model on test data. This notebook allows for:

  • Pulse transformation through the CPU-Net.
  • Comparison of real, simulated, and transformed pulses.
  • Visualization and statistical analysis of the results.

License

This project is released under the MIT License - see the LICENSE file for details.

Contact and Support

For questions, feedback, or contributions to the CPU-Net project, please feel free to reach out. You can contact us via email:

  • Kevin Bhimani

    • Email: [email protected]
    • For: Technical queries, bug reports, and development contributions.
  • Aobo Li

    • Email: [email protected]
    • For: General inquiries, research collaboration, and project insights.

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.