Home

Awesome

BranchLinuxWindows
MasterBuildStatusMasterBuildStatusMasterWin
DevelBuildStatusDevBuildStatusMasterWin

This repository contains the implementation of a feasibility study for automatic detection of defected solar panel modules. The developed framework has been coined Thermography due to the fact that the input data to the system is a sequence of images in the infrared spectrum.

Thermography in action

Structure

The repository is structured as follows:

  1. Documentation of the Thermography repository.
  2. GUI source code associated to the graphical user interface for interacting with the Thermography framework.
  3. Log files generated at runtime.
  4. Resources used by the Thermography framework.
  5. Thermography core source code related to detection and classification of solar panel modules.

The python scripts located in the root directory can be used to launch different executables which exploit the Thermography framework for solar panel module detection and classification.

Installation

Thermography has been tested using the 64-bit version of python 3.5. If you are using an other version of python, consider installing and using Thermography inside a virtual environment.

System-wide installation

Here follow the steps to install Thermography system-wide.

Get the source

Download the git repository:

    $ git clone https://github.com/cdeldon/thermography.git
    $ cd thermography/

Or download the following zip.

Prerequisites

Install the prerequisites:

    $ pip install -r requirements.txt

Anaconda

Here follow the steps to install Thermography in a virtual environment created using Anaconda.

Get the source

Download the git repository:

    $ git clone https://github.com/cdeldon/thermography.git
    $ cd thermography/

Or download the following zip.

Virtual environment

Create a new virtual environment

   $ conda create --name my_env python=3.5
   $ activate my_env
Prerequisites

Install the prerequisites:

    (my_env) $ pip install -r requirements.txt

Example scripts

Here follows a description of the example scripts in the root directory of the Thermography repository.

Application

Running the main_app.py script a default video is loaded and each frame is processed for module extraction. This script's purpose is to show the workflow of the Thermography framework for a simple video.

GUIs

A graphical user interface is provided for interacting with the Thermography framework. In particular the following executables are available:

  1. Dataset creation script used to facilitate the creation of a labeled dataset of images representing solar panel modules.
  2. ThermoGUI graphical interface which allows the used to interact with the Thermography framework and to analyze a new sequence of frames on the fly.

The executables with a graphical interface offer the following tools and visualizations: GUI

The GUI presents different views of the processed input video, in particular the following views are available:

Attention imageEdge image
AtteImageEdgeImage
Segment imageRectangle image
SegmImageRectImage

The lateral toolbar offers runtime parameter tuning with immediate application:

Video tabPrepr. tabSegment tabModules tab
VideoTabPreprTabSegmeTabModulTab
Training and restoring

Executables for training and restoring a learning system are offered with the Thermography framework. These scripts can be used and adapted for training a new classifier which can the be integrated with the GUIs for real time classification of the detected solar panel modules.

  1. Training trains a model to classify input images with the correct label.
  2. Restoring restores a trained model with associated weights and outputs the classification for a set of input images.

Tests

The base functionalities of the Thermography framework are tested using unittests. The tests can be executed as follows:

$ cd thermography/
$ python -m unittest discover thermography/test [-v]

The same tests can be run as a normal python script as follows:

$ cd thermography/
$ python main_test.py

Documentation

The documentation of the code is available here.