Esempio n. 1
0
    def __init__(self):
        super(IMIPS, self).__init__(name='IMIPS',
                                    is_detector=True,
                                    is_descriptor=False,
                                    is_both=False,
                                    patch_input=False)

        graph, sess = hyperparams.bootstrapFromCheckpoint()
        self.forward_passer = hyperparams.getForwardPasser(graph, sess)
Esempio n. 2
0
def evalImips():
    net, sess = hyperparams.bootstrapFromCheckpoint()
    fpasser = hyperparams.getForwardPasser(net, sess)
    times = []
    for pair in eval_set:
        t = time.time()
        fps = [fpasser(i) for i in pair.im]
        times.append(time.time() - t)
        print(times[-1])
    return times
Esempio n. 3
0
# imips_open is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# imips_open is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with imips_open. If not, see <http:#www.gnu.org/licenses/>.

import imips.evaluate as evaluate
import imips.flags as flags
import imips.hyperparams as hyperparams
import imips.system as system

FLAGS = flags.FLAGS

if __name__ == '__main__':
    print(hyperparams.methodEvalString())
    eval_pairs = hyperparams.getEvalSet()
    graph, sess = hyperparams.bootstrapFromCheckpoint()
    forward_passer = hyperparams.getForwardPasser(graph, sess)

    for pair in eval_pairs:
        fps = [forward_passer(im) for im in pair.im]
        fps = system.unifyForwardPasses(fps)
        evaluate.renderMatching(pair, fps)