{
  "id": 37307,
  "title": "One thought - Using GAN to generate the mask",
  "url": "/competitions/carvana-image-masking-challenge/discussion/37307",
  "author_name": "",
  "post_date": "2017-07-31T03:39:38.296310Z",
  "votes": 3,
  "comment_count": 15,
  "views": 0,
  "content": "<p>But the accuracy may be worse than common algorithms.</p>",
  "messages": [
    {
      "id": "208783",
      "postDate": "07/31/2017 03:39:38",
      "content": "<p>But the accuracy may be worse than common algorithms.</p>",
      "rawMarkdown": "But the accuracy may be worse than common algorithms.",
      "votes": null
    },
    {
      "id": "208794",
      "postDate": "07/31/2017 04:59:17",
      "content": "<p>yes. i think it will be worse. Using GAN is good pratice if you want to learn deep learning. But for this competition, the data is super clean and easy. For winning, it is better to invest more in how to train with bigger images, e.g more gpu or more efficient structure</p>",
      "rawMarkdown": "yes. i think it will be worse. Using GAN is good pratice if you want to learn deep learning. But for this competition, the data is super clean and easy. For winning, it is better to invest more in how to train with bigger images, e.g more gpu or more efficient structure",
      "votes": null
    },
    {
      "id": "208848",
      "postDate": "07/31/2017 08:57:39",
      "content": "<p>Hi i took a try and accuracy was 0.990. But how to promote the score is hard to be found with GAN </p>",
      "rawMarkdown": "Hi i took a try and accuracy was 0.990. But how to promote the score is hard to be found with GAN",
      "votes": null
    },
    {
      "id": "209176",
      "postDate": "08/01/2017 13:03:16",
      "content": "<p>Hello Xubin, </p>\n\n<p>Big GAN fan here. I'm impressed by your 0.99 result.  :D</p>\n\n<p>Care to share what you used? was it DCGAN, Wasserstein?  </p>",
      "rawMarkdown": "Hello Xubin, \n\nBig GAN fan here. I'm impressed by your 0.99 result.  :D\n\nCare to share what you used? was it DCGAN, Wasserstein?",
      "votes": null
    },
    {
      "id": "209441",
      "postDate": "08/02/2017 08:48:41",
      "content": "<p>Hello Miha, i used pix2pix to finish this target.</p>",
      "rawMarkdown": "Hello Miha, i used pix2pix to finish this target.",
      "votes": null
    },
    {
      "id": "209924",
      "postDate": "08/03/2017 19:27:29",
      "content": "<p>With some tuning I even got pix2pix to 0.994 (only tested on trainset) </p>",
      "rawMarkdown": "With some tuning I even got pix2pix to 0.994 (only tested on trainset)",
      "votes": null
    },
    {
      "id": "210022",
      "postDate": "08/04/2017 03:26:23",
      "content": "<p>How about using GAN for improving Unet results as in this reference <a href=\"https://arxiv.org/pdf/1611.08408.pdf\">https://arxiv.org/pdf/1611.08408.pdf</a> (just an idea, I've never worked with GAN before).</p>",
      "rawMarkdown": "How about using GAN for improving Unet results as in this reference https://arxiv.org/pdf/1611.08408.pdf (just an idea, I've never worked with GAN before).",
      "votes": null
    },
    {
      "id": "210641",
      "postDate": "08/06/2017 11:45:17",
      "content": "<p>Thought about it too, but usually GANs aren't very stable during training. This might or might not leed to strange results and bigger errors. But of course it is worth a try</p>",
      "rawMarkdown": "Thought about it too, but usually GANs aren't very stable during training. This might or might not leed to strange results and bigger errors. But of course it is worth a try",
      "votes": null
    },
    {
      "id": "210808",
      "postDate": "08/07/2017 06:16:28",
      "content": "<p>@Justus Wow, it's awesome. How about final score?</p>",
      "rawMarkdown": "Justus Wow, it's awesome. How about final score?",
      "votes": null
    },
    {
      "id": "211414",
      "postDate": "08/08/2017 21:48:28",
      "content": "<p>The problem with GAN is that the discriminator usually tests for how realistic an image is, not how accurate . . .\nI guess that could be interpreted as a more advanced error function?</p>",
      "rawMarkdown": "The problem with GAN is that the discriminator usually tests for how realistic an image is, not how accurate . . .\nI guess that could be interpreted as a more advanced error function?",
      "votes": null
    },
    {
      "id": "211423",
      "postDate": "08/08/2017 23:02:15",
      "content": "<p>0.993 on test set. Not good enough to compare with u-nets</p>",
      "rawMarkdown": "0.993 on test set. Not good enough to compare with u-nets",
      "votes": null
    },
    {
      "id": "211424",
      "postDate": "08/08/2017 23:06:37",
      "content": "<p>But it could help if it would learn the typical differences between a manually segmented mask and a mask created from a CNN. By using it in the right way it could indeed improve the results. Unfortunately my discriminators did not learn the differences yet. This causes the training to  get a less stable. I tried it with a fully convolutional discriminator and MSE-Loss. Any ideas how to stabilize the training / make the discriminator learn the differences? </p>",
      "rawMarkdown": "But it could help if it would learn the typical differences between a manually segmented mask and a mask created from a CNN. By using it in the right way it could indeed improve the results. Unfortunately my discriminators did not learn the differences yet. This causes the training to  get a less stable. I tried it with a fully convolutional discriminator and MSE-Loss. Any ideas how to stabilize the training / make the discriminator learn the differences?",
      "votes": null
    },
    {
      "id": "211485",
      "postDate": "08/09/2017 06:26:22",
      "content": "<p>Out of curiosity, did you use a trained u-net or such to generate the mask and use pix2pix for tuning, or did you have the adversarial network make the mask from scratch?</p>",
      "rawMarkdown": "Out of curiosity, did you use a trained u-net or such to generate the mask and use pix2pix for tuning, or did you have the adversarial network make the mask from scratch?",
      "votes": null
    },
    {
      "id": "211498",
      "postDate": "08/09/2017 07:41:29",
      "content": "<p>Generated it from scratch with image as train input and mask as label</p>",
      "rawMarkdown": "Generated it from scratch with image as train input and mask as label",
      "votes": null
    },
    {
      "id": "212140",
      "postDate": "08/10/2017 19:12:45",
      "content": "<p>@XubinNi, @Miha Skalic </p>\n\n<p>I think this is one way that GAN can be very useful. My idea was inspired by best cvpr 2017 paper by apple.</p>\n\n<p>\"Learning from Simulated and Unsupervised Images through Adversarial Training\" -  by Ashish Shrivastava, Tomas Pfister, Oncel Tuzel, Joshua Susskind, Wenda Wang, &amp; Russell Webb, cvpr 2017</p>\n\n<p>One problem we face now is large image size in segmentation. But we can actually break down into stages. e.g. </p>\n\n<ol>\n<li><p>input \"small image\" and predict \"small mask\"</p></li>\n<li><p>input \"larger image + upsized mask from previous stage\" and predict \"larger mask\"</p></li>\n<li><p>repeat ...</p></li>\n</ol>\n\n<p>Because the image is too large, we cannot do end-to-end. rather we do stage-by-stage. GAN can be used to generate predicted mask results from original masks. i.e we use GAN to learn the error of previous stages.</p>\n\n<p>I didn't try this, this is just an idea.</p>\n\n<p>If this is successful, we find a way to break back-propagation into stages and using GAN to predict the signals/gradients in between.</p>",
      "rawMarkdown": "XubinNi, @Miha Skalic \n\nI think this is one way that GAN can be very useful. My idea was inspired by best cvpr 2017 paper by apple.\n\n\"Learning from Simulated and Unsupervised Images through Adversarial Training\" -  by Ashish Shrivastava, Tomas Pfister, Oncel Tuzel, Joshua Susskind, Wenda Wang, &amp; Russell Webb, cvpr 2017\n\nOne problem we face now is large image size in segmentation. But we can actually break down into stages. e.g. \n\n1.  input \"small image\" and predict \"small mask\"\n\n2.  input \"larger image + upsized mask from previous stage\" and predict \"larger mask\"\n\n3. repeat ...\n\nBecause the image is too large, we cannot do end-to-end. rather we do stage-by-stage. GAN can be used to generate predicted mask results from original masks. i.e we use GAN to learn the error of previous stages.\n\nI didn't try this, this is just an idea.\n\nIf this is successful, we find a way to break back-propagation into stages and using GAN to predict the signals/gradients in between.",
      "votes": null
    },
    {
      "id": "212166",
      "postDate": "08/10/2017 20:49:52",
      "content": "<p>I tried to train several GANs on this dataset but the masks are already to good for the discriminator to decide whether it's an original one or it's generated. </p>",
      "rawMarkdown": "I tried to train several GANs on this dataset but the masks are already to good for the discriminator to decide whether it's an original one or it's generated.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 208794,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "07/31/2017 04:59:17",
      "content": "<p>yes. i think it will be worse. Using GAN is good pratice if you want to learn deep learning. But for this competition, the data is super clean and easy. For winning, it is better to invest more in how to train with bigger images, e.g more gpu or more efficient structure</p>",
      "votes": null,
      "replies": [
        {
          "id": 208848,
          "author_name": "dustni",
          "author_url": "",
          "post_date": "07/31/2017 08:57:39",
          "content": "<p>Hi i took a try and accuracy was 0.990. But how to promote the score is hard to be found with GAN </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 209176,
      "author_name": "mihaskalic",
      "author_url": "",
      "post_date": "08/01/2017 13:03:16",
      "content": "<p>Hello Xubin, </p>\n\n<p>Big GAN fan here. I'm impressed by your 0.99 result.  :D</p>\n\n<p>Care to share what you used? was it DCGAN, Wasserstein?  </p>",
      "votes": null,
      "replies": [
        {
          "id": 209441,
          "author_name": "dustni",
          "author_url": "",
          "post_date": "08/02/2017 08:48:41",
          "content": "<p>Hello Miha, i used pix2pix to finish this target.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 209924,
          "author_name": "pama328",
          "author_url": "",
          "post_date": "08/03/2017 19:27:29",
          "content": "<p>With some tuning I even got pix2pix to 0.994 (only tested on trainset) </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 210808,
          "author_name": "dustni",
          "author_url": "",
          "post_date": "08/07/2017 06:16:28",
          "content": "<p>@Justus Wow, it's awesome. How about final score?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 211423,
          "author_name": "pama328",
          "author_url": "",
          "post_date": "08/08/2017 23:02:15",
          "content": "<p>0.993 on test set. Not good enough to compare with u-nets</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 211485,
          "author_name": "mshliselberg",
          "author_url": "",
          "post_date": "08/09/2017 06:26:22",
          "content": "<p>Out of curiosity, did you use a trained u-net or such to generate the mask and use pix2pix for tuning, or did you have the adversarial network make the mask from scratch?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 211498,
          "author_name": "pama328",
          "author_url": "",
          "post_date": "08/09/2017 07:41:29",
          "content": "<p>Generated it from scratch with image as train input and mask as label</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 210022,
      "author_name": "luango",
      "author_url": "",
      "post_date": "08/04/2017 03:26:23",
      "content": "<p>How about using GAN for improving Unet results as in this reference <a href=\"https://arxiv.org/pdf/1611.08408.pdf\">https://arxiv.org/pdf/1611.08408.pdf</a> (just an idea, I've never worked with GAN before).</p>",
      "votes": null,
      "replies": [
        {
          "id": 210641,
          "author_name": "pama328",
          "author_url": "",
          "post_date": "08/06/2017 11:45:17",
          "content": "<p>Thought about it too, but usually GANs aren't very stable during training. This might or might not leed to strange results and bigger errors. But of course it is worth a try</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 211414,
      "author_name": "natesurf",
      "author_url": "",
      "post_date": "08/08/2017 21:48:28",
      "content": "<p>The problem with GAN is that the discriminator usually tests for how realistic an image is, not how accurate . . .\nI guess that could be interpreted as a more advanced error function?</p>",
      "votes": null,
      "replies": [
        {
          "id": 211424,
          "author_name": "pama328",
          "author_url": "",
          "post_date": "08/08/2017 23:06:37",
          "content": "<p>But it could help if it would learn the typical differences between a manually segmented mask and a mask created from a CNN. By using it in the right way it could indeed improve the results. Unfortunately my discriminators did not learn the differences yet. This causes the training to  get a less stable. I tried it with a fully convolutional discriminator and MSE-Loss. Any ideas how to stabilize the training / make the discriminator learn the differences? </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 212140,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "08/10/2017 19:12:45",
      "content": "<p>@XubinNi, @Miha Skalic </p>\n\n<p>I think this is one way that GAN can be very useful. My idea was inspired by best cvpr 2017 paper by apple.</p>\n\n<p>\"Learning from Simulated and Unsupervised Images through Adversarial Training\" -  by Ashish Shrivastava, Tomas Pfister, Oncel Tuzel, Joshua Susskind, Wenda Wang, &amp; Russell Webb, cvpr 2017</p>\n\n<p>One problem we face now is large image size in segmentation. But we can actually break down into stages. e.g. </p>\n\n<ol>\n<li><p>input \"small image\" and predict \"small mask\"</p></li>\n<li><p>input \"larger image + upsized mask from previous stage\" and predict \"larger mask\"</p></li>\n<li><p>repeat ...</p></li>\n</ol>\n\n<p>Because the image is too large, we cannot do end-to-end. rather we do stage-by-stage. GAN can be used to generate predicted mask results from original masks. i.e we use GAN to learn the error of previous stages.</p>\n\n<p>I didn't try this, this is just an idea.</p>\n\n<p>If this is successful, we find a way to break back-propagation into stages and using GAN to predict the signals/gradients in between.</p>",
      "votes": null,
      "replies": [
        {
          "id": 212166,
          "author_name": "pama328",
          "author_url": "",
          "post_date": "08/10/2017 20:49:52",
          "content": "<p>I tried to train several GANs on this dataset but the masks are already to good for the discriminator to decide whether it's an original one or it's generated. </p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "208783": "But the accuracy may be worse than common algorithms.",
    "208794": "yes. i think it will be worse. Using GAN is good pratice if you want to learn deep learning. But for this competition, the data is super clean and easy. For winning, it is better to invest more in how to train with bigger images, e.g more gpu or more efficient structure",
    "208848": "Hi i took a try and accuracy was 0.990. But how to promote the score is hard to be found with GAN",
    "209176": "Hello Xubin, \n\nBig GAN fan here. I'm impressed by your 0.99 result.  :D\n\nCare to share what you used? was it DCGAN, Wasserstein?",
    "209441": "Hello Miha, i used pix2pix to finish this target.",
    "209924": "With some tuning I even got pix2pix to 0.994 (only tested on trainset)",
    "210022": "How about using GAN for improving Unet results as in this reference https://arxiv.org/pdf/1611.08408.pdf (just an idea, I've never worked with GAN before).",
    "210641": "Thought about it too, but usually GANs aren't very stable during training. This might or might not leed to strange results and bigger errors. But of course it is worth a try",
    "210808": "Justus Wow, it's awesome. How about final score?",
    "211414": "The problem with GAN is that the discriminator usually tests for how realistic an image is, not how accurate . . .\nI guess that could be interpreted as a more advanced error function?",
    "211423": "0.993 on test set. Not good enough to compare with u-nets",
    "211424": "But it could help if it would learn the typical differences between a manually segmented mask and a mask created from a CNN. By using it in the right way it could indeed improve the results. Unfortunately my discriminators did not learn the differences yet. This causes the training to  get a less stable. I tried it with a fully convolutional discriminator and MSE-Loss. Any ideas how to stabilize the training / make the discriminator learn the differences?",
    "211485": "Out of curiosity, did you use a trained u-net or such to generate the mask and use pix2pix for tuning, or did you have the adversarial network make the mask from scratch?",
    "211498": "Generated it from scratch with image as train input and mask as label",
    "212140": "XubinNi, @Miha Skalic \n\nI think this is one way that GAN can be very useful. My idea was inspired by best cvpr 2017 paper by apple.\n\n\"Learning from Simulated and Unsupervised Images through Adversarial Training\" -  by Ashish Shrivastava, Tomas Pfister, Oncel Tuzel, Joshua Susskind, Wenda Wang, &amp; Russell Webb, cvpr 2017\n\nOne problem we face now is large image size in segmentation. But we can actually break down into stages. e.g. \n\n1.  input \"small image\" and predict \"small mask\"\n\n2.  input \"larger image + upsized mask from previous stage\" and predict \"larger mask\"\n\n3. repeat ...\n\nBecause the image is too large, we cannot do end-to-end. rather we do stage-by-stage. GAN can be used to generate predicted mask results from original masks. i.e we use GAN to learn the error of previous stages.\n\nI didn't try this, this is just an idea.\n\nIf this is successful, we find a way to break back-propagation into stages and using GAN to predict the signals/gradients in between.",
    "212166": "I tried to train several GANs on this dataset but the masks are already to good for the discriminator to decide whether it's an original one or it's generated."
  },
  "source": "meta"
}