Skip to main content

A package for running predictions using fAIr

Project description

fAIr Predictor

Run your fAIr Model Predictions anywhere !

Prerequisites

  • Install tensorflow-cpu

Example on Collab

# Install 
!pip install fairpredictor

# Import 
from predictor import predict

# Parameters for your predictions 
bbox=[100.56228021333352,13.685230854641182,100.56383321235313,13.685961853747969]
model_path='checkpoint.h5'
zoom_level=20
tms_url='https://tiles.openaerialmap.org/6501a65c0906de000167e64d/0/6501a65c0906de000167e64e/{z}/{x}/{y}'

# Run your prediction 
my_predictions=predict(bbox,model_path,zoom_level,tms_url)
print(my_predictions)

## Visualize your predictions 

import geopandas as gpd
import matplotlib.pyplot as plt
gdf = gpd.GeoDataFrame.from_features(my_predictions)
gdf.plot()
plt.show()

Works on CPU ! Can work on serverless functions, No other dependencies to run predictions

Use raster2polygon

There is another postprocessing option that supports distance threshold between polygon for merging them , If it is useful for you install raster2polygon by :

pip install raster2polygon

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

fairpredictor-0.0.19.tar.gz (9.4 kB view details)

Uploaded Source

File details

Details for the file fairpredictor-0.0.19.tar.gz.

File metadata

  • Download URL: fairpredictor-0.0.19.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for fairpredictor-0.0.19.tar.gz
Algorithm Hash digest
SHA256 e4fb4b45bec9d0d2ba53c58c4873bbfdca552d6907a9d9df4aac7de361ee1b7e
MD5 74867620357ef83fc43748983125ec9f
BLAKE2b-256 1b7df415065c338446729524ee7b83f49313ccf744efcaf0b1a4b5a3a9346f86

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