def test_threshold(self): images = self.load_test_images() net = Convnet.from_verbose(False) net.initialize() net.threshold = -1 results = net.predict_crosswalks(images) for res in results: self.assertEquals(res, True)
def testInitialize_model_is_loaded(self): net = Convnet.from_verbose(False) net.initialize() self.assertTrue(net.is_initialized()) self.assertIsNotNone(net.model)
def test_predict(self): images = self.load_test_images() net = Convnet.from_verbose(False) net.initialize() result = net.predict_crosswalks(images) self.assertEquals(len(images), len(result), msg="Number of images is unequal number of results")
def load_convnet(self): self.convnet = Convnet.from_verbose(self.verbose) self.convnet.initialize()