An udpated verson of the Adaptive-TTA algorithm [1] can be found at https://github.com/pedrormconde/MV-ATTA.
[1] Conde, P., & Premebida, C. (2022, November). Adaptive-tta: accuracy-consistent weighted test time augmentation method for the uncertainty calibration of deep learning classifiers. In 33rd British Machine Vision Conference 2022, BMVC 2022. BMVA Press.