Spaces:
Sleeping
Sleeping
File size: 525 Bytes
29c9bfa 5ee40a1 29c9bfa |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
from inference_utils.target_dist import modality_targets_from_target_dist
def test_modality_targets_from_target_dist():
target_dist_dict = {
"CT-Abdomen": {"postcava": [[1, 2], [3, 4]], "aorta": [[5, 6], [7, 8]]},
"CT-Chest": {"nodule": [[9, 10], [11, 12]], "tumor": [[13, 14], [15, 16]]},
}
expected = {
"CT-Abdomen": ["postcava", "aorta"],
"CT-Chest": ["nodule", "tumor"],
}
actual = modality_targets_from_target_dist(target_dist_dict)
assert actual == expected
|