{
  "id": 40133,
  "title": "LB 10th place 0.9971 solution",
  "url": "/competitions/carvana-image-masking-challenge/writeups/david-lb-10th-place-0-9971-solution",
  "author_name": "",
  "post_date": "2017-09-28T04:30:28.085233200Z",
  "votes": 24,
  "comment_count": 7,
  "views": 0,
  "content": "<p>We created three models, all variants of Unet, and then used some post processing techniques to more robustly detect antenna's and car tops by colors.  The three models were ensembled with an equal vote.</p>\n\n<p>1st model- Background detection.  Inverted the mask image and created a Unet to detect the background (instead of the car).  5 up/downsamples. Then inverted the final background prediction mask to convert back to the car prediction.  This model on it's own scored 0.9970 and was the highest performing of the three.    It seemed to do best at the areas underneath the car, wheel/spokes, and detecting true car edges on difficult test images.</p>\n\n<p>2nd model - Classic Unet architecture to detect car.  6 up/down samples.</p>\n\n<p>3rd model - Split images in half for top bottom, trained Unet for each, and then concatenated final results.  Same architecture as 2nd model, just on half images.</p>\n\n<p>Post processing:\nIt appeared that many of the antenna's on the cars were non-continuous in the predictions.  I id'd these by counting the external contours of small contours that were within 50 pixels of each other and above the center of mass of the largest contour of size &gt; 100k pixels.  I then cropped an image containing the antenna  range and ran a simple canny that ran through the already identified points.  This seemed to clean up the antenna's substantially, but my estimate on final score impact was only around 0.00004.</p>\n\n<p>Used Keras with TF backend, and primarily ran on a 4x 1080 Ti setup.  Found early on that running the Ti's for many hours straight caused them to get too hot and throttle their speed, so I had to install watercoolers on each of them to keep them at stable temps.</p>\n\n<p>Another interesting finding that I didn't take full advantage of was the difference in the stage backgrounds.  It was stated by Carvana in one of the posts that there were three stages used, and if you look at enough images carefully you can identify the three distinct backgrounds.  One of the three backgrounds performed substantially better (0.0001) across all cars when blocked by color, size, and rotation.  I think there was opportunity to increase the score by creating custom predictors off of each of the backgrounds separately.</p>",
  "messages": [
    {
      "id": "225033",
      "postDate": "09/28/2017 04:30:28",
      "content": "<p>We created three models, all variants of Unet, and then used some post processing techniques to more robustly detect antenna's and car tops by colors.  The three models were ensembled with an equal vote.</p>\n\n<p>1st model- Background detection.  Inverted the mask image and created a Unet to detect the background (instead of the car).  5 up/downsamples. Then inverted the final background prediction mask to convert back to the car prediction.  This model on it's own scored 0.9970 and was the highest performing of the three.    It seemed to do best at the areas underneath the car, wheel/spokes, and detecting true car edges on difficult test images.</p>\n\n<p>2nd model - Classic Unet architecture to detect car.  6 up/down samples.</p>\n\n<p>3rd model - Split images in half for top bottom, trained Unet for each, and then concatenated final results.  Same architecture as 2nd model, just on half images.</p>\n\n<p>Post processing:\nIt appeared that many of the antenna's on the cars were non-continuous in the predictions.  I id'd these by counting the external contours of small contours that were within 50 pixels of each other and above the center of mass of the largest contour of size &gt; 100k pixels.  I then cropped an image containing the antenna  range and ran a simple canny that ran through the already identified points.  This seemed to clean up the antenna's substantially, but my estimate on final score impact was only around 0.00004.</p>\n\n<p>Used Keras with TF backend, and primarily ran on a 4x 1080 Ti setup.  Found early on that running the Ti's for many hours straight caused them to get too hot and throttle their speed, so I had to install watercoolers on each of them to keep them at stable temps.</p>\n\n<p>Another interesting finding that I didn't take full advantage of was the difference in the stage backgrounds.  It was stated by Carvana in one of the posts that there were three stages used, and if you look at enough images carefully you can identify the three distinct backgrounds.  One of the three backgrounds performed substantially better (0.0001) across all cars when blocked by color, size, and rotation.  I think there was opportunity to increase the score by creating custom predictors off of each of the backgrounds separately.</p>",
      "rawMarkdown": "We created three models, all variants of Unet, and then used some post processing techniques to more robustly detect antenna's and car tops by colors.  The three models were ensembled with an equal vote.\n\n1st model- Background detection.  Inverted the mask image and created a Unet to detect the background (instead of the car).  5 up/downsamples. Then inverted the final background prediction mask to convert back to the car prediction.  This model on it's own scored 0.9970 and was the highest performing of the three.    It seemed to do best at the areas underneath the car, wheel/spokes, and detecting true car edges on difficult test images.\n\n2nd model - Classic Unet architecture to detect car.  6 up/down samples.\n\n3rd model - Split images in half for top bottom, trained Unet for each, and then concatenated final results.  Same architecture as 2nd model, just on half images.\n\nPost processing:\nIt appeared that many of the antenna's on the cars were non-continuous in the predictions.  I id'd these by counting the external contours of small contours that were within 50 pixels of each other and above the center of mass of the largest contour of size &gt; 100k pixels.  I then cropped an image containing the antenna  range and ran a simple canny that ran through the already identified points.  This seemed to clean up the antenna's substantially, but my estimate on final score impact was only around 0.00004.\n\nUsed Keras with TF backend, and primarily ran on a 4x 1080 Ti setup.  Found early on that running the Ti's for many hours straight caused them to get too hot and throttle their speed, so I had to install watercoolers on each of them to keep them at stable temps.\n\nAnother interesting finding that I didn't take full advantage of was the difference in the stage backgrounds.  It was stated by Carvana in one of the posts that there were three stages used, and if you look at enough images carefully you can identify the three distinct backgrounds.  One of the three backgrounds performed substantially better (0.0001) across all cars when blocked by color, size, and rotation.  I think there was opportunity to increase the score by creating custom predictors off of each of the backgrounds separately.",
      "votes": null
    },
    {
      "id": "225101",
      "postDate": "09/28/2017 08:48:54",
      "content": "<blockquote>\n  <p>Found early on that running the Ti's for many hours straight caused them to get too hot and throttle their speed, so I had to install watercoolers on each of them to keep them at stable temps.</p>\n</blockquote>\n\n<p>User avatar checks out.</p>",
      "rawMarkdown": "&gt;  Found early on that running the Ti's for many hours straight caused them to get too hot and throttle their speed, so I had to install watercoolers on each of them to keep them at stable temps.\n\nUser avatar checks out.",
      "votes": null
    },
    {
      "id": "225142",
      "postDate": "09/28/2017 11:09:30",
      "content": "<p>What computer/motherboard you have to use 4 x Tis ?</p>",
      "rawMarkdown": "What computer/motherboard you have to use 4 x Tis ?",
      "votes": null
    },
    {
      "id": "225173",
      "postDate": "09/28/2017 12:26:01",
      "content": "<p>mobo: gigabyte AORUS GA-Z270X-Gaming 9. it’s one of the few LGA1151 mobo’s with 4 double width pcie slots out there. Had to put a 1600W power supply on to be safe. During training, wall power is about 900W. </p>",
      "rawMarkdown": "mobo: gigabyte AORUS GA-Z270X-Gaming 9. it’s one of the few LGA1151 mobo’s with 4 double width pcie slots out there. Had to put a 1600W power supply on to be safe. During training, wall power is about 900W.",
      "votes": null
    },
    {
      "id": "225189",
      "postDate": "09/28/2017 13:19:01",
      "content": "<p>Did you run into CPU bottleneck issues especially when doing augmentation?</p>",
      "rawMarkdown": "Did you run into CPU bottleneck issues especially when doing augmentation?",
      "votes": null
    },
    {
      "id": "225210",
      "postDate": "09/28/2017 14:13:30",
      "content": "<p>Not really. I’ve got an i7-7700k overclocked to 5GHz so it could still chew through augmentations pretty quickly</p>",
      "rawMarkdown": "Not really. I’ve got an i7-7700k overclocked to 5GHz so it could still chew through augmentations pretty quickly",
      "votes": null
    },
    {
      "id": "225315",
      "postDate": "09/28/2017 17:54:16",
      "content": "<p>I'm not sure if inverting the mask will have an effect on the train. I think that for the network it does not matter if the car has a value of 0 or 1. <br>\nDo you have an explanation of why it worked better?</p>",
      "rawMarkdown": "I'm not sure if inverting the mask will have an effect on the train. I think that for the network it does not matter if the car has a value of 0 or 1.  \nDo you have an explanation of why it worked better?",
      "votes": null
    },
    {
      "id": "225367",
      "postDate": "09/28/2017 20:53:28",
      "content": "<p>Thanks @Ironbar for sharing and congratulations.</p>",
      "rawMarkdown": "Thanks @Ironbar for sharing and congratulations.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 225101,
      "author_name": "mihaskalic",
      "author_url": "",
      "post_date": "09/28/2017 08:48:54",
      "content": "<blockquote>\n  <p>Found early on that running the Ti's for many hours straight caused them to get too hot and throttle their speed, so I had to install watercoolers on each of them to keep them at stable temps.</p>\n</blockquote>\n\n<p>User avatar checks out.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 225142,
      "author_name": "antorsae",
      "author_url": "",
      "post_date": "09/28/2017 11:09:30",
      "content": "<p>What computer/motherboard you have to use 4 x Tis ?</p>",
      "votes": null,
      "replies": [
        {
          "id": 225173,
          "author_name": "tivfrvqhs5",
          "author_url": "",
          "post_date": "09/28/2017 12:26:01",
          "content": "<p>mobo: gigabyte AORUS GA-Z270X-Gaming 9. it’s one of the few LGA1151 mobo’s with 4 double width pcie slots out there. Had to put a 1600W power supply on to be safe. During training, wall power is about 900W. </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 225189,
          "author_name": "antorsae",
          "author_url": "",
          "post_date": "09/28/2017 13:19:01",
          "content": "<p>Did you run into CPU bottleneck issues especially when doing augmentation?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 225210,
          "author_name": "tivfrvqhs5",
          "author_url": "",
          "post_date": "09/28/2017 14:13:30",
          "content": "<p>Not really. I’ve got an i7-7700k overclocked to 5GHz so it could still chew through augmentations pretty quickly</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 225315,
      "author_name": "ironbar",
      "author_url": "",
      "post_date": "09/28/2017 17:54:16",
      "content": "<p>I'm not sure if inverting the mask will have an effect on the train. I think that for the network it does not matter if the car has a value of 0 or 1. <br>\nDo you have an explanation of why it worked better?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 225367,
      "author_name": "sheriytm",
      "author_url": "",
      "post_date": "09/28/2017 20:53:28",
      "content": "<p>Thanks @Ironbar for sharing and congratulations.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "225033": "We created three models, all variants of Unet, and then used some post processing techniques to more robustly detect antenna's and car tops by colors.  The three models were ensembled with an equal vote.\n\n1st model- Background detection.  Inverted the mask image and created a Unet to detect the background (instead of the car).  5 up/downsamples. Then inverted the final background prediction mask to convert back to the car prediction.  This model on it's own scored 0.9970 and was the highest performing of the three.    It seemed to do best at the areas underneath the car, wheel/spokes, and detecting true car edges on difficult test images.\n\n2nd model - Classic Unet architecture to detect car.  6 up/down samples.\n\n3rd model - Split images in half for top bottom, trained Unet for each, and then concatenated final results.  Same architecture as 2nd model, just on half images.\n\nPost processing:\nIt appeared that many of the antenna's on the cars were non-continuous in the predictions.  I id'd these by counting the external contours of small contours that were within 50 pixels of each other and above the center of mass of the largest contour of size &gt; 100k pixels.  I then cropped an image containing the antenna  range and ran a simple canny that ran through the already identified points.  This seemed to clean up the antenna's substantially, but my estimate on final score impact was only around 0.00004.\n\nUsed Keras with TF backend, and primarily ran on a 4x 1080 Ti setup.  Found early on that running the Ti's for many hours straight caused them to get too hot and throttle their speed, so I had to install watercoolers on each of them to keep them at stable temps.\n\nAnother interesting finding that I didn't take full advantage of was the difference in the stage backgrounds.  It was stated by Carvana in one of the posts that there were three stages used, and if you look at enough images carefully you can identify the three distinct backgrounds.  One of the three backgrounds performed substantially better (0.0001) across all cars when blocked by color, size, and rotation.  I think there was opportunity to increase the score by creating custom predictors off of each of the backgrounds separately.",
    "225101": "&gt;  Found early on that running the Ti's for many hours straight caused them to get too hot and throttle their speed, so I had to install watercoolers on each of them to keep them at stable temps.\n\nUser avatar checks out.",
    "225142": "What computer/motherboard you have to use 4 x Tis ?",
    "225173": "mobo: gigabyte AORUS GA-Z270X-Gaming 9. it’s one of the few LGA1151 mobo’s with 4 double width pcie slots out there. Had to put a 1600W power supply on to be safe. During training, wall power is about 900W.",
    "225189": "Did you run into CPU bottleneck issues especially when doing augmentation?",
    "225210": "Not really. I’ve got an i7-7700k overclocked to 5GHz so it could still chew through augmentations pretty quickly",
    "225315": "I'm not sure if inverting the mask will have an effect on the train. I think that for the network it does not matter if the car has a value of 0 or 1.  \nDo you have an explanation of why it worked better?",
    "225367": "Thanks @Ironbar for sharing and congratulations."
  },
  "source": "meta"
}