{"id":10733,"date":"2020-10-27T10:13:52","date_gmt":"2020-10-27T10:13:52","guid":{"rendered":"https:\/\/www.experfy.com\/blog\/?p=10733"},"modified":"2023-10-16T18:04:28","modified_gmt":"2023-10-16T18:04:28","slug":"training-ai-with-cgi","status":"publish","type":"post","link":"https:\/\/www.experfy.com\/blog\/ai-ml\/training-ai-with-cgi\/","title":{"rendered":"Training AI with CGI"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"10733\" class=\"elementor elementor-10733\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-46db0b05 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-eae-slider=\"90962\" data-id=\"46db0b05\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-6bc5af07\" data-eae-slider=\"47711\" data-id=\"6bc5af07\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-0713e7f elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-eae-slider=\"89482\" data-id=\"0713e7f\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-c181e3e\" data-eae-slider=\"94916\" data-id=\"c181e3e\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b263f43 elementor-widget elementor-widget-text-editor\" data-id=\"b263f43\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>In this article we go through how we trained a <a href=\"https:\/\/www.experfy.com\/blog\/computer-vision-why-its-hard-to-compare-ai-and-human-perception\/\" target=\"_blank\" rel=\"noreferrer noopener\">computer vision<\/a> model (AI) to detect sub-components of a Raspberry PI using only synthetic data (CGI).<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d7b8953 elementor-widget elementor-widget-text-editor\" data-id=\"d7b8953\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Training with synthetic data is an increasingly popular way to quench the thirst of data hungry deep learning models. The datasets used for this project are available for free at <a href=\"http:\/\/app.zumolabs.ai\/\" target=\"_blank\" rel=\"noreferrer noopener\">app.zumolabs.ai<\/a> [1]. We want to make using synthetic data easy for everyone and plan to release more datasets in the future.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-d5b97bd elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-eae-slider=\"16374\" data-id=\"d5b97bd\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3e9f6e8\" data-eae-slider=\"15987\" data-id=\"3e9f6e8\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5fc8410 elementor-widget elementor-widget-heading\" data-id=\"5fc8410\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">The Problem<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-2dd6cf0 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-eae-slider=\"75343\" data-id=\"2dd6cf0\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-b01de00\" data-eae-slider=\"73454\" data-id=\"b01de00\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-0c047c3 elementor-widget elementor-widget-text-editor\" data-id=\"0c047c3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The <a href=\"https:\/\/www.raspberrypi.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Raspberry Pi<\/a> is a single-board computer very popular with hobbyists. Our goal was to detect some of the sub-components that sit on the board: the pin connectors, the audio jack, and the ethernet port. Though this is a toy problem, it is not far from what you see in the real world \u2014 where automating component and defect detection using computer vision can improve the speed and reliability of manufacturing.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-8326f67 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-eae-slider=\"73158\" data-id=\"8326f67\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-edcf66f\" data-eae-slider=\"80716\" data-id=\"edcf66f\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-bd9e9fb elementor-widget elementor-widget-heading\" data-id=\"bd9e9fb\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">The Data<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-3cf4c82 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-eae-slider=\"10384\" data-id=\"3cf4c82\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-563d96f\" data-eae-slider=\"41626\" data-id=\"563d96f\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7a2a25b elementor-widget elementor-widget-text-editor\" data-id=\"7a2a25b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>To generate synthetic data, we first need a 3D model of the object. Luckily, in today\u2019s world, <strong> most objects already exist in the virtual world<\/strong\\>. Asset aggregation sites like SketchFab, TurboSquid, or Thangs, have commoditized 3D models [2]. Tip for the wise: if you can\u2019t find a model on the internet, try contacting the manufacturer directly, or scan and model the object yourself.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-25d8ddb elementor-widget elementor-widget-image\" data-id=\"25d8ddb\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"512\" src=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_XejpcXCtxyIBJQ79-1024x512.png\" class=\"attachment-large size-large wp-image-33481\" alt=\"\" srcset=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_XejpcXCtxyIBJQ79-1024x512.png 1024w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_XejpcXCtxyIBJQ79-300x150.png 300w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_XejpcXCtxyIBJQ79-768x384.png 768w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_XejpcXCtxyIBJQ79-1536x768.png 1536w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_XejpcXCtxyIBJQ79-610x305.png 610w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_XejpcXCtxyIBJQ79-360x180.png 360w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_XejpcXCtxyIBJQ79-750x375.png 750w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_XejpcXCtxyIBJQ79-1140x570.png 1140w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_XejpcXCtxyIBJQ79.png 1600w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-2e58a34 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-eae-slider=\"70959\" data-id=\"2e58a34\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-ffec97a\" data-eae-slider=\"51723\" data-id=\"ffec97a\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-060b3bf elementor-widget elementor-widget-text-editor\" data-id=\"060b3bf\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>We then use a game engine (such as Unity or Unreal Engine) to take thousands of images of our 3D model from a variety of camera angles and under a variety of lighting conditions. Each image has a corresponding segmentation mask, which sections out the different components in the image. In future articles we will dive deeper into the process of creating synthetic images (so stay tuned!).<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fc40e5d elementor-widget elementor-widget-text-editor\" data-id=\"fc40e5d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>So now that we have thousands of synthetic images, we should be good right? No! It is very important to test synthetically-trained models on real data to know whether the model is successfully generalizing to real data. There is a gap between simulation-produced data and real data known as the <strong>sim2real gap<\/strong>. One way to think about it is that deep learning models will overfit on the smallest of details, and if we aren\u2019t careful many of these details may only exist in the synthetic data.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-016f600 elementor-widget elementor-widget-text-editor\" data-id=\"016f600\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>For this problem, we manually annotated a small test dataset of a dozen real images. Manual annotation is time consuming and expensive. Important to note that if we were using real images for training we would have to manually annotate thousands of images instead of just a handful for testing! That\u2019s, unfortunately, the current way of doing things, the status quo we are trying to change. Getting rid of this manual annotation process is a critical step in building better AI.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f938042 elementor-widget elementor-widget-text-editor\" data-id=\"f938042\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>One way we can start closing the sim2real gap is through a technique known as <strong> domain randomization <\/strong>[3][4]. This strategy involves randomizing properties of the virtual RPi, especially the visual appearance of the backgrounds and the RPi itself. This has the downstream effect of making the model we train on this data more robust to variations in color and lighting. This is also known as the network\u2019s ability to generalize.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-4c4a91f elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-eae-slider=\"30191\" data-id=\"4c4a91f\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-5f7b869\" data-eae-slider=\"4336\" data-id=\"5f7b869\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4f55ffa elementor-widget elementor-widget-image\" data-id=\"4f55ffa\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"1024\" height=\"257\" src=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_RuqjuxeTCT0jvcZ_-1024x257.png\" class=\"attachment-large size-large wp-image-33482\" alt=\"\" srcset=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_RuqjuxeTCT0jvcZ_-1024x257.png 1024w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_RuqjuxeTCT0jvcZ_-300x75.png 300w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_RuqjuxeTCT0jvcZ_-768x193.png 768w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_RuqjuxeTCT0jvcZ_-610x153.png 610w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_RuqjuxeTCT0jvcZ_-750x188.png 750w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_RuqjuxeTCT0jvcZ_-1140x286.png 1140w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_RuqjuxeTCT0jvcZ_.png 1440w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-f5b5c8a elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-eae-slider=\"75944\" data-id=\"f5b5c8a\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-d00485f\" data-eae-slider=\"27556\" data-id=\"d00485f\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-9a3b433 elementor-widget elementor-widget-image\" data-id=\"9a3b433\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"1024\" height=\"540\" src=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_BH2FI_GU_-bGVVQp-1024x540.png\" class=\"attachment-large size-large wp-image-33483\" alt=\"\" srcset=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_BH2FI_GU_-bGVVQp-1024x540.png 1024w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_BH2FI_GU_-bGVVQp-300x158.png 300w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_BH2FI_GU_-bGVVQp-768x405.png 768w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_BH2FI_GU_-bGVVQp-610x322.png 610w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_BH2FI_GU_-bGVVQp-750x395.png 750w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_BH2FI_GU_-bGVVQp-1140x601.png 1140w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_BH2FI_GU_-bGVVQp.png 1440w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-762340a elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-eae-slider=\"44951\" data-id=\"762340a\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-772d738\" data-eae-slider=\"91178\" data-id=\"772d738\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-de10946 elementor-widget elementor-widget-heading\" data-id=\"de10946\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">The Model and Training<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-892c265 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-eae-slider=\"41348\" data-id=\"892c265\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-baaa617\" data-eae-slider=\"38762\" data-id=\"baaa617\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-fd1365d elementor-widget elementor-widget-text-editor\" data-id=\"fd1365d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Now we get to the model. There are many different types of computer vision models to choose from. Models which leverage deep learning are the most popular right now. They work very well for detection tasks, such as this project. We used a model from PyTorch\u2019s torchvision library based on the ResNet architecture [5]. <strong>Synthetic data will work with any model architecture, so feel free to experiment and find the one that best fits your use case<\/strong>.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6e0fce3 elementor-widget elementor-widget-text-editor\" data-id=\"6e0fce3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>We trained our model with four different synthetic datasets to show how domain randomization and dataset size affect performance on our real test dataset:<\/p>\n<p><br \/><ul class=\"wp-block-list\"><br \/><li><em>Dataset A<\/em>\u00a0\u2014 15 thousand realistic synthetic images.<\/li><br \/><li><em>Dataset B<\/em>\u00a0\u2014 15 thousand domain randomized synthetic images.<\/li><br \/><li><em>Dataset C<\/em>\u00a0\u2014 6 thousand realistic synthetic images.<\/li><br \/><li><em>Dataset D<\/em>\u00a0\u2014 6 thousand domain randomized synthetic images.<\/li><br \/><\/ul><br \/><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-4592b3c elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-eae-slider=\"19\" data-id=\"4592b3c\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-0fff24a\" data-eae-slider=\"59323\" data-id=\"0fff24a\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-3dcc93f elementor-widget elementor-widget-image\" data-id=\"3dcc93f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"573\" src=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_HN2-x4aJJaV_EkZB-1024x573.png\" class=\"attachment-large size-large wp-image-33484\" alt=\"\" srcset=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_HN2-x4aJJaV_EkZB-1024x573.png 1024w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_HN2-x4aJJaV_EkZB-300x168.png 300w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_HN2-x4aJJaV_EkZB-768x430.png 768w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_HN2-x4aJJaV_EkZB-610x341.png 610w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_HN2-x4aJJaV_EkZB-750x420.png 750w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_HN2-x4aJJaV_EkZB-1140x638.png 1140w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_HN2-x4aJJaV_EkZB.png 1440w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-38af9bd elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-eae-slider=\"8102\" data-id=\"38af9bd\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-85b58f9\" data-eae-slider=\"27505\" data-id=\"85b58f9\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7ef62f6 elementor-widget elementor-widget-text-editor\" data-id=\"7ef62f6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>We use mAP (mean average precision) to measure the performance of our computer vision model. It is important to note that performance metrics can be very arbitrary, so make sure to look at model predictions to make sure your model is performing as it should. As we predicted, the performance of the models increases with the more synthetic data we use. Deep learning models will almost always improve with larger datasets, but, more interestingly, training with a\u00a0<em>domain randomized<\/em>\u00a0synthetic dataset results in a significant performance boost over our real test dataset.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-8fdbc79 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-eae-slider=\"26253\" data-id=\"8fdbc79\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-72b125f\" data-eae-slider=\"89149\" data-id=\"72b125f\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-52f91ac elementor-widget elementor-widget-heading\" data-id=\"52f91ac\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Conclusion<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-8521104 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-eae-slider=\"21940\" data-id=\"8521104\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4084355\" data-eae-slider=\"47641\" data-id=\"4084355\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-136db11 elementor-widget elementor-widget-text-editor\" data-id=\"136db11\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>TLDR: in this article, we trained a computer vision model to detect sub-components of a Raspberry PI using entirely synthetic data. We used the technique of domain randomization to improve the performance of our model on real images. And, ta-da! Our trained model works on real data <strong> despite it never having seen a single real image<\/strong>.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d4be54c elementor-widget elementor-widget-text-editor\" data-id=\"d4be54c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Thanks for reading and make sure to check out the datasets for yourself at <a href=\"http:\/\/app.zumolabs.ai\/\" target=\"_blank\" rel=\"noreferrer noopener\">app.zumolabs.ai<\/a>! If you have any questions or are curious about synthetic data, send us an email<a href=\"mailto:info@zumolabs.ai\">,<\/a> we love to chat.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-abc911e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-eae-slider=\"70683\" data-id=\"abc911e\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-13ff9e3\" data-eae-slider=\"89044\" data-id=\"13ff9e3\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5a4cc5b elementor-widget elementor-widget-heading\" data-id=\"5a4cc5b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h4 class=\"elementor-heading-title elementor-size-default\">References<\/h4>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-3343318 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-eae-slider=\"80567\" data-id=\"3343318\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-b305787\" data-eae-slider=\"77589\" data-id=\"b305787\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-165ef3b elementor-widget elementor-widget-text-editor\" data-id=\"165ef3b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>[1] Zumo Labs Data Portal.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d189f8f elementor-widget elementor-widget-text-editor\" data-id=\"d189f8f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>[2] 3D AssetSites: SketchFab (sketchfab.com), TurboSquid (turbosquid.com), Thangs (thangs.com).<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6e78c22 elementor-widget elementor-widget-text-editor\" data-id=\"6e78c22\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>[3] Lilian Weng. \u201cDomain Randomization for Sim2Real Transfer\u201d. (<a href=\"https:\/\/lilianweng.github.io\/lil-log\/2019\/05\/05\/domain-randomization.html\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/lilianweng.github.io\/lil-log\/2019\/05\/05\/domain-randomization.html<\/a>).<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1b145c7 elementor-widget elementor-widget-text-editor\" data-id=\"1b145c7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>[4] Josh Tobin, et al. \u201cDomain randomization for transferring deep neural networks from simulation to the real world.\u201d IROS, 2017. (https:\/\/arxiv.org\/abs\/1703.06907).<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b13e386 elementor-widget elementor-widget-text-editor\" data-id=\"b13e386\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>[5] Torchvision on GitHub. (https:\/\/github.com\/pytorch\/vision).<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Training with synthetic data is an increasingly popular way to quench the thirst of data hungry deep learning models. Learn how to train a computer vision model (AI) to detect sub-components of a Raspberry PI using only synthetic data (CGI).<\/p>\n","protected":false},"author":949,"featured_media":10734,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[183],"tags":[226,856,487,854,855,853,852],"ppma_author":[3796],"class_list":["post-10733","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-ml","tag-ai","tag-cgi","tag-computer-vision","tag-deep-learning-model","tag-raspberry-pi","tag-synthetic-data","tag-training"],"authors":[{"term_id":3796,"user_id":949,"is_guest":0,"slug":"hugo-ponte","display_name":"Hugo Ponte","avatar_url":"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/Hugo-Ponte-150x150.jpg","author_category":"","user_url":"http:\/\/zumolabs.ai","last_name":"Ponte","first_name":"Hugo","job_title":"","description":"Hugo Ponte is Co-Founder at Zumo Labs that generates custom synthetic data sets for more robust and reliable computer vision models."}],"_links":{"self":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/10733","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/users\/949"}],"replies":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/comments?post=10733"}],"version-history":[{"count":0,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/10733\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media\/10734"}],"wp:attachment":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media?parent=10733"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/categories?post=10733"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/tags?post=10733"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=10733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}