mapbox / robosat

Semantic segmentation on aerial and satellite imagery. Extracts features such as: buildings, parking lots, roads, water, clouds
MIT License
2.02k stars 382 forks source link

Any value in downloading 2x DPI image? #146

Closed CooperNederhood closed 5 years ago

CooperNederhood commented 5 years ago

When describing the rs download command, the mapbox example uses the "@2x" specification to get a higher DPI image. Indeed, when I run the same rs download command with the "@2x" specification I get an image that is twice the size (measured in pixels) versus without the specification. But, from reading about DPI, it looks like DPI/PPI come into play when rendering an image be it digitally or printing. When using the image for model training there's no true increase in information through the "@2x" specification, right? If anything, it's bad to have the increased DPI because you're basically just doubling the size of your image but the true resolution doesn't change. Am I misunderstanding something here?

Thanks!

jqtrde commented 5 years ago

From https://docs.mapbox.com/api/#high-dpi-images:

Mapbox supports high DPI image output on all the Maps Service APIs that serve images. Add @2x before the file extension on a URL to request an image at double scale. For instance, a map tile that is 256×256 pixels will be 512×512 pixels with @2x, but will show the same content. When displayed on a page, the image will still be sized to 256×256 pixels, but four pixels of the original will represent one pixel in screen units.

I think your understanding is correct - I'd expect that the 2x requests would be wasteful for your purposes.