Giter Site home page Giter Site logo

jaina1008 / firemapping-model Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 18.89 MB

Trained ResNet on Australian Bushfire linescan images to predict fire as a 0:1 and then predict the path of fire. This assists the firefighter department in allocating their limited manpower in areas where the fire will likely traverse.

Python 42.13% Jupyter Notebook 57.87%

firemapping-model's Introduction

Fire_Mapping_Project

Setting up the environment

  1. Clone the repo.
git clone https://github.com/FoundingTitan/Fire_Mapping_Project.git
  1. Copy the contents and paste it into the root of Google Drive.
/content/drive/MyDrive/Fire_Mapping_Project
  1. Open a colab session at https://colab.research.google.com/

Make sure the session is set to GPU

Runtime > Change runtime Type > Hardware accelerator (from None to GPU)

  1. Mount your google drive
from google.colab import drive
drive.mount('/content/drive')
  1. In the first cell run
%cd /content/drive/MyDrive/Fire_Mapping_Project

Training

!python train.py
  • Additional arguments can be supplied

Use of additional arguments

Example form of --arg option

!python -W ignore train.py --net attn_unet --epochs 200 > output_attn_unet.txt
  • Specify model type --net

    • unet
    • attn_unet
  • Specify number of epochs --epochs

    • Default 100
    • Any int value
  • Batch-size --batch_size

    • Default 8
    • Any int value
  • cutoff --cutoff

    • Default 0.3
    • Any float value
  • learning rate --lr

    • Default 0.001
    • Any float value
  • Print loss values every log_interval epochs --log_interval

    • Default 1
    • Any int value
  • Transform data during training mode --transform_mode

    • Default Basic basic
    • Transform transform
  • Transform type --transform_types

    • Default Crop crop
    • Horizontal Flip hflip
    • Vertical Flip vflip
  • Set training seed --seed

    • Default 10
    • Any int value.

Alternative fast setup

  • After putting the project in the root directory in the google drive + mounting.
  • Go to Google colab and go File > Upload notebook > (change to the Upload tab) > Choose File.
  • Choose the Main_train.ipynb or Main_Train_AUC.ipynb.
  • Make sure the Session runtime is set to GPU (see above).
  • Run all cells.

Adding augmented images

  • Edit aug.py and add desired transforms at the top of the code. This utilizes the Albumentations package
  • Determine file names during the saving stage located at the bottom of the code
  • Run aug.py
  • Copy and paste generated images located at augmented_images onto train_images
  • Do the same for generated masks, from augmented_masks onto train_masks

Fire Prediction

  • Open Wild_Fire.py with text editor to select image, image path and initial conditions
  • Run Wild_Fire.py when satified.

firemapping-model's People

Contributors

jaina1008 avatar the-arcturus-stream avatar

Watchers

 avatar

Forkers

cjc-uni

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.