Hi, I try to download the checkpoint from MIPHEI-VIT trained with HEMIT, however, the testing results look very wired.
exp_mithvi = np.load("../../MIPHEI-ViT/notebooks/miphei_vit_pred_hemit_256.npy")
pcc,scc = [],[]
for i,j in zip(exp_mithvi, np.array(map_data)):
i = i[:,[13,10,0],:,:]
p1,s1 = calculate_correlations(torch.FloatTensor(i),torch.FloatTensor(j))
pcc.append(p1)
scc.append(s1)
np.array(map_data).shape
np.nanmean(np.array(pcc),axis=0)
My average PCC is only around:
array([0.01171147, 0.0020005 , 0.02392417], dtype=float32)
I follow the infernece code and compute the predicted miF as follows:
import tqdm
pred_list = []
for item in tqdm.tqdm(test_dataset):
image_pil = item[0]
image = np.asarray(image_pil)
image = center_crop(image=image)["image"]
x = transforms(image=image)["image"]
nuclei_mask = inference_cellpose(image, cellpose_model, radius=radius)
nuclei_mask_torch = torch.from_numpy(nuclei_mask).unsqueeze(0).unsqueeze(0).cuda().long()
with torch.inference_mode():
pred = generator(x.unsqueeze(0).half().cuda())
pred = pred.clamp(-0.9, 0.9)
pred = pred[:,:,:,:]
pred = (pred + 0.9) / 1.8
pred = (pred * 255).to(torch.uint8)
pred_list.append(pred.cpu().numpy())
outimage = np.array(pred_list)
np.save("miphei_vit_pred_hemit_256.npy",outimage)
Therefore, I have some problems here. 1. Can we resize the original 1024 image for inference and testing (also resize the predicted mif file)? Also, why we do not use the original 1024 image size for prediction? 2. Is the prediction of generator same as the miF strength? I think so as there is no cell segmentation informaiton.
I cannot find the reported pcc info in the manuscript for this dataset, so any suggestions or sharing the original pcc/scc result will be helpful. Thanks!
Hi, I try to download the checkpoint from MIPHEI-VIT trained with HEMIT, however, the testing results look very wired.
My average PCC is only around:
I follow the infernece code and compute the predicted miF as follows:
Therefore, I have some problems here. 1. Can we resize the original 1024 image for inference and testing (also resize the predicted mif file)? Also, why we do not use the original 1024 image size for prediction? 2. Is the prediction of generator same as the miF strength? I think so as there is no cell segmentation informaiton.
I cannot find the reported pcc info in the manuscript for this dataset, so any suggestions or sharing the original pcc/scc result will be helpful. Thanks!