Closed ebgoldstein closed 2 years ago
here is a simple transfer learning template: https://github.com/ebgoldstein/Coastal_TF_templates/blob/main/src/Classification.ipynb
to do:
Committed jupyter notebook, 9b973aa. Curves seem to look okay, but predictions using this model appear to be very wrong. Using gradcam it looks like the features it is picking out are wrong. Sometimes picking out cars or light hitting the lens in flooded images.
Committed new training and testing notebooks 6d10270, 3306b8f.
This model was trained using images from BF_01, CB_01, and CB_03. Models and this dataset can be found on the Google Drive. Some stats for other models I trained can also be found there.
Some notes and problems:
Loss and accuracy curves are worse than when I was training with just BF_01 images.
I suggest that after you 'fine tune' the model, you recommit the notebook, close this issue, and we walk through the quantization steps.. (i.e., don;t worry about W&B for now)..
Recommitted the notebook. a477ede Loaded up the same model, set the layers to trainable, and retrained for 30 epochs with a very low learning rate. The training curves made it seem like the model was not improved after fine tuning. However, the f1 score for both flooded and not flooded improved from the fine tuning. Model testing results after fine tuning:
precision recall f1-score support
False 0.87 0.88 0.88 2365
True 0.79 0.77 0.78 1356
accuracy 0.84 3721
macro avg 0.83 0.83 0.83 3721
weighted avg 0.84 0.84 0.84 3721
This model has been uploaded to google drive as "mobilenetv2_water_18finetune".
use TF to make classification model ( i.e., a notebook).