roofAI — 14: train on AIRS — 1

Arash Kamangir
4 min readOct 22, 2023

--

Next, in roofAI,

same colormap in ingest and review,

roofAI dataset ingest open,source=AIRS

SemSegModelTrainer.train() to run SemSegModel.predict().

read self.CLASSES from the dataset.

train on AIRS: adjust classes.

train to stop if none of the classes are found.

roofAI semseg train \
profile=VALIDATION \
$(@cache read roofAI_ingest_AIRS_v1) \
roofAI-AIRS-semseg-model-$(@timestamp)

better error handling.

roofAI semseg train \
profile=VALIDATION \
$(@cache read roofAI_ingest_AIRS_v1) \
roofAI-AIRS-semseg-model-$(@timestamp)
roofAI semseg train \
profile=VALIDATION \
$(@cache read roofAI_ingest_AIRS_v1) \
roofAI-AIRS-semseg-model-$(@timestamp) \
--classes roof

pytest += train on AIRS.

roof pytest - roofAI/tests/test_semseg_train.py
roof pytest list

test += train on AIRS,

roof test help
roof test dryrun
roof test

roof predict|train ▶️ roof semseg $task, modernize roof dataset $task.

rm "car" default from code.

train QUICK AIRS,

iou doesn’t make sense.

reingest roofAI_ingest_AIRS_v1,

roofAI dataset ingest \
source=AIRS,register \
- \
--test_count 250 \
--train_count 350 \
--val_count 100

aha!

require min variety in chips,

roofAI dataset ingest source=AIRS,open
roofAI dataset ingest \
open,source=AIRS,register \
- \
--test_count 250 \
--train_count 350 \
--val_count 100
roof train \
profile=QUICK,register,suffix=v1 \
$(@cache read roofAI_ingest_AIRS_v1) \
roofAI-AIRS-semseg-model-$(@timestamp) \
--classes roof

train: save metadata, save elapsed time, store, and graph, iou, and dice,

roof train \
profile=VALIDATION \
$(@cache read roofAI_ingest_AIRS_v1) \
roofAI-AIRS-semseg-model-$(@timestamp) \
--classes roof
{'dice_loss': 0.9998494386672974, 'iou_score': 9.310987397759263e-11}
{
"activation": "sigmoid",
"classes": [
"roof"
],
"elapsed_time": 1.6647040843963623,
"encoder_name": "se_resnext50_32x4d",
"encoder_weights": "imagenet",
"epics": {
"0": {
"train": {
"dice_loss": 0.9999873638153076,
"iou_score": 1.0796687979416908e-12
},
"valid": {
"dice_loss": 0.976375162601471,
"iou_score": 0.01083315722644329
}
}
}
}

A DECENT AIRS train,

roof train \
profile=DECENT,register,suffix=v1 \
$(@cache read roofAI_ingest_AIRS_v1) \
roofAI-AIRS-semseg-model-$(@timestamp) \
--classes roof

fix iou xticks,

Next: train on GPU.

--

--

No responses yet