Skip to content

Latest commit

 

History

History
44 lines (42 loc) · 1.48 KB

File metadata and controls

44 lines (42 loc) · 1.48 KB

SolarSAM - Deep Learning for PV Systems Detection

drawing

Resolution-Detection Trade-Off

drawing

Prerequisites

Aerial Imagery with .TIF Extension 
Geometry Masks in .geojson Format 
SAM Model Checkpoint downloaded from https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth
Put the downloaded checkpoint into pretrained/ folder

Preprocessing - Creating Train, Validation and Testing Datasets

Go to preproccessing Folder and Create python environment using requirements.txt (Preprocessing uses different set of packages than trainig and must be done only once) 
After Activating the newly created Environment run: 
python run --tif-folder $ABSOLUTE_PATH_TO_WHERE_TIF_IMAGES_RESIDE --geojson-folder $ABSOLUTE_PATH_WHERE_GEOMETRY_MASKS_RESIDE
This will create and put resutls into ./temp folder
copy load folder from ./temp and put it into the root workspace path
load folder contains everython you need for training, validation, and testing 

Training:

Go to workspace Folder and Create python environment using requirements.txt
Activate that workspace and run:
torchrun train.py --config configs/sam-vit-b.yaml

Testing:

python test.py --model $ABSOLUTE_PATH_TO_THE_TRAINED_MODEL ----dataset ('val_dataset'|'test_dataset')