Closed drinkingkazu closed 7 years ago
Done @ https://github.com/LArbys/LArCV/commit/e4fc7f1ad157e5663cb39420f3d66d4c493bba73
One can run unit-test w/o any input data file:
cd app/ImageMod/test
python test_SegmentMask.py SegmentMask.cfg
python ../../../mac/view_rgb.py segmask.root
This unit test generates an image with all pixels filled with either "gamma ray" or "electron" with a producer label "original". Then a module relabels "gamma" to 0. (by default based on SegmentMask.cfg I pushed). Result can be checked on the viewer.
Similarly, one can run:
python test_MaskImage.py MaskImage.cfg
... which is a unit test for image masking one image based on the other
Getting back to segmentation work, our last brainstorm suggested one possible issue that cause 80% ceiling in the segmentation is the accuracy of labels. This was only preliminary checked back in April with SegmentationAna module which compares 2 images (ADC image and segmentation label image) and create a new image where pixels are filled in one but not the other. It does not check in both directions.
Another to-do from the brainstorm was to pre-train classification network with truly single particle type by masking all pixels that has nothing to do with a generation particle (i.e. so piminus won't have muminus nor proton in its image). This is because pre-training (i.e. classification weights) turned out to be pretty important for training segmentation (well I guess well known). So...
0) Module to mask ADC image based on segmentation image and vice versa for ALL pixels 1) Module to mask ADC image based on segmentation image for a specified particle type
are needed. Will work on them both.