This document provides a comprehensive analysis of the licensing terms for all Python dependencies used in the EcoMarineAI (whales-identification) project. Understanding these licenses is essential for legal compliance when distributing or deploying the software.
Analysis Date: January 2025 Python Version: 3.11.x Package Manager: Poetry
| License Type | Count | Percentage | Commercial Use |
|---|---|---|---|
| MIT | 45+ | ~40% | ✅ Permitted |
| Apache 2.0 | 25+ | ~22% | ✅ Permitted |
| BSD-3-Clause | 30+ | ~27% | ✅ Permitted |
| BSD-2-Clause | 5+ | ~4% | ✅ Permitted |
| PSF (Python) | 3+ | ~3% | ✅ Permitted |
| LGPL | 2+ | ~2% | ⚠️ Conditions Apply |
| Other Permissive | 5+ | ~4% | ✅ Generally Permitted |
Overall Assessment: ✅ All dependencies use permissive open-source licenses that are compatible with commercial use of the software itself.
⚠️ Important Note: While the code dependencies permit commercial use, the trained models and training data have non-commercial restrictions (see LICENSE_MODELS.md and LICENSE_DATA.md).
| Package | Version | License | SPDX | Commercial |
|---|---|---|---|---|
| torch | 2.4.1 | BSD-3-Clause | BSD-3-Clause | ✅ Yes |
| torchvision | 0.19.1 | BSD-3-Clause | BSD-3-Clause | ✅ Yes |
| timm | 1.0.9 | Apache 2.0 | Apache-2.0 | ✅ Yes |
PyTorch License Details:
TIMM (PyTorch Image Models) License Details:
| Package | Version | License | SPDX | Commercial |
|---|---|---|---|---|
| keras | 3.6.0 | Apache 2.0 | Apache-2.0 | ✅ Yes |
| tensorflow (transitive) | - | Apache 2.0 | Apache-2.0 | ✅ Yes |
| Package | Version | License | SPDX | Commercial |
|---|---|---|---|---|
| fastapi | ^0.115.12 | MIT | MIT | ✅ Yes |
| uvicorn | ^0.34.3 | BSD-3-Clause | BSD-3-Clause | ✅ Yes |
| pydantic | 2.9.2 | MIT | MIT | ✅ Yes |
| pydantic-core | 2.23.4 | MIT | MIT | ✅ Yes |
| python-multipart | ^0.0.20 | Apache 2.0 | Apache-2.0 | ✅ Yes |
| starlette (transitive) | - | BSD-3-Clause | BSD-3-Clause | ✅ Yes |
FastAPI License Details:
| Package | Version | License | SPDX | Commercial |
|---|---|---|---|---|
| opencv-python | 4.10.0.84 | Apache 2.0 | Apache-2.0 | ✅ Yes |
| opencv-python-headless | 4.10.0.84 | Apache 2.0 | Apache-2.0 | ✅ Yes |
| pillow | 10.4.0 | HPND | HPND | ✅ Yes |
| scikit-image | 0.24.0 | BSD-3-Clause | BSD-3-Clause | ✅ Yes |
| albumentations | 1.4.18 | MIT | MIT | ✅ Yes |
| albucore | 0.0.17 | MIT | MIT | ✅ Yes |
| imageio | 2.35.1 | BSD-2-Clause | BSD-2-Clause | ✅ Yes |
| rembg | ^2.0.61 | MIT | MIT | ✅ Yes |
OpenCV License Details:
Pillow License (HPND):
| Package | Version | License | SPDX | Commercial |
|---|---|---|---|---|
| numpy (transitive) | - | BSD-3-Clause | BSD-3-Clause | ✅ Yes |
| pandas | 2.2.3 | BSD-3-Clause | BSD-3-Clause | ✅ Yes |
| scipy | 1.14.1 | BSD-3-Clause | BSD-3-Clause | ✅ Yes |
| scikit-learn | 1.5.2 | BSD-3-Clause | BSD-3-Clause | ✅ Yes |
| joblib | 1.4.2 | BSD-3-Clause | BSD-3-Clause | ✅ Yes |
| Package | Version | License | SPDX | Commercial |
|---|---|---|---|---|
| onnxruntime | ^1.20.1 | MIT | MIT | ✅ Yes |
| safetensors | 0.4.5 | Apache 2.0 | Apache-2.0 | ✅ Yes |
| huggingface-hub | 0.25.2 | Apache 2.0 | Apache-2.0 | ✅ Yes |
| wandb | 0.18.3 | MIT | MIT | ✅ Yes |
| Package | Version | License | SPDX | Commercial |
|---|---|---|---|---|
| pytest | ^8.3.3 | MIT | MIT | ✅ Yes |
| pytest-cov | ^6.0.0 | MIT | MIT | ✅ Yes |
| httpx | ^0.27.0 | BSD-3-Clause | BSD-3-Clause | ✅ Yes |
| Package | Version | License | SPDX | Commercial |
|---|---|---|---|---|
| black | ^24.0.0 | MIT | MIT | ✅ Yes |
| isort | ^5.13.0 | MIT | MIT | ✅ Yes |
| flake8 | ^7.0.0 | MIT | MIT | ✅ Yes |
| mypy | ^1.8.0 | MIT | MIT | ✅ Yes |
| autopep8 | ^2.3.1 | MIT | MIT | ✅ Yes |
| pylint | ^3.3.1 | GPL-2.0 | GPL-2.0-only | ⚠️ Tool Only |
| bandit | ^1.7.0 | Apache 2.0 | Apache-2.0 | ✅ Yes |
Note on Pylint (GPL-2.0):
| Package | Version | License | SPDX | Commercial |
|---|---|---|---|---|
| streamlit | 1.39.0 | Apache 2.0 | Apache-2.0 | ✅ Yes |
| matplotlib | ^3.10.0 | PSF-based | PSF-2.0 | ✅ Yes |
| altair | 5.4.1 | BSD-3-Clause | BSD-3-Clause | ✅ Yes |
| pydeck | 0.9.1 | Apache 2.0 | Apache-2.0 | ✅ Yes |
| rich | 13.9.2 | MIT | MIT | ✅ Yes |
| Package | Version | License | SPDX | Commercial |
|---|---|---|---|---|
| requests | 2.32.3 | Apache 2.0 | Apache-2.0 | ✅ Yes |
| urllib3 | 2.2.3 | MIT | MIT | ✅ Yes |
| pyyaml | 6.0.2 | MIT | MIT | ✅ Yes |
| toml | 0.10.2 | MIT | MIT | ✅ Yes |
| click | 8.1.7 | BSD-3-Clause | BSD-3-Clause | ✅ Yes |
| tqdm | 4.66.5 | MIT/MPL 2.0 | MIT | ✅ Yes |
| jinja2 | 3.1.4 | BSD-3-Clause | BSD-3-Clause | ✅ Yes |
| typing-extensions | 4.12.2 | PSF | PSF-2.0 | ✅ Yes |
| Package | Version | License | SPDX | Commercial |
|---|---|---|---|---|
| ipython | 8.28.0 | BSD-3-Clause | BSD-3-Clause | ✅ Yes |
| ipykernel | 6.29.5 | BSD-3-Clause | BSD-3-Clause | ✅ Yes |
| jupyter-client | 8.6.3 | BSD-3-Clause | BSD-3-Clause | ✅ Yes |
| jupyter-core | 5.7.2 | BSD-3-Clause | BSD-3-Clause | ✅ Yes |
| Dependency License | Compatible with MIT? | Notes |
|---|---|---|
| MIT | ✅ Yes | Identical terms |
| BSD-2-Clause | ✅ Yes | More permissive |
| BSD-3-Clause | ✅ Yes | Slightly more restrictive (no endorsement) |
| Apache 2.0 | ✅ Yes | Compatible, adds patent grant |
| PSF | ✅ Yes | Python Software Foundation, permissive |
| HPND | ✅ Yes | Historical, effectively MIT-like |
| LGPL | ⚠️ Conditional | Must provide source if modifying LGPL code |
| GPL (dev tools) | ✅ Yes | Development tools don’t affect distribution |
✅ All runtime dependencies permit commercial use
The entire dependency stack can be used in commercial software products, with the following requirements:
When distributing this software, you must include:
Create a file listing all third-party licenses. Example format:
================================================================================
PyTorch
================================================================================
From PyTorch:
Copyright (c) 2016- Facebook, Inc (Adam Paszke)
Copyright (c) 2014- Facebook, Inc (Soumith Chintala)
Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert)
Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu)
...
BSD 3-Clause License
...
================================================================================
FastAPI
================================================================================
The MIT License (MIT)
Copyright (c) 2018 Sebastián Ramírez
...
To verify licenses in your environment:
# Install pip-licenses
pip install pip-licenses
# Generate license report
pip-licenses --format=markdown --with-urls
# Check for copyleft licenses
pip-licenses --allow-only="MIT;BSD-3-Clause;BSD-2-Clause;Apache Software License;PSF;HPND;ISC"
# Export to CSV for audit
pip-licenses --format=csv > dependency_licenses.csv
When updating dependencies:
pip-licenses to check for license changesConsider adding to CI/CD:
# .github/workflows/license-check.yml
- name: Check licenses
run: |
pip install pip-licenses
pip-licenses --fail-on="GPL;AGPL;SSPL"
For licensing questions or concerns:
This license analysis is provided for informational purposes and does not constitute legal advice. For commercial deployments or if you have specific legal concerns, please consult with a qualified attorney familiar with open-source licensing.
Last Updated: January 2025 Version: 1.0 Maintained By: EcoMarineAI Project Team