Library for AI-Assisted Mapping Tool developed for Humanitarian OpenStreetMap Team
A small team from Omdena worked on a disaster management project. This package was created in order to simplify the integration of the data processing steps with the model training one.
data Directory Structure
.
├───images
│ ├───1
│ ├───2
│ ├───3
│ ├───4
│ └───5
├───inputs
│ ├───1
│ ├───2
│ ├───3
│ ├───4
│ └───5
├───masks
│ ├───1
│ ├───2
│ ├───3
│ ├───4
│ └───5
└───predictions
├───1
├───2
├───3
├───4
└───5
inputs: GeoJSON labels and image files given to us.images: Georeferenced images with the fourth band removed (if any).masks: Rasterized labels.predictions: Masks predicted by some ML model.
API Reference
-
preprocess(data_path, input_dir, image_dir, mask_dir)Function for fully preprocessing the input data.
data_path: Path of the directory where all the data are stored.input_dir: Name of the directory where the input data are stored.image_dir: Name of the directory where the images are stored.mask_dir: Name of the directory where the masks are stored.
-
predict(checkpoint_path, data_path, image_dir, pred_dir)Function for predicting masks for all the input images.
checkpoint_path: Path where the architecture and weights of the model can be found.data_path: Path of the directory where all the data are stored.image_dir: Name of the directory where the images are stored.pred_dir: Name of the directory where the predicted images will go.
Example Usages
Preprocessing:
from hotlib import preprocess
preprocess("/content/gdrive/MyDrive/Omdena/data", "inputs", "images", "masks")
Prediction:
from hotlib import predict
predict(
"/content/gdrive/MyDrive/Omdena/checkpoints",
"/content/gdrive/MyDrive/Omdena/data",
"images",
"predictions",
)
Metadata
Release files for hotlib 1.0.33
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hotlib-1.0.33.tar.gz | 15.7 kB | Without provenance | Details for hotlib-1.0.33.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hotlib-1.0.33-py3-none-any.whl | Python 3 | none | any | Details for hotlib-1.0.33-py3-none-any.whl |
Total release size: 35.8 kB
Release files / hotlib-1.0.33.tar.gz
| Download URL | hotlib-1.0.33.tar.gz |
|---|---|
| Size | 15.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
176c4388ffb06cacd98c50ca2e3d2135f1ff4a63254a27312a61cd8fd3a56247
|
|
BLAKE2b-256 checksum How to use checksums |
aebb256b08943ad7dc3f0d332e6200e775d9fdeb91bb2e093a47ac0728e9109a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / hotlib-1.0.33-py3-none-any.whl
| Download URL | hotlib-1.0.33-py3-none-any.whl |
|---|---|
| Size | 20.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73312fe5c1e6561e409227f029d1fddf9254778b33e08e53dba3341455d3960e
|
|
BLAKE2b-256 checksum How to use checksums |
621de81036f9fae622bf22798f71737740e607d718db245f9accd547346fbba5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for hotlib 1.0.33
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.