MCPcopy Index your code
hub / github.com/HiLab-git/WORD / generate_scribble

Function generate_scribble

scribbles_generator.py:248–256  ·  view source on GitHub ↗
(label, iterations, cut_branch=True)

Source from the content-addressed store, hash-verified

246
247
248def generate_scribble(label, iterations, cut_branch=True):
249 class_num = np.max(label) + 1
250 output = np.zeros_like(label, dtype=np.uint8)
251 for i in range(class_num):
252 it = iterations[i] if isinstance(iterations, list) else iterations
253 scribble = scribble4class(
254 label, i, class_num, it, cut_branch=cut_branch)
255 output += scribble.astype(np.uint8)
256 return output
257
258
259if __name__ == "__main__":

Callers 1

Calls 1

scribble4classFunction · 0.85

Tested by

no test coverage detected