#322 · Primary category: Computer Vision

ttach

augmentation classification computer-vision deep-learning keypoint-detection pytorch segmentation test-time-augmentation tta tta-wrapper

Image Test Time Augmentation with PyTorch!

Project last updated:07/28/23

GitHub Stars

1.0K

Forks

69

Contributors

3

License

MIT

Why we included this project

Test-time augmentation is a cheap way to make a trained PyTorch model steadier at inference: instead of running each image through once, you pass several augmented versions and merge the predictions. This small wrapper does the plumbing, with ready-made transform sets like the d4 transform (flips plus 90-degree rotations) and merge modes such as mean, geometric mean, and max. It also reverses the transforms on masks and labels before aggregation, which is the bookkeeping you would otherwise write yourself, and it covers keypoint models as well as multi-input, multi-output ones. If you want a slightly cleaner metric and have spare compute, wrapping your model takes minutes and needs no retraining.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category