예제 #1
0
 def compare(yi, ypi, yp2i):
     for start, stop in yi:
         aypi = argmax(ypi)
         mask = np.zeros(yp2i.shape)
         mask[aypi[0], aypi[1]:] = np.ones([yp2i.shape[1] - aypi[1]])
         if tuple(start) == aypi and (stop[0], stop[1]-1) == argmax(yp2i * mask):
             return True
     return False
예제 #2
0
 def compare(yi, ypi, yp2i):
     for start, stop in yi:
         aypi = argmax(ypi)
         mask = np.zeros(yp2i.shape)
         mask[aypi[0], aypi[1]:] = np.ones([yp2i.shape[1] - aypi[1]])
         if tuple(start) == aypi and (stop[0], stop[1]-1) == argmax(yp2i * mask):
             return True
     return False