'CNN Prediction output to masked image

Given an output prediction of shape [1,21,388,88] from my Unet. How can I plot it as a masked image? I am using PASCAL dataset.

Thanks!



Solution 1:[1]

Basically you can do something like this and give conditional so when they meet requirements you get the style/ image you want

   
 <template>
      <menu>
        <router-link to="/">
          <li>
            <div :class="toggleData ? 'style-one' : 'style-two'"> <!-- Check if toggledata true we use style-one css, if not style-two -->
              <img :src="toggleData ? 'image-one-link' : 'image-link-two'" /> <!-- Check if toggledata true we use image-one-link, if not image-two-link -->
            </div>
            <div class="name" >Home</div>
          </li>
        </router-link>
        <router-link to="/distination2">
          <li>
            <div class="Pic">
              <img src='' />
            </div>
            <div class="Name">Home2</div>
          </li>
        </router-link>
        <router-link to="/distination3">
          <li>
            <div class="Pic">
              <img src='' />
            </div>
            <div class="Name">Home3</div>
          </li>
        </router-link>
        <button @click="buttonClick"> Click Me </button> <!-- When button click we change toggleData value to true -->
      </menu>
    </template>
    
    <script>
    export default {
      data() {
        return {
          toggleData: false,
        };
      },
      methods: {
        buttonClick() {
          this.toggleData = true;
        },
      },
    }
    </script>
    
    <style scoped>
    .style-one {
      background: red;
    }
    .style-two {
      background: blue;
    }
    </style>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Gian Arvin