All Projects → qubvel → Tta_wrapper

qubvel / Tta_wrapper

Test Time image Augmentation (TTA) wrapper for Keras model.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Tta wrapper

Pytorch Toolbelt
PyTorch extensions for fast R&D prototyping and Kaggle farming
Stars: ✭ 942 (+861.22%)
Mutual labels:  image-classification, image-segmentation, augmentation
Albumentations
Fast image augmentation library and an easy-to-use wrapper around other libraries. Documentation: https://albumentations.ai/docs/ Paper about the library: https://www.mdpi.com/2078-2489/11/2/125
Stars: ✭ 9,353 (+9443.88%)
Mutual labels:  image-classification, image-segmentation, augmentation
Caer
High-performance Vision library in Python. Scale your research, not boilerplate.
Stars: ✭ 452 (+361.22%)
Mutual labels:  image-classification, image-segmentation, augmentation
Neural Pipeline
Neural networks training pipeline based on PyTorch
Stars: ✭ 315 (+221.43%)
Mutual labels:  image-classification, image-segmentation
basic-image-eda
A simple image dataset EDA tool (CLI / Code)
Stars: ✭ 51 (-47.96%)
Mutual labels:  image-classification, image-segmentation
coursera-ai-for-medicine-specialization
Programming assignments, labs and quizzes from all courses in the Coursera AI for Medicine Specialization offered by deeplearning.ai
Stars: ✭ 80 (-18.37%)
Mutual labels:  image-classification, image-segmentation
Catalyst
Accelerated deep learning R&D
Stars: ✭ 2,804 (+2761.22%)
Mutual labels:  image-classification, image-segmentation
Pba
Efficient Learning of Augmentation Policy Schedules
Stars: ✭ 461 (+370.41%)
Mutual labels:  image-classification, augmentation
Medpy
Medical image processing in Python
Stars: ✭ 321 (+227.55%)
Mutual labels:  image-classification, image-segmentation
Cvpr2021 Paper Code Interpretation
cvpr2021/cvpr2020/cvpr2019/cvpr2018/cvpr2017 论文/代码/解读/直播合集,极市团队整理
Stars: ✭ 8,075 (+8139.8%)
Mutual labels:  image-classification, image-segmentation
Concise Ipython Notebooks For Deep Learning
Ipython Notebooks for solving problems like classification, segmentation, generation using latest Deep learning algorithms on different publicly available text and image data-sets.
Stars: ✭ 23 (-76.53%)
Mutual labels:  image-classification, image-segmentation
Segmentation
Catalyst.Segmentation
Stars: ✭ 27 (-72.45%)
Mutual labels:  image-segmentation, augmentation
classification
Catalyst.Classification
Stars: ✭ 35 (-64.29%)
Mutual labels:  image-classification, augmentation
ICCV2021-Paper-Code-Interpretation
ICCV2021/2019/2017 论文/代码/解读/直播合集,极市团队整理
Stars: ✭ 2,022 (+1963.27%)
Mutual labels:  image-classification, image-segmentation
Reproducibilty-Challenge-ECANET
Unofficial Implementation of ECANets (CVPR 2020) for the Reproducibility Challenge 2020.
Stars: ✭ 27 (-72.45%)
Mutual labels:  image-classification, image-segmentation
ailia-models
The collection of pre-trained, state-of-the-art AI models for ailia SDK
Stars: ✭ 1,102 (+1024.49%)
Mutual labels:  image-classification, image-segmentation
Dataturks
ML data annotations made super easy for teams. Just upload data, add your team and build training/evaluation dataset in hours.
Stars: ✭ 200 (+104.08%)
Mutual labels:  image-classification, image-segmentation
Pixel level land classification
Tutorial demonstrating how to create a semantic segmentation (pixel-level classification) model to predict land cover from aerial imagery. This model can be used to identify newly developed or flooded land. Uses ground-truth labels and processed NAIP imagery provided by the Chesapeake Conservancy.
Stars: ✭ 217 (+121.43%)
Mutual labels:  image-classification, image-segmentation
Eccv2020 Code
ECCV 2020 论文开源项目合集,同时欢迎各位大佬提交issue,分享ECCV 2020开源项目
Stars: ✭ 827 (+743.88%)
Mutual labels:  image-classification, image-segmentation
Attention Gated Networks
Use of Attention Gates in a Convolutional Neural Network / Medical Image Classification and Segmentation
Stars: ✭ 1,237 (+1162.24%)
Mutual labels:  image-classification, image-segmentation

PyPI version

TTA wrapper

Test time augmnentation wrapper for keras image segmentation and classification models.

Description

How it works?

Wrapper add augmentation layers to your Keras model like this:

          Input
            |           # input image; shape 1, H, W, C
       / / / \ \ \      # duplicate image for augmentation; shape N, H, W, C
      | | |   | | |     # apply augmentations (flips, rotation, shifts)
     your Keras model
      | | |   | | |     # reverse transformations
       \ \ \ / / /      # merge predictions (mean, max, gmean)
            |           # output mask; shape 1, H, W, C
          Output

Arguments

  • h_flip - bool, horizontal flip augmentation
  • v_flip - bool, vertical flip augmentation
  • rotataion - list, allowable angles - 90, 180, 270
  • h_shift - list of int, horizontal shift augmentation in pixels
  • v_shift - list of int, vertical shift augmentation in pixels
  • add - list of int/float, additive factor (aug_image = image + factor)
  • mul - list of int/float, additive factor (aug_image = image * factor)
  • contrast - list of int/float, contrast adjustment factor (aug_image = (image - mean) * factor + mean)
  • merge - one of 'mean', 'gmean' and 'max' - mode of merging augmented predictions together

Constraints

  1. model has to have 1 input and 1 output
  2. inference batch_size == 1
  3. image height == width if rotation augmentation is used

Installation

  1. PyPI package:
$ pip install tta-wrapper
  1. Latest version:
$ pip install git+https://github.com/qubvel/tta_wrapper/

Example

from keras.models import load_model
from tta_wrapper import tta_segmentation

model = load_model('path/to/model.h5')
tta_model = tta_segmentation(model, h_flip=True, rotation=(90, 270), 
                             h_shift=(-5, 5), merge='mean')
y = tta_model.predict(x)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].