Skip to main content

A few helper utilities to make it simpler to perform fastai inference/prediction

Project description

fastpredict

Has the following benefits over using fastai directly:

  • cleaner API for batch prediction
  • takes care of using CPU or GPU if you specify in the constructor

How to use:

from fastpredict import FastPredictBool
f = FastPredictBool.from_path('/path/to/learner.pkl')
score = f.predict_path('/path/to/image.jpg')
scores = f.batch_predict_paths(['/path/to/image1.jpg', '/path/to/image2.jpg'])

To prune a model:

from fastpredict import FastPredict
from fastai.vision.all import load_learner
learn = load_learner('/path/to/current/learner.pkl')
new_learn = FastPredict.clean_learner(learn)
new_learn.export('/path/to/new/learner.pkl')

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

fastpredict-0.0.6.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

fastpredict-0.0.6-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file fastpredict-0.0.6.tar.gz.

File metadata

  • Download URL: fastpredict-0.0.6.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.6

File hashes

Hashes for fastpredict-0.0.6.tar.gz
Algorithm Hash digest
SHA256 91a083204579b7134734a8b293fb2a6087df38b940643377cbd4bf1966826f30
MD5 49e577333ed7730b814cd306f580a07b
BLAKE2b-256 69b8857484d4d436b3a4eb06e495367c16753b3fbffda4854cc40e9c959f3714

See more details on using hashes here.

File details

Details for the file fastpredict-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: fastpredict-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.6

File hashes

Hashes for fastpredict-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b23d7fca93f427de3d4f99823371a1aaade1cbbaf171c2a90cf768b5cd1f1a6a
MD5 0c2b3b76875a6246eef7c7d24b3572ae
BLAKE2b-256 f36d5414c0a2a3d67a8f52d3fe60c4e1cc863fa011ae68a703e6106ddbb3bd4d

See more details on using hashes here.

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