Online Feature Extraction with C++
I am looking for an example where we can extract features from a Caffe model for new images getting generated in C++ The current way that I saw of using extract_features.bin is time-consuming since it needs to read the model in real-time froim disk. Any example where we can read the model once, cache it and as soon as a new image arrives, extract features from it in C++ will be helpful
See https://github.com/beniz/deepdetect/blob/master/src/caffelib.cc#L1838 it extracts any requested layer out of a pre-loaded model, and outputs the layer values, possibly in batch. You'd need to replace it into pure Caffe context, but the core of what you appear to be looking for is there.
Additionally, https://github.com/facebook/fb-caffe-exts/ also has a helper library that we use at Facebook. Hope these examples help. Thanks!