Oslandia / deeposlandia

Migrated to: https://gitlab.com/Oslandia/deeposlandia
MIT License
59 stars 16 forks source link

Address RGBA image uploads #122

Closed delhomer closed 5 years ago

delhomer commented 5 years ago

This commit aims at addressing uploads of four-channeled images onto the web application predictor tool. For now, such RGBA images are saved, and passed to neural network models; however this last step sends a bug, as the model expects (im_size, im_size, 3)-shaped images, and gets (im_size, im_size, 4)-shaped images.

As a fix, in case of RGBA images, we store only the first three channels and save the image as a RGB picture on the server. A message is also displayed on the webpage to inform the user.

This PR fixes issue #107 .