Closed Jasmine-wrl closed 10 months ago
We will provide a script with inference and visualization in a few weeks. I will make sure to comment on this issue once updated. Thanks for asking
I'm sorry to bother you again, but I still want to know how to display the image (c, d, f) in the following picture.If possible, could you please let me know? My time is very tight.Thank you again!
with our model we can only infer e) and f). So if you are using our data c) and d) are DSMs not used during training.
For visualizing the 3D predictions we used a testing loop similar to this (but as I told you we still have to clean it):
res_2d= []
res_3d= []
im_couple= []
for t1, t2, mask2d, mask3d in tqdm(test_loader):
t1 = t1.to(device)
t2 = t2.to(device)
out2d, out3d = net(t1, t2)
out2d = out2d.detach().argmax(dim=1)
out2d = out2d.cpu().numpy()
out3d = out3d.detach().cpu().numpy()
out3d = (out3d*(max_scale - min_scale)+(max_scale+min_scale))/2
im_couple.append([t1.cpu().squeeze().permute((1,2,0)), t2.cpu().squeeze().permute((1,2,0))])
res_2d.append([out2d.squeeze(), mask2d.squeeze()])
res_3d.append([out3d.squeeze(), mask3d.squeeze()])
then you can easily visualize each predicted map, for example:
tiff.imshow(res_3d[n][0],vmin=-25, vmax=30)
Thanks to your reply, I can now obtain 3D visualization images. Can you tell me how to display image c and d based on optical images a and b and DSM data?
Could you tell me how can I realize 3D result visualization?Thanks!