title: Save semantic segmentation of several classes (greyscale image) as RGB image
body: <p>Good day to all,
  I have a problem and I hope someone can help me solve it.</p>
  <p>So I have trained a neural network to segment car parts.  Everything is working fine here. When I visualise the result, I get a colour image and it looks like this :</p>
  <pre><code>%reload_ext autoreload
  %autoreload 2
  %matplotlib inline
  
  from fastai import *
  from fastai.vision import *
  from fastai.callbacks.hooks import *
  from fastai.utils.mem import *
  import cv2
  import matplotlib.image as img
  import matplotlib.pyplot as plt
  
  from google.colab import drive
  drive.mount('/content/gdrive')
  
  def acc_camvid(input, target):
      target = target.squeeze(1)
      mask = target != void_code
      #print(mask)
      return (input.argmax(dim=1)[mask]==target[mask]).float().mean()
  
  learn=load_learner(&quot;/content/gdrive/MyDrive/Folder/camvid/images&quot;)
  
  fn= &quot;/content/gdrive/MyDrive/Folder/Test-Google/wc1804939.jpg&quot;
  
  img = open_image(fn); img.shape
  _,img_hr,b = learn.predict(img)
  
  bild = Image(img_hr).show(figsize=(18,15))
  </code></pre>
  <p><a href="https://i.stack.imgur.com/OmBRo.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>However, when I save the result, I get a greyscale image and it looks like this:</p>
  <pre><code>Image(img_hr).save(&quot;/content/gdrive/MyDrive/Folder/Save_Img/img_4.jpg&quot;)
  print(&quot;maske_size:&quot;, img_hr.shape)
  
  img_f = &quot;/content/gdrive/MyDrive/Folder/Save_Img/img_4.jpg&quot;
  print(img_f)
  img = open_image(img_f, )
  img.show(figsize=(18,15)) 
  </code></pre>
  <p><a href="https://i.stack.imgur.com/81dZV.jpg" rel="nofollow noreferrer">enter image description here</a></p>
  <p>How can I save the result in colour (i.e. in RGB), like in the visualisation?
  thank you!</p>