Coder Social home page Coder Social logo

unet---segmentation-model-for-hotspot-detection's Introduction

UNET Segmentation-model-for-hotspot-detection

Description

Real time hot spot/fire detection from aerial images. The approach consist of using segementation models to hotspots in images

Installation

Dependencies can be installed using a conda enviroment with the enviroment.yml as follows

conda env create -n hotspot -f environment.yml
conda activate hotspot

Mask Creation

Semantic Segmentation techniques require pixel wise annotations/masks. Labelling is often very tedious in order to help with this Otsu's Adaptive threshold technique is used to provide the the image mask for training. This can be used as follows:

cd auto_annotations/
python save_masks.py -h

positional arguments:
  input_dir   directory to input images
  output_dir  created masks

optional arguments:
  -h, --help  show this help message and exit

After running this script you should have your generate image masks.

Training

To train a model for hot spot detection run the following:

python train.py [-h] -d DATASET -o OUTPUT [-e EPOCHS] [-lr LEARNING_RATE]
                [-resume RESUME] [--batch_size BATCH_SIZE]
                            
 -d DATASET, --dataset DATASET
                        folder containing images and masks
  -o OUTPUT, --output OUTPUT
                        folder where weights would be stored
  -e EPOCHS, --epochs EPOCHS
                        number of epochs for training
  -lr LEARNING_RATE, --learning_rate LEARNING_RATE
                        number of epochs for training
  -resume RESUME        path to latest checkpoint (default: none)
  --batch_size BATCH_SIZE
                        batch size

Evaluation

To run inference on the trained model run the command as follows:

python evaluation.py [-h] -d DATASET -w WEIGHTS [-b BATCH_SIZE]

optional arguments:
  -h, --help            show this help message and exit
  -d DATASET, --dataset DATASET
                        folder containing images
  -w WEIGHTS, --weights WEIGHTS
                        paths to weights file
  -b BATCH_SIZE, --batch_size BATCH_SIZE
                        batch size

Example of the results are shown below: display

TO DO LIST

  • dockerise application
  • Investigate other CNN backbones for segmentation
  • Fusion between rgb and thermal imagery for segmentation
  • Implement user interface
  • Bootstrapping/Bagging techniques to futher improve model acuracy

unet---segmentation-model-for-hotspot-detection's People

Contributors

temi92 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.