- Clone the repo.
git clone https://github.com/FoundingTitan/Fire_Mapping_Project.git
- Copy the contents and paste it into the root of Google Drive.
/content/drive/MyDrive/Fire_Mapping_Project
- 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)
- Mount your google drive
from google.colab import drive
drive.mount('/content/drive')
- In the first cell run
%cd /content/drive/MyDrive/Fire_Mapping_Project
!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
- Default
-
Batch-size
--batch_size
- Default
8
- Any
int
value
- Default
-
cutoff
--cutoff
- Default
0.3
- Any
float
value
- Default
-
learning rate
--lr
- Default
0.001
- Any
float
value
- Default
-
Print loss values every log_interval epochs
--log_interval
- Default
1
- Any
int
value
- Default
-
Transform data during training mode
--transform_mode
- Default Basic
basic
- Transform
transform
- Default Basic
-
Transform type
--transform_types
- Default Crop
crop
- Horizontal Flip
hflip
- Vertical Flip
vflip
- Default Crop
-
Set training seed
--seed
- Default
10
- Any
int
value.
- Default
- 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
orMain_Train_AUC.ipynb
. - Make sure the Session runtime is set to GPU (see above).
- Run all cells.
- 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
- Open Wild_Fire.py with text editor to select image, image path and initial conditions
- Run Wild_Fire.py when satified.