Skip to content
 
 

Latest commit

 

History

711 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A forked version of the pytorch implementation of Detectron from https://github.com/roytseng-tw/Detectron.pytorch Contact joshua.mills@tufts.edu or taritree.wongjirad@tufts.edu for questions.

Be sure to use the larcv1_mcc9 branch!

The original implementation is modified to use a custom particle physics dataset, and run on MicroBooNE LArTPC images. For details see https://microboone.fnal.gov/wp-content/uploads/MICROBOONE-NOTE-1081-PUB.pdf

Further modifications to the original network include the sparsification of the ResNet module, this is performed in https://github.com/NuTufts/Detectron.pytorch/blob/larcv1_mcc9/lib/modeling/SparseResNet.py based off of sparse convolutions from Facebook's SparseConvNet https://github.com/facebookresearch/SparseConvNet which is included in this repo. These sparse convolutions serve to speed up the ResNet runtime for low pixel-occupancy LArTPC images.

To train the network edit a config file based off of: https://github.com/NuTufts/Detectron.pytorch/blob/larcv1_mcc9/configs/baselines/mills_config_2_full_image.yaml

Then run

python tools/train_particle.py --dataset particle --cfg configs/baselines/mills_config_2_full_image.yaml --use_tfboard

To resume training from checkpoint:

python tools/train_particle.py --dataset particle --cfg configs/baselines/mills_config_2_full_image.yaml --use_tfboard --resume --load_ckpt path/to/ckpt/file.pth

To inference on events use infer_particle.py

python tools/infer_particle --dataset particle --cfg configs/baselines/mills_config_2_full_image.yaml --load_ckpt path/to/ckpt/file.pth --image_dir path/to/imagefile/ --output_dir path/to/outpngs/ --num_images 10

The tools directory generally contains the training and analysis scripts used to examine the network performance. To modify the network to run on a custom dataset modify lib/datasets/larcvdataset.py

About

A pytorch implementation of Detectron. Both training from scratch and inferring directly from pretrained Detectron weights are available. Updated for use with Particle Physics Data from MicroBooNE in the form of ROOT files using a larcvdataset.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages