supundhananjaya commited on
Commit
702f656
·
verified ·
1 Parent(s): 40747f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -579,15 +579,9 @@ def MonoGeoDepthModelRun(numpy_image):
579
 
580
  image_ = predicted_dtm.squeeze(0)
581
  image_ = (image_ - image_.min()) / (image_.max() - image_.min())
582
-
583
- image_np = image_.numpy()
584
- cmap = plt.get_cmap('jet_r')
585
- image_colored = cmap(image_np)
586
- image_colored = image_colored[:, :, :3] # Use only the RGB channels
587
- predicted_dtm = ToPILImage()(image_colored)
588
 
589
- # to_pil = ToPILImage()
590
- # predicted_dtm = to_pil(image_)
591
 
592
  return predicted_dtm
593
 
 
579
 
580
  image_ = predicted_dtm.squeeze(0)
581
  image_ = (image_ - image_.min()) / (image_.max() - image_.min())
 
 
 
 
 
 
582
 
583
+ to_pil = ToPILImage()
584
+ predicted_dtm = to_pil(image_)
585
 
586
  return predicted_dtm
587