All Projects → andrewekhalel → Edafa

andrewekhalel / Edafa

Licence: mit
Test Time Augmentation (TTA) wrapper for computer vision tasks: segmentation, classification, super-resolution, ... etc.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Edafa

Ttach
Image Test Time Augmentation with PyTorch!
Stars: ✭ 455 (+325.23%)
Mutual labels:  classification, segmentation, augmentation
Segmentation
Catalyst.Segmentation
Stars: ✭ 27 (-74.77%)
Mutual labels:  segmentation, augmentation
Torchio
Medical image preprocessing and augmentation toolkit for deep learning
Stars: ✭ 708 (+561.68%)
Mutual labels:  segmentation, augmentation
Pytorch Toolbelt
PyTorch extensions for fast R&D prototyping and Kaggle farming
Stars: ✭ 942 (+780.37%)
Mutual labels:  segmentation, augmentation
Caer
High-performance Vision library in Python. Scale your research, not boilerplate.
Stars: ✭ 452 (+322.43%)
Mutual labels:  segmentation, augmentation
All About The Gan
All About the GANs(Generative Adversarial Networks) - Summarized lists for GAN
Stars: ✭ 630 (+488.79%)
Mutual labels:  classification, segmentation
Segmentation
Tensorflow implementation : U-net and FCN with global convolution
Stars: ✭ 101 (-5.61%)
Mutual labels:  classification, segmentation
Pointnet
PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation
Stars: ✭ 3,517 (+3186.92%)
Mutual labels:  classification, segmentation
Gd Uap
Generalized Data-free Universal Adversarial Perturbations
Stars: ✭ 50 (-53.27%)
Mutual labels:  classification, segmentation
Pointcnn
PointCNN: Convolution On X-Transformed Points (NeurIPS 2018)
Stars: ✭ 1,120 (+946.73%)
Mutual labels:  classification, segmentation
Pointclouddatasets
3D point cloud datasets in HDF5 format, containing uniformly sampled 2048 points per shape.
Stars: ✭ 80 (-25.23%)
Mutual labels:  classification, segmentation
Instaboost
Code for ICCV2019 paper "InstaBoost: Boosting Instance Segmentation Via Probability Map Guided Copy-Pasting"
Stars: ✭ 368 (+243.93%)
Mutual labels:  segmentation, augmentation
Pytorch Randaugment
Unofficial PyTorch Reimplementation of RandAugment.
Stars: ✭ 323 (+201.87%)
Mutual labels:  classification, augmentation
Tianchi Medical Lungtumordetect
天池医疗AI大赛[第一季]:肺部结节智能诊断 UNet/VGG/Inception/ResNet/DenseNet
Stars: ✭ 314 (+193.46%)
Mutual labels:  classification, segmentation
Caffe Model
Caffe models (including classification, detection and segmentation) and deploy files for famouse networks
Stars: ✭ 1,258 (+1075.7%)
Mutual labels:  classification, segmentation
Training extensions
Trainable models and NN optimization tools
Stars: ✭ 857 (+700.93%)
Mutual labels:  segmentation, super-resolution
PAPC
PAPC is a deep learning for point clouds platform based on pure PaddlePaddle
Stars: ✭ 55 (-48.6%)
Mutual labels:  classification, segmentation
Cvpods
All-in-one Toolbox for Computer Vision Research.
Stars: ✭ 277 (+158.88%)
Mutual labels:  classification, segmentation
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 (+8641.12%)
Mutual labels:  segmentation, augmentation
Dlcv for beginners
《深度学习与计算机视觉》配套代码
Stars: ✭ 1,244 (+1062.62%)
Mutual labels:  classification, segmentation

Edafa

GitHub contributions welcome HitCount
Edafa is a simple wrapper that implements Test Time Augmentations (TTA) on images for computer vision problems like: segmentation, classification, super-resolution, Pansharpening, etc. TTAs guarantees better results in most of the tasks.

Test Time Augmentation (TTA)

Applying different transformations to test images and then average for more robust results.

pipeline

Installation

pip install edafa

Getting started

The easiest way to get up and running is to follow example notebooks for segmentation and classification showing TTA effect on performance.

How to use Edafa

The whole process can be done in 4 steps:

  1. Import Predictor class based on your task category: Segmentation (SegPredictor) or Classification (ClassPredictor)
from edafa import SegPredictor
  1. Inherit Predictor class and implement the main function
    • predict_patches(self,patches) : where your model takes image patches (numpy.ndarray) and return prediction (numpy.ndarray)
class myPredictor(SegPredictor):
    def __init__(self,model,*args,**kwargs):
        super().__init__(*args,**kwargs)
        self.model = model

    def predict_patches(self,patches):
        return self.model.predict(patches)
  1. Create an instance of you class
p = myPredictor(model,patch_size,model_output_channels,conf_file_path)
  1. Call predict_images() to run the prediction process
p.predict_images(images,overlap=0)

Configuration file

Configuration file is a json file containing two pieces of information

  1. Augmentations to apply (augs). Supported augmentations:
    • NO : No augmentation
    • ROT90 : Rotate 90 degrees
    • ROT180 : Rotate 180 degrees
    • ROT270 : Rotate 270 degrees
    • FLIP_UD : Flip upside-down
    • FLIP_LR : Flip left-right
    • BRIGHT : Change image brightness randomly
    • CONTRAST : Change image contrast randomly
    • GAUSSIAN : Add random gaussian noise
    • GAMMA : Perform gamma correction with random gamma
  2. Combination of the results (mean). Supported mean types:
    • ARITH : Arithmetic mean
    • GEO : Geometric mean
  3. Number of bits image (default is 8-bits) (bits).

Example of a conf file in json format

{
"augs":["NO",
"FLIP_UD",
"FLIP_LR"],
"mean":"ARITH",
"bits":8
}

Example of a conf file in yaml format

augs: [NO,FLIP_UD,FLIP_LR]
mean: ARITH
bits: 8

You can either pass file path (json or yaml) or the actual json text to conf parameter.

Contribution

All contributions are welcomed. Please make sure that all tests passed before pull request. To run tests

nosetests
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].