Yeefei commited on
Commit
85d626b
·
verified ·
1 Parent(s): 3ce75bf

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -407,21 +407,18 @@ def infer_chest_cf(*args):
407
  cf_a = out["cf_pa"]["age"].mean(0)
408
  # post process
409
  cf_x = postprocess(cf_x)
410
- print(cf_x.max())
411
- print(cf_x.min())
412
  cf_x_std = cf_x_std.squeeze().detach().cpu().numpy()
413
  rec_x = postprocess(rec_x)
414
- print(rec_x.max())
415
- print(rec_x.min())
416
  cf_r = RACE_CAT[cf_r.argmax(-1)]
417
  cf_s = SEX_CAT_CHEST[int(cf_s.item())]
418
  cf_f = FIND_CAT[cf_f.argmax(-1)] #FIND_CAT[int(cf_f.item())]
419
  cf_a = (cf_a.item() + 1) * 50
420
  # plots
421
  # plt.close('all')
422
- effect = cf_x - rec_x
423
- # print(effect.max())
424
- # print(effect.min())
 
425
  effect = get_fig_arr(
426
  effect,
427
  cmap="RdBu_r",
 
407
  cf_a = out["cf_pa"]["age"].mean(0)
408
  # post process
409
  cf_x = postprocess(cf_x)
 
 
410
  cf_x_std = cf_x_std.squeeze().detach().cpu().numpy()
411
  rec_x = postprocess(rec_x)
 
 
412
  cf_r = RACE_CAT[cf_r.argmax(-1)]
413
  cf_s = SEX_CAT_CHEST[int(cf_s.item())]
414
  cf_f = FIND_CAT[cf_f.argmax(-1)] #FIND_CAT[int(cf_f.item())]
415
  cf_a = (cf_a.item() + 1) * 50
416
  # plots
417
  # plt.close('all')
418
+ # effect = cf_x - rec_x
419
+ effect = cf_x - obs["x"]
420
+ print(effect.max())
421
+ print(effect.min())
422
  effect = get_fig_arr(
423
  effect,
424
  cmap="RdBu_r",