Skip to content

Sunspotter-Project/sunspotter-neural-network

Repository files navigation

SunSpotter - Project

😎(:cloud_with_rain: + :sunny:) = :heartpulse:

Contributors of the Project

👫 Martina Buchmeier [email protected]
👫 Matthias Christen [email protected]
👫 Marion Mürner [email protected]
👫 Supervised by Dr. Elena Gavagnin [email protected]

Open SunSpotter application in you web browser 🔗 https://www.sunspotter.ch/

About the Project

This project inlcudes a web application through which sunny places can be found. The sunny and cloudy locations are displayed via an image of a cam. In the background of the application a ML algorithm is used to decide which cameras show a sunny or cloudy picture. The alogrithm is trained with scraped webcam images and is used to check the current webcam images and analyse wheter it is a sunny image or a not sunny image. You can see an example of classified images below.

image

The following picture shows a Mockup of the landing page an its components: image

Here you can get a glimps of the real web interface. Each icon on the map represents a webcam. A sunny icon indicates good weather and a cloudy icon indicates bad weather. image

Repositories & Structure

The repositories are divided into two parts:

Repository Description
sunspotter-neural-network Current and Main Repository, contains the documentation and the python code for the machine learninig algortihm (Jupyter-Notebooks) and the project organization parts like Github-Project and issues.
sunspotter-dev Web-Client Repository, contains the code for the webclient and the sunspotter services.

The most important folders or submodules are:

Folder/Submodule Description Repository
code/jupyterNotebook Contains the jupyternotebooks for the model and exports of trained models. sunspotter-neural-network
db Contains the database and configuration. sunspotter-dev
helios Contains the code for the prediction on the web server. sunspotter-dev
runner Contains the code for the runner which triggers the helios and voyager instances. sunspotter-dev
sunspotter Contains the code for the Sunspotter WebApp. sunspotter-dev
voyager Contains the code for the scraping of the webcam data. sunspotter-dev
shared Contains the code shared between all code projects. sunspotter-dev

Here you can find the whole project with the issues: Sunspotter - Project

System architecture

Client Web Application - Overview

The following graphic shows the parts of SunSpotter application.

image

Client Web Application - Scaling

The Apache server can perform load balancing for several Sunspotter WebApp instances, if there is a lot of load. Even though webcams are currently only scraped and predicted for Switzerland, it is planned that one Helios and one Voyager instance per country will be responsible for scraping and predicting. The following graphic visualizes the scaling.

image

Machine Learning - Jupyter Notebooks

Transfer Learning is used to solve the classification problem of sunny and not sunny webcam images. Particulary Keras and Tensorflow with its pre-trained models from TensorHub were used to develop the image classifier model for SunSpotter.

Model

The latest model can be found here: sunSpotter_keras_transferLearning_model_mobilenet_v3_small_075_224_20220111.h5

Data

Training 3162 images belonging to 2 classes
Validation 790 images belonging to 2 classes
Test 252 images belonging to 2 classes

Summary of the Model

image

Model Performance

The following list shows how the accurracy and the loss function developed over the epochs. image

The view of accurracy and loss visualizes as a graph: image

The performance of the model was measured with a confusion matrix. The prediction was made with the test dataset. Most important metric for SunSpotter is the precision for class sunny!. This is because of we want to show the user, where to go to get some sun.

image

Collaboration and Getting Started

See the README.md in the sunspotter-dev repository or contact one of us ㋡