Yeefei commited on
Commit
f362432
·
verified ·
1 Parent(s): 5acdd7d

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -406,15 +406,18 @@ def infer_chest_cf(*args):
406
  cf_a = out["cf_pa"]["age"].mean(0)
407
  # post process
408
  cf_x = postprocess(cf_x)
 
409
  cf_x_std = cf_x_std.squeeze().detach().cpu().numpy()
410
  rec_x = postprocess(rec_x)
 
411
  cf_r = RACE_CAT[cf_r.argmax(-1)]
412
  cf_s = SEX_CAT_CHEST[int(cf_s.item())]
413
  cf_f = FIND_CAT[cf_f.argmax(-1)] #FIND_CAT[int(cf_f.item())]
414
  cf_a = (cf_a.item() + 1) * 50
415
  # plots
416
  # plt.close('all')
417
- effect = (cf_x - rec_x) * 2
 
418
  effect = get_fig_arr(
419
  effect,
420
  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)
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())]
416
  cf_a = (cf_a.item() + 1) * 50
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",