<?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: Image aspect ratio - how does it affect accuracy? in Intel® Distribution of OpenVINO™ Toolkit</title>
    <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Image-aspect-ratio-how-does-it-affect-accuracy/m-p/658067#M2810</link>
    <description>&lt;P&gt;Yes makes sense, I wonder then, how do you tell what aspect ratio the model was trained on? Specifically, which ones in the appzoo?&lt;/P&gt;</description>
    <pubDate>Wed, 08 Aug 2018 17:44:49 GMT</pubDate>
    <dc:creator>idata</dc:creator>
    <dc:date>2018-08-08T17:44:49Z</dc:date>
    <item>
      <title>Image aspect ratio - how does it affect accuracy?</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Image-aspect-ratio-how-does-it-affect-accuracy/m-p/658065#M2808</link>
      <description>&lt;P&gt;Hi all, I've been playing with the examples in the zoo, and have a question about image aspect ratio, how do I ensure maximum accuracy? For example, the ssd mobilenet app will resize images to 300x300 which is a square ratio:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;CODE&gt;# Neural network assumes input images are these dimensions.
SSDMN_NETWORK_IMAGE_WIDTH = 300
SSDMN_NETWORK_IMAGE_HEIGHT = 300&lt;/CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, the video that it downloads and uses as examples is all 960x540 which is 16:9 ratio, for example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;CODE&gt;https://raw.githubusercontent.com/nealvis/media/master/traffic_vid/bus_station_6094_960x540.mp4&lt;/CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code uses OpenCV's resize filter. Now, let's compare the results of resizing vs. cropping then resizing. First, this is what resizing that video from 16:9 to 1:1 looks like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper" image-alt="X9MCJit.jpg"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/4812iC704C730AD90AC32/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="X9MCJit.jpg" alt="X9MCJit.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what it looks like when you crop first and then resize:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper" image-alt="BNYOGVm.jpg"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/4813i996162EE44690646/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="BNYOGVm.jpg" alt="BNYOGVm.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These are clearly quite different, and my question is, how does this affect accuracy? Should I rather crop my video to 1:1 or do the example models all expect that video is going to be 16:9 squashed into 1:1 ratio? To the eye, it would seem more logical that the model would perform better on image files that are not distorted by resizing to a different ratio. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance. &lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 16:04:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Image-aspect-ratio-how-does-it-affect-accuracy/m-p/658065#M2808</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2018-08-08T16:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Image aspect ratio - how does it affect accuracy?</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Image-aspect-ratio-how-does-it-affect-accuracy/m-p/658066#M2809</link>
      <description>&lt;P&gt;I was thinking about this too recently. I think that the aspect ratio doesn't matter as long as it remains consistent. If the images you input to the network are always 16:9 then training on 16:9 images is fine. This is because the pre-processing before input to the network will always be the same 'squashedness', the detection you are trying to learn will always be distorted by the same amount. &lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 16:46:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Image-aspect-ratio-how-does-it-affect-accuracy/m-p/658066#M2809</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2018-08-08T16:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: Image aspect ratio - how does it affect accuracy?</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Image-aspect-ratio-how-does-it-affect-accuracy/m-p/658067#M2810</link>
      <description>&lt;P&gt;Yes makes sense, I wonder then, how do you tell what aspect ratio the model was trained on? Specifically, which ones in the appzoo?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 17:44:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Image-aspect-ratio-how-does-it-affect-accuracy/m-p/658067#M2810</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2018-08-08T17:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Image aspect ratio - how does it affect accuracy?</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Image-aspect-ratio-how-does-it-affect-accuracy/m-p/658068#M2811</link>
      <description>&lt;P&gt;Doing a center crop and scale down to network input size will give the best results. We have run lots of experiments to validate this.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 06:53:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Image-aspect-ratio-how-does-it-affect-accuracy/m-p/658068#M2811</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2018-08-15T06:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Image aspect ratio - how does it affect accuracy?</title>
      <link>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Image-aspect-ratio-how-does-it-affect-accuracy/m-p/658069#M2812</link>
      <description>&lt;P&gt;Thanks Victor, yes agreed, I ran some experiments myself and came to the same conclusion that warping or distorting the image is a bad idea even if it can still work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the examples in the ncappzoo should be changed to work on cropped video, otherwise it's just misleading for newcomers who might assume that 16:9 is the desirable ratio. &lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 18:50:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Distribution-of-OpenVINO/Image-aspect-ratio-how-does-it-affect-accuracy/m-p/658069#M2812</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2018-08-16T18:50:54Z</dc:date>
    </item>
  </channel>
</rss>

