Point Proposal Network for particles images and related tools.
Project description
faster-particles
This package includes the following:
- Toydata generator
- LArCV data interface (2D and 3D)
- Pixel Proposal Network implementation using Tensorflow
Installation
Dependencies
You must install larcv2 and its
own dependencies (ROOT, OpenCV, Numpy) in order to use LArCV data interface.
To install larcv2
:
git clone https://github.com/DeepLearnPhysics/larcv2.git
cd larcv2
source configure.sh
make
Install
Then install faster-particles
with Pip:
pip install faster-particles
Alternatively, you can also clone the source:
git clone https://github.com/Temigo/faster-particles.git
cd faster-particles
Usage
The following assumes you installed with pip. If you cloned the source, make
sure you are in the root directory and replace ppn
with python faster_particles/bin/ppn.py
.
To use toydata rather than LArCV data in the following sections, use option --toydata
.
LArCV data files can be specified with --data
option. They can use regex, e.g. ppn_p[01]*.root
.
Training
The program output is divided between:
- Output directory: with all the weights
- Log directory: to store all Tensorflow logs (and visualize them with Tensorboard)
- Display directory: stores regular snapshots taken during training of PPN1 and PPN2 proposals compared to ground truth.
To train PPN on 1000 steps use:
ppn train -o output/dir/ -l log/dir/ -d display/dir -n ppn -m 1000 --data path/to/data
To train the base network (currently only VGG available) on track/shower classification task use:
ppn train -o output/dir/ -l log/dir/ -d display/dir -n base -m 1000
To train on 3D data, use the argument -3d
and don't forget to specify the image size with -N
argument (e.g. 192 for a compression factor of 4, see larcvdata_generator.py
for more details).
Inference
To run inference with a minimal score of 0.5 for predicted points:
ppn demo weights_file.ckpt -d display/dir/ -ms 0.5
The display directory will contain snapshots of the results.
More options are available through ppn train -h
and ppn demo -h
respectively.
Authors
K.Terao, J.W. Park, L.Domine
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for faster_particles-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eea983b65167f2223a6b6d4db1bef8abdfb7d7c2807e1271e41232b809f6e349 |
|
MD5 | f654f88ebdc85fb47ca978c70b5b4f51 |
|
BLAKE2b-256 | 92255c123cb797dfd11e259098b3a4f915c4acbd4c0d35aa227868ab6f6969ac |