{"id":1784,"date":"2021-11-06T19:13:51","date_gmt":"2021-11-06T10:13:51","guid":{"rendered":"https:\/\/blog.testworks.co.kr\/en\/?p=1784"},"modified":"2022-12-28T15:37:14","modified_gmt":"2022-12-28T06:37:14","slug":"semantic-segmentation-technologies-and-training-method-through-deep-learning","status":"publish","type":"post","link":"https:\/\/blog.aiworkx.ai\/en\/semantic-segmentation-technologies-and-training-method-through-deep-learning\/","title":{"rendered":"Semantic Segmentation Technologies and Training Method through Deep Learning"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-1 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/blog.testworks.co.kr\/wp-content\/uploads\/2021\/11\/Semantech_Segmentation_Image_Separation_blog-cover.png\" alt=\"\" class=\"wp-image-2070\"\/><\/figure><\/div>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p style=\"font-size:17px\">In the computer vision field, semantic segmentation is the process of dividing a digital image into multiple sets of pixels, by which segmentation simplifies and transforms the representation of the image into something which is easy to interpret. Along with object detection, semantic segmentation is the most widely used process in the field of computer vision.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-2 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/blog.testworks.co.kr\/wp-content\/uploads\/2021\/11\/\uc778\uacf5\uc9c0\ub2a5\uc744-\ud1b5\ud55c-\uc774\ubbf8\uc9c0\uc758-\uc758\ubbf8\uc801-\ubd84\ud560Semantic-segmentation_\uadf8\ub9bc1.png\" alt=\"\" class=\"wp-image-1996\"\/><figcaption>[Figure 1] Example of semantic segmentation (Source: COCO 2020)<\/figcaption><\/figure><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p style=\"font-size:17px\">If object recognition shows classification results for a specific area in the image, semantic segmentation shows classification results for all pixels in the image. Therefore, as shown in the example above, it is possible to extinguish the meaning of each part of the image (people, roads, walls, trees, rivers, grass, sky, etc.).<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.testworks.co.kr\/wp-content\/uploads\/2021\/11\/\uc778\uacf5\uc9c0\ub2a5\uc744-\ud1b5\ud55c-\uc774\ubbf8\uc9c0\uc758-\uc758\ubbf8\uc801-\ubd84\ud560Semantic-segmentation_\uadf8\ub9bc2-1235x647.png\" alt=\"\" class=\"wp-image-1997\" width=\"618\" height=\"324\"\/><figcaption>[Figure 2] Example of semantic segmentation and object detection (Source: <a href=\"https:\/\/www.youtube.com\/watch?v=nDPWywWRIRo\" data-type=\"URL\" data-id=\"https:\/\/www.youtube.com\/watch?v=nDPWywWRIRo\">Stanford University School of Engineering<\/a>)<\/figcaption><\/figure><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p style=\"font-size:17px\">One of the areas that mainly utilize semantic segmentation technology is autonomous driving. Tesla, a leader in autonomous driving using artificial intelligence, analyzes images in real time through semantic segmentation, object detection, and monocular depth estimation technology.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p style=\"font-size:17px\">In particular, semantic segmentation plays a very important role in Tesla\u2019s autonomous driving to distinguish vehicle from people, road from things other than road, central line and crosswalks in the image.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/blog.testworks.co.kr\/wp-content\/uploads\/2021\/11\/\uc778\uacf5\uc9c0\ub2a5\uc744-\ud1b5\ud55c-\uc774\ubbf8\uc9c0\uc758-\uc758\ubbf8\uc801-\ubd84\ud560Semantic-segmentation_\uadf8\ub9bc3.png\" alt=\"\" class=\"wp-image-1998\"\/><figcaption>[Figure 3] Example of Tesla&#8217;s use of artificial intelligence (Source: <a href=\"https:\/\/www.tesla.com\/AI\" data-type=\"URL\" data-id=\"https:\/\/www.tesla.com\/AI\">Tesla<\/a>)<\/figcaption><\/figure><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p style=\"font-size:17px\">We have talked about this naturally but it has only been a few years since semantic segmentation became available for mission critical <a href=\"https:\/\/blog.testworks.co.kr\/semantic-segmentation-tech-and-learning-method-through-deep-learning\/#_ftn1\">[1]<\/a> areas such as autonomous driving. Until then, it was almost impossible to conduct semantic segmentation to the level of high accuracy responding to various situations through computer programming. Semantic segmentation achieving performance similar to the level of people just recently can be said as a historical development in the field of computer vision.<\/p>\n\n\n\n<p style=\"font-size:17px\">What made all this possible was deep learning technology represented by the recent artificial intelligence. As deep learning is combined with computer vision field, image interpretation technologies such as convolution neural network developed at a rapid rate, and analysis with high accuracy became possible.<\/p>\n\n\n\n<p style=\"font-size:17px\">As we know, AI can become very smart through deep learning, but AI have to be train based on vast amount of data to do so.<\/p>\n\n\n\n<p style=\"font-size:17px\">Then, let&#8217;s look at what kind of data artificial intelligence trains from to make semantic segmentation possible.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.testworks.co.kr\/wp-content\/uploads\/2021\/11\/\uc778\uacf5\uc9c0\ub2a5\uc744-\ud1b5\ud55c-\uc774\ubbf8\uc9c0\uc758-\uc758\ubbf8\uc801-\ubd84\ud560Semantic-segmentation_\uadf8\ub9bc4-1235x434.png\" alt=\"\" class=\"wp-image-2000\" width=\"618\" height=\"217\"\/><figcaption>[Figure 4] Left: Original image, right: Processed image (Source: ADE Challenge 2016)<\/figcaption><\/figure><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p style=\"font-size:17px\">Training data can take various forms depending on the definition, but the process of creating training data for semantic segmentation is as follows.<\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<ol class=\"wp-block-list\"><li>Set class (meaning type) of semantic segmentation<\/li><li>Categorize original images in pixels according to predefined classes<\/li><li>Create processed images with RGB values of pixels changed according to class<\/li><li>Create mapping information for classes and RGB values<\/li><\/ol>\n\n\n\n<div style=\"height:2px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p style=\"font-size:17px\">To train artificial intelligence for semantic segmentation, one must decide which class (semantic type) to segment the image into. The class can be set to the things that artificial intelligence wants to recognize. In the image above, for example, background, people, trees, flower pots, chairs, bags, etc. can be the class.<\/p>\n\n\n\n<p style=\"font-size:17px\">Next, it is necessary to differentiate original images according to the predefined class. This is the process of letting the AI know the correct answer. As a person needs to mark the correct answer on an image, the tool to perform this task is necessary.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/blog.testworks.co.kr\/wp-content\/uploads\/2021\/11\/\uc778\uacf5\uc9c0\ub2a5\uc744-\ud1b5\ud55c-\uc774\ubbf8\uc9c0\uc758-\uc758\ubbf8\uc801-\ubd84\ud560Semantic-segmentation_\uadf8\ub9bc5.png\" alt=\"\" class=\"wp-image-2001\"\/><figcaption>[Figure 5] Classification at the semantic unit of images through blackolive, which is Testworks\u2019 processing tool.<\/figcaption><\/figure><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p style=\"font-size:17px\">If images are classified at the semantic unit using a tool, it is possible to create image with changed RGB value of each pixel from classified information. There exist many colors for the convenience of task in the segmentation in the tool, but this can be made into a simpler form for the AI training. The form like processed image in [Figure 4] is the image with changed RGB value of each pixel to (1,1,1) (2,2,2) (3,3,3) \u2026 of each class and background (0,0,0).<\/p>\n\n\n\n<p style=\"font-size:17px\">Finally, class and RGB value mapping information are used to define which RGB value of processed image shows which class it belongs to. If it is a simplified processed image, numeric ID can be attached and RGB value can be changed according to ID. For example, the RGB value of \u201cpeople\u201d in class 1 is (1, 1, 1) and the RGB value of the \u201cvehicle\u201d in class 2 is (2, 2, 2).<\/p>\n\n\n\n<p style=\"font-size:17px\">After the training data is ready, AI can go through training by analyzing the image after receiving original image as an input, conducting semantic segmentation at the pixel unit, and comparing the results with the correct answer of processed image.<\/p>\n\n\n\n<p style=\"font-size:17px\">When the training is finished properly, AI can conduct semantic segmentation of images obtained from a camera and can be used in the fields such as autonomous driving. The figure below is an example of sematic segmentation of camera images conducted by AI, making it more vivid by coloring by class.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/blog.testworks.co.kr\/wp-content\/uploads\/2021\/11\/\uc778\uacf5\uc9c0\ub2a5\uc744-\ud1b5\ud55c-\uc774\ubbf8\uc9c0\uc758-\uc758\ubbf8\uc801-\ubd84\ud560Semantic-segmentation_\uadf8\ub9bc6.png\" alt=\"\" class=\"wp-image-2002\"\/><figcaption>[Figure 6] Left: camera image Right: Results of semantic segmentation<\/figcaption><\/figure><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p style=\"font-size:17px\">Do you think that it can distinguish vehicles, people, trucks, sigh boards, roads, sidewalks, plants, trees, buildings and sky well?<\/p>\n\n\n\n<p style=\"font-size:17px\">These semantic segmentation technologies are being used in various fields such as unmanned robots, security, anomaly detection, factory automation, and medical care, as well as autonomous driving.<\/p>\n\n\n\n<p style=\"font-size:17px\">Artificial intelligence, which is developing significantly with deep learning, is expected to do more in the future.<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<p><a href=\"#_ftnref1\">[1]<\/a> An area where a trivial mistake can lead to fatal consequences<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\" style=\"grid-template-columns:15% auto\"><figure class=\"wp-block-media-text__media\"><img decoding=\"async\" src=\"https:\/\/blog.testworks.co.kr\/wp-content\/uploads\/2021\/11\/\uae40\ubc94\uc9c4-\uc8fc\uc784-\uc5f0\uad6c\uc6d0-\ud504\ub85c\ud544-2.jpg\" alt=\"\" class=\"wp-image-2031 size-full\"\/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"has-normal-font-size\"><strong><strong>Beomjin <strong><strong>Kim<\/strong><\/strong><\/strong><\/strong><\/p>\n\n\n\n<p class=\"has-normal-font-size\"><strong><strong>Assistant Research Engineer, AI Research &amp; Development Team<\/strong><\/strong><\/p>\n\n\n\n<p>BA, Business Informatics, Konkuk University<\/p>\n\n\n\n<p>He is growing as a software engineer by accumulating various experiences at Testworks with an aim to provide convenience to many people through various technologies. Currently, he is in charge of deep learning model and AI service development at the AI Research &amp; Development Team.<\/p>\n<\/div><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Semantic segmentation technologies used in various fields such as autonomous driving, unmanned robots, security, anomaly detection, factory automation, and medical care<\/p>\n","protected":false},"author":1,"featured_media":1785,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[462,552,584,562,71,456,377,582,583],"class_list":["post-1784","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-insight","tag-artificial-intelligence","tag-artificial-intelligence-data","tag-artificial-intelligence-learning-data","tag-autonomous-driving","tag-blackolive","tag-computer-vision","tag-deep-learning","tag-object-detection","tag-semantic-segmentation"],"_links":{"self":[{"href":"https:\/\/blog.aiworkx.ai\/en\/wp-json\/wp\/v2\/posts\/1784","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.aiworkx.ai\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.aiworkx.ai\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.aiworkx.ai\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.aiworkx.ai\/en\/wp-json\/wp\/v2\/comments?post=1784"}],"version-history":[{"count":5,"href":"https:\/\/blog.aiworkx.ai\/en\/wp-json\/wp\/v2\/posts\/1784\/revisions"}],"predecessor-version":[{"id":1827,"href":"https:\/\/blog.aiworkx.ai\/en\/wp-json\/wp\/v2\/posts\/1784\/revisions\/1827"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.aiworkx.ai\/en\/wp-json\/wp\/v2\/media\/1785"}],"wp:attachment":[{"href":"https:\/\/blog.aiworkx.ai\/en\/wp-json\/wp\/v2\/media?parent=1784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.aiworkx.ai\/en\/wp-json\/wp\/v2\/categories?post=1784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.aiworkx.ai\/en\/wp-json\/wp\/v2\/tags?post=1784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}