Models Package
A comprehensive Python package for water and river segmentation using deep learning models with satellite imagery data.
🌊 Features
- Abstract Base Model: Extensible architecture for different segmentation models
- Water Segmentation: Advanced model using Sentinel-1, Sentinel-2, and terrain data
- River Segmentation: Specialized model for river detection and analysis
- Data Integration: Built-in support for MinIO, TimescaleDB, and Kafka streaming
- Data Validation: Pydantic schemas for robust data handling
- Production Ready: Optimized for real-world deployment scenarios
📦 Installation
pip install models-package
Development Installation
pip install models-package[dev]
🚀 Quick Start
Water Segmentation
from models_package import WaterSegmentationModel
# Initialize the water segmentation model
model = WaterSegmentationModel(
model_path="path/to/model.pth",
model_name="WaterSegmentation",
model_indx=0 # 0 for 7-band model, 1 for 9-band model
)
# Load the model weights
model.load_model()
# Setup connections (optional)
model.minIOConnection(
address="localhost",
port=9000,
target="bucket-name",
access_key="access_key",
secret_key="secret_key"
)
# Make predictions
result = model.predict({
"folder_link": "path/to/satellite/data",
"location": "area_name"
})
print(f"Water coverage: {result['water_coverage_stats']['water_percentage']:.2f}%")
River Segmentation
from models_package import RiverSegmentationModel
# Initialize the river segmentation model
model = RiverSegmentationModel(
model_path="path/to/river_model.pth",
model_name="RiverSegmentation",
input_size=(512, 512),
model_architecture="unetplusplus",
encoder_name="efficientnet-b3"
)
# Load model and make predictions
model.load_model()
result = model.predict({
"image_link": "path/to/image",
"filename": "river_image.jpg"
})
📋 Requirements
- Python >= 3.8
- PyTorch >= 1.9.0
- CUDA compatible GPU (recommended)
- See
pyproject.tomlfor complete dependency list
🤝 Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-feature) - Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/new-feature) - Create a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
📧 Contact
- Author: Jason
- Email: ikakandris@gmail.com
- Repository: https://github.com/deepblue597/models_package
Requirements
- Python >= 3.8
- PyTorch >= 1.9.0
- See requirements.txt for full dependencies
License
MIT License
Metadata
Release files for models-package 1.0.0
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 |
|---|---|---|---|---|
| models_package-1.0.0.tar.gz | 141.2 kB | Without provenance | Details for models_package-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| models_package-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for models_package-1.0.0-py3-none-any.whl |
Total release size: 164.8 kB
Release files / models_package-1.0.0.tar.gz
| Download URL | models_package-1.0.0.tar.gz |
|---|---|
| Size | 141.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
10f5b39de40ce5a85b5458aab2acb0ce74e827289c7e82dc7a921ef08e8efe2d
|
|
BLAKE2b-256 checksum How to use checksums |
5d7e73bd864237e54d94f6e4dada79f280fb372dbda7400ab1ffe153373d6e27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.5
|
Release files / models_package-1.0.0-py3-none-any.whl
| Download URL | models_package-1.0.0-py3-none-any.whl |
|---|---|
| Size | 23.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a2b0b7317344f9ce6a5aa210d8a65a56920e68a21e2bf57d942d567d7e9516cb
|
|
BLAKE2b-256 checksum How to use checksums |
79e48b8e5c68b07e82a4ce738439781aea27756f0a067e8038fc1cc495049e05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.5
|
Security for models-package 1.0.0
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.