MCPcopy Create free account
hub / github.com/HiLab-git/WORD / each_cases_metric

Function each_cases_metric

word_metrics_computing.py:26–32  ·  view source on GitHub ↗
(gt, pred, voxel_spacing)

Source from the content-addressed store, hash-verified

24 return np.array([0.0, 50])
25
26def each_cases_metric(gt, pred, voxel_spacing):
27 classes_num = gt.max() + 1
28 class_wise_metric = np.zeros((classes_num-1, 2))
29 for cls in range(1, classes_num):
30 class_wise_metric[cls-1, ...] = cal_metric(pred==cls, gt==cls, voxel_spacing)
31 print(class_wise_metric)
32 return class_wise_metric
33
34all_results = np.zeros((30,16,2))
35for ind, case in enumerate(os.listdir("..WORD/labelsTs/")):

Callers 1

Calls 1

cal_metricFunction · 0.85

Tested by

no test coverage detected