<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Colorizing Grayscale Imagery With Deep Learning - Workflow/Tips? in ArcGIS Image Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-image-analyst-questions/colorizing-grayscale-imagery-with-deep-learning/m-p/1565868#M771</link>
    <description>&lt;P&gt;Hi Pavan,&lt;/P&gt;&lt;P&gt;Many thanks for your reply!&amp;nbsp; Your recommendations are well-received.&amp;nbsp; I've been having some success with ensuring the BW training data and target image have similar brightness/contrast (requiring manual editing of both).&amp;nbsp; I'm now having very good success with colorizing vegetative areas, after training with 2-3 different datasets of 5-10k images at 50 epochs each.&amp;nbsp; However, accurate coloring of neighborhoods and urban areas remains elusive.&amp;nbsp; I think my next step will be to compile some larger datasets of solely urban areas and do several training sessions to see if that will produce good results.&lt;BR /&gt;&lt;BR /&gt;Here are some examples of my results colorizing 1936 imagery of Seattle.&amp;nbsp; As you can see, the uneven exposure across the orthomosaic isn't helping the results, but when zoomed in to mid-tone areas the results are quite nice:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Good results in this area with well-balanced exposure." style="width: 443px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/121066iC9BBD2EB8171F351/image-size/large?v=v2&amp;amp;px=999" role="button" title="Picture2.png" alt="Good results in this area with well-balanced exposure." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Good results in this area with well-balanced exposure.&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="A golf course in 1936: Forest, fields, and sand traps all nicely colored." style="width: 634px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/121069i16565D4053C95096/image-size/large?v=v2&amp;amp;px=999" role="button" title="Picture6.png" alt="A golf course in 1936: Forest, fields, and sand traps all nicely colored." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;A golf course in 1936: Forest, fields, and sand traps all nicely colored.&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Underexposed area: Some darker areas are mistaken for water and given bluish tones.  Houses receive no color" style="width: 674px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/121070iCDADC9AA131AC923/image-size/large?v=v2&amp;amp;px=999" role="button" title="Picture7.png" alt="Underexposed area: Some darker areas are mistaken for water and given bluish tones.  Houses receive no color" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Underexposed area: Some darker areas are mistaken for water and given bluish tones.  Houses receive no color&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Orthomosaic.  Uneven exposure across photo frames doesn't help things, but in general, forests and fields are green." style="width: 506px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/121071i8E70237F6401FB39/image-size/large?v=v2&amp;amp;px=999" role="button" title="Picture8.png" alt="Orthomosaic.  Uneven exposure across photo frames doesn't help things, but in general, forests and fields are green." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Orthomosaic.  Uneven exposure across photo frames doesn't help things, but in general, forests and fields are green.&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Overexposed area: Obvious issues.  It's important to make sure target images are well-balanced before processing." style="width: 447px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/121072iC1BBF7009CCBE73C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Picture9.png" alt="Overexposed area: Obvious issues.  It's important to make sure target images are well-balanced before processing." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Overexposed area: Obvious issues.  It's important to make sure target images are well-balanced before processing.&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Dec 2024 22:25:50 GMT</pubDate>
    <dc:creator>Snapshot36</dc:creator>
    <dc:date>2024-12-06T22:25:50Z</dc:date>
    <item>
      <title>Colorizing Grayscale Imagery With Deep Learning - Workflow/Tips?</title>
      <link>https://community.esri.com/t5/arcgis-image-analyst-questions/colorizing-grayscale-imagery-with-deep-learning/m-p/1563659#M767</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm trying to colorize some historical aerial imagery (1920s and 30s era ~1m GSD orthos from various parts of the U.S.) using the Deep Learning tools included with the Image Analyst extension.&amp;nbsp; I'm using the basic workflow as outlined in this article, however the guide is pretty basic and doesn't go into detail about how to fine-tune your model to achieve better results:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-pro/design-planning/colorizing-historic-black-and-white-aerial-imagery-using-deep-learning/" target="_blank"&gt;https://www.esri.com/arcgis-blog/products/arcgis-pro/design-planning/colorizing-historic-black-and-white-aerial-imagery-using-deep-learning/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For the record, I'm an amateur when it comes to GIS, so if I get some terms wrong please go easy on me &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&amp;nbsp; The end use will be adding the imagery to a flight simulator game (MSFS) so you can fly over cities and see what they looked like in the 1930s, which will be pretty cool!&lt;/P&gt;&lt;P&gt;My GPU is a 2070m with 8GB VRAM, so processing times have not been a big issue.&lt;/P&gt;&lt;P&gt;My results so far have been somewhat promising, but not yet usable.&amp;nbsp; Generally, trees and fields are fairly reliably colored green, and some water areas are colored blue, but buildings rarely get any color definition and are sometimes erroneously given green/blue hues.&amp;nbsp; The algorithm struggles with under- or over-exposed areas of the image; darker areas are typically treated like water and lighter areas aren't colored at all.&amp;nbsp; Sometimes large swaths of urban areas are colored a mild green, sometimes forest areas aren't colored at all or are rendered dark.&lt;/P&gt;&lt;P&gt;Here has been my general workflow so far:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Find a good-quality modern ortho for the same area (mainly NAIP) and export a manageable-sized chunk at 1m resolution.&amp;nbsp; I'm ensuring that the area I select contains all the same types of terrain features that are present in the historical image; cities, fields, forest, water bodies, etc.&lt;/LI&gt;&lt;LI&gt;Copy the exported image and convert to grayscale.&amp;nbsp; I've generally been using the green channel, but have experimented with others, and adjusting brightness/contrast to better match the historical imagery, without noticeable changes.&lt;/LI&gt;&lt;LI&gt;Export Training Data using the method in the above article, except I've been increasing my Tile Size to 512 and using a Stride of 0 (the areas I've been exporting are large enough that I don't believe I need to overlap tiles to get more data).&amp;nbsp; This has been resulting in training datasets of ~10,000 image pairs and ~4 GB.&lt;/LI&gt;&lt;LI&gt;Train Deep Learning Model using the method in above article.&amp;nbsp; Setting Max Epochs to 50-100, but I also have "Stop when model stops improving" checked and it's been stopping usually between 20-40 epochs.&lt;/LI&gt;&lt;LI&gt;Classify Pixels Using Deep Learning to color the grayscale images as described in the article.&amp;nbsp; I've also checked results on the grayscale image used for training, and as mentioned it reliably colors vegetation green and water blue but all other colors get neglected.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;So what should I do to improve my model?&amp;nbsp; Larger datasets?&amp;nbsp; Force more epochs?&amp;nbsp; Use promising models in the "use pre-trained model" function, and then do additional training using different source data?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If anyone has prior experience with this, any tips, tricks, or best practices would be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 14:38:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-image-analyst-questions/colorizing-grayscale-imagery-with-deep-learning/m-p/1563659#M767</guid>
      <dc:creator>Snapshot36</dc:creator>
      <dc:date>2024-12-02T14:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Colorizing Grayscale Imagery With Deep Learning - Workflow/Tips?</title>
      <link>https://community.esri.com/t5/arcgis-image-analyst-questions/colorizing-grayscale-imagery-with-deep-learning/m-p/1565792#M769</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/858205"&gt;@Snapshot36&lt;/a&gt;&lt;/P&gt;
&lt;P data-sourcepos="5:1-5:331"&gt;I wrote that blog as a Proof of Concept. I trained the model over a weekend. The training data and the AOI where I applied the model are both in Southern California; and I admit that the final output image is good enough for a proof of concept but it's not great. My training data was fairly small (maybe 3000-4000 image chip pairs). My model also needs a lot more serious training with more training data if I want to apply it to more diverse landscapes. Because we don't have any other pre-trained models, you cannot really use it as a base model to fine-tune it. Your best bet is to increase the quantity and diversity of your data. Try to have the same pixel size in your training data that you would like to use for inference. Perhaps try retraining without early stopping.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 20:05:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-image-analyst-questions/colorizing-grayscale-imagery-with-deep-learning/m-p/1565792#M769</guid>
      <dc:creator>PavanYadav</dc:creator>
      <dc:date>2024-12-06T20:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Colorizing Grayscale Imagery With Deep Learning - Workflow/Tips?</title>
      <link>https://community.esri.com/t5/arcgis-image-analyst-questions/colorizing-grayscale-imagery-with-deep-learning/m-p/1565868#M771</link>
      <description>&lt;P&gt;Hi Pavan,&lt;/P&gt;&lt;P&gt;Many thanks for your reply!&amp;nbsp; Your recommendations are well-received.&amp;nbsp; I've been having some success with ensuring the BW training data and target image have similar brightness/contrast (requiring manual editing of both).&amp;nbsp; I'm now having very good success with colorizing vegetative areas, after training with 2-3 different datasets of 5-10k images at 50 epochs each.&amp;nbsp; However, accurate coloring of neighborhoods and urban areas remains elusive.&amp;nbsp; I think my next step will be to compile some larger datasets of solely urban areas and do several training sessions to see if that will produce good results.&lt;BR /&gt;&lt;BR /&gt;Here are some examples of my results colorizing 1936 imagery of Seattle.&amp;nbsp; As you can see, the uneven exposure across the orthomosaic isn't helping the results, but when zoomed in to mid-tone areas the results are quite nice:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Good results in this area with well-balanced exposure." style="width: 443px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/121066iC9BBD2EB8171F351/image-size/large?v=v2&amp;amp;px=999" role="button" title="Picture2.png" alt="Good results in this area with well-balanced exposure." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Good results in this area with well-balanced exposure.&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="A golf course in 1936: Forest, fields, and sand traps all nicely colored." style="width: 634px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/121069i16565D4053C95096/image-size/large?v=v2&amp;amp;px=999" role="button" title="Picture6.png" alt="A golf course in 1936: Forest, fields, and sand traps all nicely colored." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;A golf course in 1936: Forest, fields, and sand traps all nicely colored.&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Underexposed area: Some darker areas are mistaken for water and given bluish tones.  Houses receive no color" style="width: 674px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/121070iCDADC9AA131AC923/image-size/large?v=v2&amp;amp;px=999" role="button" title="Picture7.png" alt="Underexposed area: Some darker areas are mistaken for water and given bluish tones.  Houses receive no color" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Underexposed area: Some darker areas are mistaken for water and given bluish tones.  Houses receive no color&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Orthomosaic.  Uneven exposure across photo frames doesn't help things, but in general, forests and fields are green." style="width: 506px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/121071i8E70237F6401FB39/image-size/large?v=v2&amp;amp;px=999" role="button" title="Picture8.png" alt="Orthomosaic.  Uneven exposure across photo frames doesn't help things, but in general, forests and fields are green." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Orthomosaic.  Uneven exposure across photo frames doesn't help things, but in general, forests and fields are green.&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Overexposed area: Obvious issues.  It's important to make sure target images are well-balanced before processing." style="width: 447px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/121072iC1BBF7009CCBE73C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Picture9.png" alt="Overexposed area: Obvious issues.  It's important to make sure target images are well-balanced before processing." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Overexposed area: Obvious issues.  It's important to make sure target images are well-balanced before processing.&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 22:25:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-image-analyst-questions/colorizing-grayscale-imagery-with-deep-learning/m-p/1565868#M771</guid>
      <dc:creator>Snapshot36</dc:creator>
      <dc:date>2024-12-06T22:25:50Z</dc:date>
    </item>
  </channel>
</rss>

