Skip to content

Commit 4c7472c

Browse files
committed
Prepare for release 0.2.0
1 parent 3106706 commit 4c7472c

File tree

6 files changed

+23
-15
lines changed

6 files changed

+23
-15
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
v0.1.1, 3/30/2018 -- Initial release.
2+
3+
v0.2.0, 4/9/2018 -- 3D version of PPN initial release.

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# faster-particles
22
This package includes the following:
33
* Toydata generator
4-
* LArCV data interface
4+
* LArCV data interface (2D and 3D)
55
* Pixel Proposal Network implementation using Tensorflow
66

77
## Installation
8+
### Dependencies
89
You must install [larcv2](https://github.com/DeepLearnPhysics/larcv2) and its
910
own dependencies (ROOT, OpenCV, Numpy) in order to use LArCV data interface.
1011
To install `larcv2`:
@@ -15,6 +16,7 @@ source configure.sh
1516
make
1617
```
1718

19+
### Install
1820
Then install `faster-particles` with Pip:
1921
```bash
2022
pip install faster-particles
@@ -35,22 +37,29 @@ To use toydata rather than LArCV data in the following sections, use option `--t
3537
LArCV data files can be specified with `--data` option. They can use regex, e.g. `ppn_p[01]*.root`.
3638

3739
### Training
38-
To train PPN on 1000 steps:
40+
The program output is divided between:
41+
* Output directory: with all the weights
42+
* Log directory: to store all Tensorflow logs (and visualize them with Tensorboard)
43+
* Display directory: stores regular snapshots taken during training of PPN1 and PPN2 proposals compared to ground truth.
44+
45+
To train PPN on 1000 steps use:
3946
```bash
4047
ppn train -o output/dir/ -l log/dir/ -d display/dir -n ppn -m 1000 --data path/to/data
4148
```
4249

43-
To train the base network (currently only VGG available) on track/shower classification task:
50+
To train the base network (currently only VGG available) on track/shower classification task use:
4451
```bash
4552
ppn train -o output/dir/ -l log/dir/ -d display/dir -n base -m 1000
4653
```
4754

55+
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).
4856

4957
### Inference
5058
To run inference with a minimal score of 0.5 for predicted points:
5159
```bash
5260
ppn demo weights_file.ckpt -d display/dir/ -ms 0.5
5361
```
62+
The display directory will contain snapshots of the results.
5463

5564
More options are available through `ppn train -h` and `ppn demo -h` respectively.
5665

faster_particles/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ class PPNConfig(object):
3232
TOYDATA = False
3333
# DATA = "/data/drinkingkazu/dlprod_ppn_v05/ppn_p[01]*.root"
3434
# DATA = "/stage/drinkingkazu/dlprod_ppn_v05/ppn_p01.root" # For 2D
35-
DATA = "/data/drinkingkazu/dlprod_ppn_v05/ppn_p00_0000_0019.root" # For 3D
35+
# DATA = "/data/drinkingkazu/dlprod_ppn_v05/ppn_p00_0000_0019.root" # For 3D
36+
DATA = ""
3637
DATA_3D = False
3738

3839
# Track configuration

faster_particles/demo_ppn.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,6 @@ def closest_gt_distance(im_proposals, gt_pixels):
239239

240240
def distances_plot(cfg, distances):
241241
plt.gcf().clear()
242-
print(distances)
243-
print(np.count_nonzero(np.greater(distances, 5)), len(distances))
244242
bins = np.linspace(0, 5, 20)
245243
plt.hist(distances, 100)
246244
plt.xlabel("distance to closest ground truth pixel")
@@ -288,8 +286,6 @@ def inference(cfg):
288286
blob = data.forward()
289287
summary, results = net.test_image(sess, blob)
290288
if cfg.NET == 'ppn':
291-
#print(blob, results)
292-
#im_proposals.extend(results['im_proposals'])
293289
im_labels.extend(results['im_labels'])
294290
im_scores.extend(results['im_scores'])
295291
im_proposals_filtered = display(blob, cfg, index=i, dim1=net.dim1, dim2=net.dim2, **results)

requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
matplotlib
2-
numpy
3-
scikit-learn
4-
scikit-image
5-
tensorflow-gpu
1+
matplotlib>=2.2.2
2+
numpy>=1.14.2
3+
scikit-learn>=0.18.1
4+
scikit-image>=0.12.3
5+
tensorflow>=1.3.1

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
setup(
55
name='faster-particles',
6-
version='0.1.6',
6+
version='0.2.0',
77
author='Laura Domine, Ji Won Park, Kazuhiro Terao',
88
author_email='temigo@gmx.com',
99
packages=find_packages(),
@@ -18,7 +18,7 @@
1818
long_description_content_type='text/markdown',
1919
url='https://github.com/Temigo/faster-particles',
2020
install_requires=[
21-
"matplotlib >= 1.5.3",
21+
"matplotlib >= 2.2.2",
2222
"numpy >= 1.13.1",
2323
"scikit-learn >= 0.18.1",
2424
"scikit-image >= 0.12.3",

0 commit comments

Comments
 (0)