i'm trying make modifications on caffe in order accept 16 bit data.
succeded creating lmdb dataset filled 16 bit unsigned, unencoded 256x256 image instead of usual caffe 8 bit unsigned data, saved "string" usual 8 bit lmdb can created image_convert
or digits utilities.
i've changed io.py
functions array_to_datum
, datum_to_array
in order create lmdb @ 16bit "string" data. now, if use lmdb on caffe (just 4 classes), networks runs doesn't converge. suspect not reading data properly. problem is, io.py
functions array_to_blobproto
, blobproto_to_array
doesn't seems make distinction between internal data contents, , cannot find code should modify dealing 16bits.
give me hint work on?
edit: messing around in code, think 1 of possibility should create new data layer or new image data layer if work directly on png without going throught lmdb. trying modify c++ code not trivial task me, esp. cannot follow data flow inside code. see new layer can written in python. think new input data layer work nicely or slow down cnn performance?
i don't know converting , adapting caffe/lmdb interface, seems risky path take if not 100% doing.
instance, changed io functions in python interface, don't think caffe using interface when running command line (e.g., $caffe_root/build/tools/caffe train ...
). have looked cpp io functions in io.cpp
file?
i suggest alternative path: use hdf5 binary inputs instead of lmdb.
can convert 16bit images have float32 , store them in hdf5 files, input them caffe via "hdf5data"
layer.
read more hdf5 , caffe in thread.
Comments
Post a Comment