{"id":22482,"library":"ttach","title":"ttach","description":"Image test time augmentation for PyTorch. Wraps models to apply TTA transforms (flips, rotations, scaling) and aggregate predictions. Current version 0.0.3, last release April 2021. No recent updates; library is in maintenance mode.","status":"maintenance","version":"0.0.3","language":"python","source_language":"en","source_url":"https://github.com/qubvel/ttach","tags":["test-time augmentation","TTA","PyTorch","image segmentation","classification"],"install":[{"cmd":"pip install ttach","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core dependency for PyTorch tensors and models.","package":"torch","optional":false}],"imports":[{"wrong":"from ttach import Compose","symbol":"Compose","correct":"from ttach import Compose"}],"quickstart":{"code":"import torch\nimport ttach as tta\n\nmodel = torch.nn.Linear(10, 2)  # dummy model\nmodel.eval()\n\ntransforms = tta.Compose([\n    tta.HorizontalFlip(),\n    tta.Rotate90(angles=[0, 90]),\n    tta.Scale(scales=[1.0, 1.5]),\n])\n\ntta_model = tta.SegmentationTTAWrapper(model, transforms, merge_mode='mean')\n\ninput_tensor = torch.randn(1, 10)\noutput = tta_model(input_tensor)\nprint(output.shape)","lang":"python","description":"Basic TTA example: wrap a model with horizontal flip, 90° rotation, and scaling. Merge predictions by mean."},"warnings":[{"fix":"Consider alternatives like kornia's kornia.augmentation.TTA or torchvision's test-time augmentation utilities.","message":"The library has not been updated since April 2021. It may not work with newer PyTorch versions without issues.","severity":"deprecated","affected_versions":">=0.0.3"},{"fix":"Upgrade to >=0.0.2 or manually define the D4 transform using Compose.","message":"The 'd4' transform alias was fixed in v0.0.2 to remove duplicated augmentations. If using older version, you might get unintended duplicates.","severity":"gotcha","affected_versions":"<0.0.2"},{"fix":"Upgrade to 0.0.3 or handle keypoints manually.","message":"Keypoints support was added in v0.0.3. If you rely on keypoints, ensure version >=0.0.3 or use a workaround.","severity":"breaking","affected_versions":"<0.0.3"}],"env_vars":null,"search_vec":"'0.0.3':22 '2021':26 'aggreg':18 'appli':11 'april':25 'augment':5,38 'classif':43 'current':20 'flip':14 'imag':2,41 'last':23 'librari':30 'mainten':33 'mode':34 'model':9 'predict':19 'pytorch':7,40 'recent':28 'releas':24 'rotat':15 'scale':16 'segment':42 'test':3,36 'test-tim':35 'time':4,37 'transform':13 'tta':12,39 'ttach':1 'updat':29 'version':21 'wrap':8","created_at":"2026-04-27T17:05:24.127057+00:00","updated_at":"2026-04-27T17:05:24.127057+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"/tmp/tmpc0k_8a85/venv/lib/python3.12/site-packages/ttach/__init__.py\", line 1, in <module>\n    from .wrappers import (\n  File \"/tmp/tmpc0k_8a85/venv/lib/python3.12/site-packages/ttach/wrappers.py\", line 1, in <module>\n"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.0.3","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/qubvel/ttach","docs":null,"changelog":null,"pypi":"https://pypi.org/project/ttach/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}