|
Algorithm 1 Detection and segmentation of invasive grasses using high-resolution RGB images. |
|
|
Required: orthorectified image set I. Representative samples set G. Sample masks set H
|
|
|
Training |
| 1: |
for
do
|
▹ total images in G (labelled data) |
| 2: |
Load and images |
| 3: |
Convert colour space of into HSV |
| 4: |
Insert each colour channel into a feature array D
|
| 5: |
Use 2D filters on and insert their outputs into D
|
| 6: |
From and , filter only the pixels with assigned labelling on D
|
| 7: |
end for |
| 8: |
Split D into training data and testing data
|
| 9: |
Create a XGBoost classifier X and fit it using
|
| 10: |
Use K-fold cross validation with
|
▹ number of folds = 10 |
| 11: |
Perform grid search to tune X parameters |
|
|
Prediction |
| 12: |
for
do
|
▹ total images in I
|
| 13: |
Load image |
| 14: |
Convert colour space of into HSV |
| 15: |
Scan every pixel and predict the object using X
|
| 16: |
Convert the data into a 2D image |
| 17: |
Export into TIF format |
| 18: |
end for |
| 19: |
return
|