Upload app.py
Browse files
app.py
CHANGED
@@ -406,10 +406,10 @@ def infer_chest_cf(*args):
|
|
406 |
cf_a = out["cf_pa"]["age"].mean(0)
|
407 |
# post process
|
408 |
cf_x = postprocess(cf_x)
|
409 |
-
print(cf_x)
|
410 |
cf_x_std = cf_x_std.squeeze().detach().cpu().numpy()
|
411 |
rec_x = postprocess(rec_x)
|
412 |
-
print(rec_x)
|
413 |
cf_r = RACE_CAT[cf_r.argmax(-1)]
|
414 |
cf_s = SEX_CAT_CHEST[int(cf_s.item())]
|
415 |
cf_f = FIND_CAT[cf_f.argmax(-1)] #FIND_CAT[int(cf_f.item())]
|
@@ -417,7 +417,8 @@ def infer_chest_cf(*args):
|
|
417 |
# plots
|
418 |
# plt.close('all')
|
419 |
effect = cf_x - rec_x
|
420 |
-
print(effect)
|
|
|
421 |
effect = get_fig_arr(
|
422 |
effect,
|
423 |
cmap="RdBu_r",
|
|
|
406 |
cf_a = out["cf_pa"]["age"].mean(0)
|
407 |
# post process
|
408 |
cf_x = postprocess(cf_x)
|
409 |
+
# print(cf_x[144,27])
|
410 |
cf_x_std = cf_x_std.squeeze().detach().cpu().numpy()
|
411 |
rec_x = postprocess(rec_x)
|
412 |
+
# print(rec_x[144,27])
|
413 |
cf_r = RACE_CAT[cf_r.argmax(-1)]
|
414 |
cf_s = SEX_CAT_CHEST[int(cf_s.item())]
|
415 |
cf_f = FIND_CAT[cf_f.argmax(-1)] #FIND_CAT[int(cf_f.item())]
|
|
|
417 |
# plots
|
418 |
# plt.close('all')
|
419 |
effect = cf_x - rec_x
|
420 |
+
print(effect.max())
|
421 |
+
print(effect.min())
|
422 |
effect = get_fig_arr(
|
423 |
effect,
|
424 |
cmap="RdBu_r",
|