MedSegDiff icon indicating copy to clipboard operation
MedSegDiff copied to clipboard

about the code in p_sample_loop_known

Open jaceqin opened this issue 1 year ago • 2 comments

if dice_score(final["sample"][:,-1,:,:].unsqueeze(1), final["cal"]) < 0.65: cal_out = torch.clamp(final["cal"] + 0.25 * final["sample"][:,-1,:,:].unsqueeze(1), else: cal_out = torch.clamp(final["cal"] * 0.5 + 0.5 * final["sample"][:,-1,:,:].unsqueeze(1), 0, 1)

What is the main purpose of this code?

jaceqin avatar Mar 14 '23 13:03 jaceqin

same question

xupinggl avatar Jun 01 '23 13:06 xupinggl

same question. What's more important, as show below, why the cal_out can represent the final segmentation result? co = th.tensor(cal_out) print('the shape of sample :', sample.shape, sample[:, -1, :, :].shape) if args.version == 'new': enslist.append(sample[:,-1,:,:]) else: enslist.append(co)

Devin-Pi avatar Oct 02 '23 02:10 Devin-Pi