Skip to content

Commit

Permalink
Merge pull request #1000 from roboflow/license-cleanup
Browse files Browse the repository at this point in the history
Clean Up Model Licenses
  • Loading branch information
PawelPeczek-Roboflow authored Feb 6, 2025
2 parents 53c7572 + 33a07ab commit 6249d00
Show file tree
Hide file tree
Showing 10 changed files with 1,482 additions and 16 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/check_model_licenses.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: "Validate Model License Listings"

on:
pull_request:
paths:
- "inference/models/**" # Run only if files in inference/models/ have changed
- ".github/workflows/check_model_licenses.yml"
workflow_dispatch:

jobs:
validate-models:
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: actions/checkout@v3

- name: "Validate model directories"
run: |
set -e # Exit immediately if a command exits with a non-zero status
README_FILE="inference/models/README.md"
if [ ! -f "$README_FILE" ]; then
echo "ERROR: $README_FILE does not exist."
exit 1
fi
# Flag to track overall failure
error_found=0
# Iterate over each subdirectory in inference/models/
for model_dir in inference/models/*/; do
# Remove trailing slash and get the basename (e.g., "modelA")
dir_name=$(basename "${model_dir%/}")
echo "Checking directory: inference/models/$dir_name"
# Check 1: Look for a file starting with LICENSE in this directory
# The glob LICENSE* will match files like LICENSE, LICENSE.txt, etc.
shopt -s nullglob
license_files=( "$model_dir"/LICENSE* )
shopt -u nullglob
if [ ${#license_files[@]} -eq 0 ]; then
echo "::error ::Directory 'inference/models/$dir_name' is missing a LICENSE file."
error_found=1
fi
# Check 2: Verify that README contains an entry for this directory.
if ! grep -q "inference/models/$dir_name" "$README_FILE"; then
echo "::error ::Directory 'inference/models/$dir_name' is not referenced in $README_FILE."
error_found=1
fi
done
if [ "$error_found" -ne 0 ]; then
echo "Validation failed. Please address the above errors."
exit 1
else
echo "All model directories passed the validation."
fi
52 changes: 36 additions & 16 deletions inference/models/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,38 @@
The models supported by Roboflow Inference have their own licenses. View the licenses for supported models below.

| model | license |
|:------------------------------|:------------------------------------------------------------------------------------:|
| `inference/models/clip` | [MIT](https://github.com/openai/CLIP/blob/main/LICENSE) |
| `inference/models/cogvlm` | [Apache 2.0](https://github.com/THUDM/CogVLM/blob/main/LICENSE) |
| `inference/models/doctr` | [Apache 2.0](https://github.com/mindee/doctr/blob/main/LICENSE) |
| `inference/models/gaze` | [Apache 2.0 (Mediapipe)](https://github.com/google/mediapipe/blob/master/LICENSE), [MIT (L2Cs-Net)](https://github.com/Ahmednull/L2CS-Net/blob/main/LICENSE) |
| `inference/models/grounding_dino` | [Apache 2.0](https://github.com/IDEA-Research/GroundingDINO/blob/main/LICENSE) |
| `inference/models/sam` | [Apache 2.0](https://github.com/facebookresearch/segment-anything/blob/main/LICENSE) |
| `inference/models/vit` | [Apache 2.0](https://github.com/google-research/vision_transformer/blob/main/LICENSE)|
| `inference/models/yolact` | [MIT](https://github.com/dbolya/yolact/blob/master/LICENSE) |
| `inference/models/yolo_world` | [GPL-3.0](https://github.com/AILab-CVC/YOLO-World/blob/master/LICENSE) |
| `inference/models/yolonas` | [Apache 2.0](https://github.com/Deci-AI/super-gradients/blob/master/LICENSE.md) |
| `inference/models/yolov5` | [AGPL-3.0](https://github.com/ultralytics/yolov5/blob/master/LICENSE) |
| `inference/models/yolov7` | [GPL-3.0](https://github.com/WongKinYiu/yolov7/blob/main/LICENSE.md) |
| `inference/models/yolov8` | [AGPL-3.0](https://github.com/ultralytics/ultralytics/blob/master/LICENSE) |
| `inference/models/yolov9` | [GPL-3.0](https://github.com/WongKinYiu/yolov9/blob/main/LICENSE.md) |
| model | license | commercial license available |
|:------------------------------|:------------------------------------------------------------------------------------:|:----------------------------:|
| `inference/models/clip` | [MIT](https://github.com/openai/CLIP/blob/main/LICENSE) | 👍 |
| `inference/models/cogvlm` | [Apache 2.0](https://github.com/THUDM/CogVLM/blob/main/LICENSE) | 👍 |
| `inference/models/doctr` | [Apache 2.0](https://github.com/mindee/doctr/blob/main/LICENSE) | 👍 |
| `inference/models/florence2` | [MIT](https://huggingface.co/microsoft/Florence-2-base/blob/main/LICENSE) | 👍 |
| `inference/models/gaze` | [Apache 2.0 (Mediapipe)](https://github.com/google/mediapipe/blob/master/LICENSE), [MIT (L2Cs-Net)](https://github.com/Ahmednull/L2CS-Net/blob/main/LICENSE) | 👍 |
| `inference/models/grounding_dino` | [Apache 2.0](https://github.com/IDEA-Research/GroundingDINO/blob/main/LICENSE) | 👍 |
| `inference/models/owlv2` | [Apache 2.0](https://github.com/google-research/scenic/blob/main/LICENSE) | 👍 |
| `inference/models/paligemma` | [Apache 2.0](https://github.com/google-research/big_vision/blob/main/LICENSE), [Gemma](https://ai.google.dev/gemma/terms) | 👍 |
| `inference/models/resnet` | [Apache 2.0](https://github.com/huggingface/pytorch-image-models/blob/main/LICENSE) | 👍 |
| `inference/models/sam` | [Apache 2.0](https://github.com/facebookresearch/segment-anything/blob/main/LICENSE) | 👍 |
| `inference/models/sam2` | [Apache 2.0](https://github.com/facebookresearch/sam2/blob/main/LICENSE) | 👍 |
| `inference/models/transformers` | [Apache 2.0](https://github.com/huggingface/transformers/blob/main/LICENSE) | 👍 |
| `inference/models/trocr` | [MIT](https://github.com/microsoft/unilm/blob/master/LICENSE) | 👍 |
| `inference/models/vit` | [Apache 2.0](https://github.com/google-research/vision_transformer/blob/main/LICENSE)| 👍 |
| `inference/models/yolact` | [MIT](https://github.com/dbolya/yolact/blob/master/LICENSE) | 👍 |
| `inference/models/yolo_world` | [GPL-3.0](https://github.com/AILab-CVC/YOLO-World/blob/master/LICENSE) ||
| `inference/models/yolonas` | [Apache 2.0](https://github.com/Deci-AI/super-gradients/blob/master/LICENSE.md) | 👍 |
| `inference/models/yolov5` | [AGPL-3.0](https://github.com/ultralytics/yolov5/blob/master/LICENSE) ||
| `inference/models/yolov7` | [GPL-3.0](https://github.com/WongKinYiu/yolov7/blob/main/LICENSE.md) ||
| `inference/models/yolov8` | [AGPL-3.0](https://github.com/ultralytics/ultralytics/blob/master/LICENSE) ||
| `inference/models/yolov9` | [GPL-3.0](https://github.com/WongKinYiu/yolov9/blob/main/LICENSE.md) ||
| `inference/models/yolov10` | [AGPL-3.0](https://github.com/THU-MIG/yolov10/blob/main/LICENSE) ||
| `inference/models/yolov11` | [AGPL-3.0](https://github.com/ultralytics/ultralytics/blob/master/LICENSE) ||

## Commercial Licenses

Models listed with a 👍 above are permissively licensed for commercial use by default. Typically no additional license is needed.

Models with a ✅ or ❌ have restrictive licensing that can be problematic for commercial use without procuring an additional license.

For models marked with a ✅ above, Roboflow [offers commercial licenses](https://roboflow.com/licensing) on [its paid plans](https://roboflow.com/pricing)
that allow use in commercial projects without the onerous terms in their default open source licenses.

Models with an ❌ above do not have a commercial license available (from anyone). You may wish to seek legal advice before using them commercially.
22 changes: 22 additions & 0 deletions inference/models/florence2/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

Loading

0 comments on commit 6249d00

Please sign in to comment.