microsoft / Swin-Transformer

This is an official implementation for "Swin Transformer: Hierarchical Vision Transformer using Shifted Windows".
https://arxiv.org/abs/2103.14030
MIT License
13.98k stars 2.06k forks source link

Accuracy Error Accumulation #368

Open youthong opened 2 months ago

youthong commented 2 months ago

I have noticed that there is an error accumulation in the accuracy calculation method in the source code. For example, I have 1583 images, out of which 1551 can be correctly classified and 32 are incorrect. The accuracy should be 0.9798. When I test the correct and incorrect images separately, the accuracies are 1 and 0, respectively. However, when I combine them and test all the images together, the overall accuracy becomes 0.998. How can I resolve this issue? image image image