# qubvel/ttach

Image Test Time Augmentation with PyTorch!

Repository: https://github.com/qubvel/ttach
Canonical: https://ross.abutalabs.com/products/ttach
Language: Python
License: MIT
License Family: permissive
Topics: augmentation, deep-learning, test-time-augmentation, tta, tta-wrapper, pytorch, computer-vision, classification, segmentation, keypoint-detection
Last push: 2023-07-28T04:17:42+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2528, "days_push": 1132, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1030, forks 69 (observed 2026-08-28T04:03:17.911815+00:00)

## What it is
TTAch is a Python library for image test time augmentation (TTA) with PyTorch. It wraps existing models to apply augmentations like flips, rotations, and scales at inference time, then merges the predictions to improve accuracy.

## Use cases
- improve image classification accuracy with test time augmentation
- apply TTA to a segmentation model in PyTorch
- boost keypoint detection predictions with flips and scales
- average model predictions over augmented versions of test images
- wrap a PyTorch model with test-time augmentation transforms

## When to choose
- you have a trained PyTorch model for classification, segmentation, or keypoint detection and want a quick accuracy boost at inference
- you want configurable TTA transforms and merge modes without writing the augmentation loop yourself

## When to avoid
- you need TTA for frameworks other than PyTorch
- inference latency is critical, since TTA multiplies the number of forward passes
- you need a library under active development with frequent updates

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning, image-processing, computer-vision
- domain: deep-learning, computer-vision, machine-learning, image-processing
- platform: python
- tags: test-time-augmentation, pytorch, tta, segmentation, classification, keypoint-detection, inference

## Member repositories
- qubvel/ttach (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:17.911815+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:07:35.451095+00:00, confidence not recorded.
  - readme: https://github.com/qubvel/ttach (fetched 2026-08-28T04:03:17.911815+00:00, sha 82b3c31af6e3)
  - registry_pypi: https://pypi.org/pypi/ttach/json (fetched 2026-08-29T13:07:27.759281+00:00, sha 4c4c0a28a100)
- Data as of 2026-08-30T08:39:29.467469+00:00.
