Comments (4)
Hi Taritree I think I have a fix inplace -- in addition I think I have provided a way to provide a set of "preset" configuration button a la Janet's request (if you agree with the changes I would encourage you to point her to the most current iteration of the viewer)
A made a number of changes
- PlotImage is a generic EventImage2D loader
- work_mat now contains whatever is in self.img_v upon object creation
- because of a pyqt quirk the image gets displayed upside down therefore I by default do work_mat[:,::-1,:] and orig_mat[:,::-1,:] so that it displays the correct way on the screen
- before caffe is called I run self.revert_image() to flip it back
- what goes into caffe is now a copy of work_mat, for the 12 channel image this means I went in and did your transpose operation (I hope I implemented correctly) in the abstract method
__caffe_copy_image__
. If you open upch12image.py
on line 41 you will see I make a copy, then transpose it for caffe. This function is called in line 161 ofplotimage.py
in theemplace_image()
definition on line 155. In this function I store theorig_mat
in thework_mat
, then make the copy for caffe (which includes transpose operation) then send this toTestWrapper
from larcv.
I don't have a pull request ready for you at the moment but I encourage you to checkout rgb_caffemod
and test it out the interface has changed a bit.
I also forgot to mention that the switching channels has been resolved. I'm not an expert in the 12 channel image so please ensure that in caffe_copy_image
that it's transposed correctly, work_mat
contains 12 nonzero channels, which is different than in your branch
from larcv.
I took a few minutes to verify things were going into the blob ok in the wrapper using your script, I hope I can save you the trouble of having to check this a second time! The transpose operation in ch12image.py here seems fine. I guess it goes into the caffe blob O.K. -- when I take a look at bnb_set1_ch12_supported.root
entry number 6
and dump using your savez line I see
and when I dump the lmdb bnb_set1_supported.db
there looks to be 1 or 2(?) tick offset just flipping the images back and forth as you probably mentioned already. The charge scale looks different as well which I also see -- sum of ADC from lmdb and sum of ADC from root file is 10^3 factor different. The output of compare_data_blob.py
you can find at this pastebin between the two. The lmdb and the bnb sample is probably just different, but at least it sits in the blob o.k.
I also took a look at test.root
which I think you created from bnb_set1_supported.db
using convert_lmdb2image2d
. The rows/colums look flipped to me in the viewer but that's no big deal.
There is no tick offset between entry 6 and 0*7_00 in the lmdb and I can match the network scores in the viewer and your python test script.
So in summary transpose operation before caffe is not needed for test.root
before it goes to the wrapper, but is for the bnb*supported.root
. In addition, bnb*supported.root
's adc values are higher. So I think i'll leave the current implementation as is, transpose before it goes to caffe. Also, sorry I snooped around your larbys directory ;). Hopefully I can put this to rest and push to master
from larcv.
I think this is a legacy feature so I would close this issue. But please re-open if appropriate!
from larcv.
Related Issues (20)
- larcv python script crashes when larlite is configured HOT 8
- LArbys/caffe UseThread: false doesn't fill HOT 2
- Can't Open RGB Viewer HOT 1
- PyROOT issue in viewer (and proposed fix) HOT 7
- enhanced hoverrect
- segmentation image not showing up in v05 production! HOT 2
- minor: app objects rebuild when typing make, even if nothing changes HOT 2
- production tools HOT 2
- Segmentation Relabeling HOT 2
- New modules HOT 1
- Supera failure HOT 3
- [LArbys/cafef] IO optimization HOT 1
- develop branch missing DataFormat/ParticleMass.h HOT 4
- error: no class named 'CircularBufferBase' in namespace 'larcv' HOT 2
- compiler error with DBSCAN code when using GCC 4 HOT 6
- UBWireTool.cxx not build HOT 2
- [CRITICAL] <MultiROICropper::process> MultiROICropper.cxx::L50 EventImage2D size 0 <= target channel 0 HOT 6
- error running vertex code. giving <VertexAna::process> Cannot find nearest wire for (-1,-1,-1) HOT 4
- Running vertex container gives me this error HOT 2
- Lot's of warning from signed versus unsigned integer comparisons HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from larcv.