PatBall1 / detectree2

Python package for automatic tree crown delineation based on the Detectron2 implementation of Mask R-CNN
https://patball1.github.io/detectree2/
MIT License
158 stars 39 forks source link

The worst model is defined as the best one? #123

Closed yurithefury closed 1 year ago

yurithefury commented 1 year ago

Hi. It looks like the model with the lowest AP50 is being saved and defined as the best one (see P145-149 in train.py). What's the logic behind this or am I misinterpreting something?

if self.max_ap < self.trainer.APs[-1]:
    self.iter = 0
    self.max_ap = self.trainer.APs[-1]
    self.trainer.checkpointer.save("model_" + str(len(self.trainer.APs)))
    self.best_iter = self.trainer.iter

EDIT: All good, that was a misinterpretation on my end.