The circumstances remaining an abstraction, I need to train a convolutional network and then run this convolutional network over a sliding window on an image. The goal will be to build a heatmap for making pixel perfect detection boundaries for certain objects.
I'm wondering if there is an easy way in keras to train a network and then turn it into a convolutional network without needing to run loops over an image, which is very slow?
I'm thinking I can just copy the trained convolutional filters into a larger convolutional network.
If not, I'll need to go directly to tensorflow.
This is easily done in Keras, as long as you use a fully convolutional net, i.e. replace any dense layers by a convolutional layer with kernel size 1.
The easiest way to get started is to use one of the pre-trained nets included in Keras, see https://keras.io/applications/ how this is done for custom input size. If you've trained your own fully convolutional net 'old_model', just do: