Skip to main content

Boost pretrained models with test time augmentation selection

Project description

TTABoost - Boost Your pre-trained Model With Test Time Augmentation Selection

Test time augmentation selection for image detection and classification.

Install

pip install ttabooster

Usage example

from ttabooster.TTABoost import TTABooster

model = load_model('pretrained-model.h5')  # Load any keras model
x_test, y_test = ...  # Load your validation set

AUGMENTATIONS_TEST = Compose([
    RandomSizedCrop((28, 28), 32, 32, w2h_ratio=1.0, interpolation=1, always_apply=False, p=1.0), 
    # Add your augmentations...
])

booster = TTABooster(model, batch_size=100, augmentations=AUGMENTATIONS_TEST)
booster.benchmark_results(x_test, y_test)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ttabooster-0.13.tar.gz (7.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page