ValueError: not enough values to unpack (expected 2, got 0)

When using python 3.6, 'zip()'returns a zip object and in python 2.7 'zip()' returns a list, so this line should be replaced.
pts = np.array(zip(np.nonzero(gt)[1], np.nonzero(gt)[0]))
to
pts = np.array(list(zip(np.nonzero(gt)[1], np.nonzero(gt)[0])))

你可能感兴趣的:(ValueError: not enough values to unpack (expected 2, got 0))