Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

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.

Files for ttabooster, version 0.14
Filename, size File type Python version Upload date Hashes
Filename, size ttabooster-0.14.tar.gz (7.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page