Example #1
0
 def test_similarity_user_all(self, monkeypatch):
     monkeypatch.setattr(features.Features, '_Features__sim_size',
                         lambda self, i, j: 1)
     monkeypatch.setattr(features.Features, '_Features__sim_texture',
                         lambda self, i, j: 1)
     monkeypatch.setattr(features.Features, '_Features__sim_color',
                         lambda self, i, j: 1)
     monkeypatch.setattr(features.Features, '_Features__sim_fill',
                         lambda self, i, j: 1)
     w = features.SimilarityMask(1, 1, 1, 1)
     f = features.Features(self.dummy_image, self.dummy_label, 1, w)
     assert f.similarity(0, 1) == 4
Example #2
0
 def setup_method(self, method):
     self.dummy_image = numpy.zeros((10, 10, 3), dtype=numpy.uint8)
     self.dummy_label = numpy.zeros((10, 10), dtype=int)
     self.f = features.Features(self.dummy_image, self.dummy_label, 1)
Example #3
0
 def setup_method(self, method=None, w=10, h=10):
     self.h, self.w = h, w
     image = numpy.zeros((self.h, self.w, 3), dtype=numpy.uint8)
     label = numpy.zeros((self.h, self.w), dtype=int)
     self.f = features.Features(image, label, 1)
Example #4
0
 def setup_method(self, method):
     image = numpy.zeros((10, 10, 3), dtype=numpy.uint8)
     label = numpy.zeros((10, 10), dtype=int)
     self.f = features.Features(image, label, 1)