8

The final countdown: Deploying my Deep Learning Project

 3 years ago
source link: https://mc.ai/the-final-countdown-deploying-my-deep-learning-project-2/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Creating and deploying a website with Django

Django is a web framework for rapid development using Python. The problem is, two weeks ago I didn’t know how to use it. I read about it before but I never found the right opportunity to use it. I figured it could be a good and useful challenge. After all, learning is fun! Or at least it is fun after you finally understand how things work. The learning process was something like this:

  • On the first two days, I started by looking at some tutorials on YouTube;
  • As I learned the basics, I started to create my website project;
  • The next few days I gradually added more features, as I started to understand how the framework works.

This is a process characterized by a lot of Google searches, an unreasonable amount of open tabs in the browser, and patience — a lot of it.

The good thing is that the most I learn the more I realise the potential Django brings. Over time, the progress starts to accelerate — climbing the learning curve!

After having a working example I decided it was time to deploy it. I found this process quite more challenging than anticipated. Often, tutorials on YouTube only cover the development part and lack an explanation about the deploying process. It took me about three days just to make this step work. I had to figure out what are Nginx and Gunicorn and how to make everything work . But well, like in everything, when the task is more challenging is when we learn the most.

Enough talk! Let me show you the webpage ( meteo-ai.com ) and describe the main functionality.

Figure 1. Print screen of the website showing extreme fires that affected Portugal in 2017.
Figure 2. Print screen of the website showing the overview for the past year.

Nice features the website has:

  • Burned areas data and active fires data are stored in a PostGIS database that plays well with GeoDjango ;
  • The user can select the time range for the visualization that will result in a query for the database;
  • Results on the website are displayed on Leaflet maps, making use of the nice marker cluster extension that allows to aggregate close markers in a clean and efficient way (see the map in Figure 2).
  • The burned area maps are displayed by rendering each pixel as a polygon, using the dates of burning or the confidence level of the model to colour the regions. This allows me to have a colourmap spanning the range selected by the user (see the map in Figure 1);
  • Statistics of the selected time period or fire event are shown with dynamical plots made with Plotly.js (see the bar plots in both Figures 1 and 2).

Being able to aggregate all this information in a visual and dynamical form is quite useful for monitoring and studying the fires.

There are webpages showing a similar type of information, however, the burned areas produced by this Deep Learning model are state-of-the-art for this type of product. By analysing the spatio-temporal correlations in sequences of input images with 3D convolutions and an LSTM layer, the trained model is very good at identifying burned regions and determining at which day the pixel burned — with particular emphasis for the latter.

Post navigation

← Synopsis of MGAN: Markovian Generative Adversarial Networks

Practical Projects & AI →

Request for deletion

About

MC.AI – Aggregated news about artificial intelligence

MC.AI collects interesting articles and news about artificial intelligence and related areas. The contributions come from various open sources and are presented here in a collected form.

The copyrights are held by the original authors, the source is indicated with each contribution.

Contributions which should be deleted from this platform can be reported using the appropriate form (within the contribution).

MC.AI is open for direct submissions, we look forward to your contribution!

Search on MC.AI

mc.ai aggregates articles from different sources - copyright remains at original authors


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK