From ea92dd8150d557c84dcc4618ec9cffbc6a15116b Mon Sep 17 00:00:00 2001 From: Duncan Tourolle Date: Sun, 28 Jun 2026 12:09:54 +0200 Subject: [PATCH] add readme, liscence and use public KPN --- .gitignore | 2 -- .gitmodules | 3 ++- LICENSE | 41 +++++++++++++++++++++++++++++++++++++++++ README.md | 33 +++++++++++++++++++++++++-------- external/KPN | 2 +- 5 files changed, 69 insertions(+), 12 deletions(-) create mode 100644 LICENSE diff --git a/.gitignore b/.gitignore index e4eb4b2..5799295 100644 --- a/.gitignore +++ b/.gitignore @@ -34,8 +34,6 @@ ort_cache/ gallery.json gallery_*.json -# Per-movie analysis output (generated by scene_analyze) -death_of_stalin.json # Per-frame debug images images/ diff --git a/.gitmodules b/.gitmodules index 31df759..2649ab7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "external/KPN"] path = external/KPN - url = git@gitea.tourolle.paris:dtourolle/KPN.git + url = https://gitea.tourolle.paris/dtourolle/KPN.git + branch = master diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6945c34 --- /dev/null +++ b/LICENSE @@ -0,0 +1,41 @@ +MIT License + +Copyright (c) 2026 Duncan Tourolle + +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. + +--- + +NOTE ON MODELS AND THIRD-PARTY COMPONENTS + +The MIT license above applies only to the source code in this repository. It +does NOT cover: + + * Machine-learning model weights (the ONNX files in models/). These weights + are the property of their respective authors and are governed by their own + licenses, not by the MIT license above. The models — including the + InsightFace "buffalo" packs (ArcFace / SCRFD), YuNet, and LVFace — are + redistributed here for convenience under those upstream licenses. Several, + notably the InsightFace models, are licensed for NON-COMMERCIAL RESEARCH + USE ONLY. You are responsible for reviewing and complying with each model's + license before use. + + * Third-party libraries this software links against (OpenCV, ONNX Runtime, + FFmpeg, TensorRT/CUDA, nlohmann/json, nanobind, and others), each of which + carries its own license. diff --git a/README.md b/README.md index 0b8c6f3..ba95b36 100644 --- a/README.md +++ b/README.md @@ -45,17 +45,23 @@ Optional flags: ## Models -Download the required ONNX models: +The ONNX model weights live in `models/` (tracked via Git LFS): +- `arcface_w600k_r50.onnx` — primary ArcFace embedder +- `arcface_w600k_mbf.onnx`, `arcface_r18.onnx` — lighter alternatives +- `face_detection_yunet_2023mar.onnx` — YuNet face detector +- `scrfd_500m_bnkps.onnx` — SCRFD face detector + +If they are missing (e.g. LFS not fetched), re-download them with: ```bash bash scripts/download_models.sh ``` -Models are placed in `external/`: -- `arcface_w600k_r50.onnx` — primary ArcFace embedder -- `arcface_w600k_mbf.onnx`, `arcface_r18.onnx` — lighter alternatives -- `face_detection_yunet_2023mar.onnx` — YuNet face detector -- `scrfd_500m_bnkps.onnx` — SCRFD face detector +> **Model licensing:** the model weights carry their own licenses, separate +> from this project's MIT license, and are redistributed here under those +> upstream terms. Several — notably the InsightFace "buffalo" models (ArcFace / +> SCRFD) — are licensed for **non-commercial research use only**. Review and +> comply with each model's license before use. ## Binaries @@ -154,8 +160,9 @@ Anything after `--` is passed through to `scene_analyze` unchanged. Pass `--no-filter` to use the gallery as-is (skip per-title cast filtering), or `--item-id` instead of `--title` to skip the search. -After a successful run, the output JSON is pushed to the JRay Jellyfin -plugin's Truth endpoint (`PUT /Plugins/JRay/Items/{itemId}/Truth`) so +After a successful run, the output JSON is pushed to the [JRay Jellyfin +plugin](https://gitea.tourolle.paris/dtourolle/jRay)'s Truth endpoint +(`PUT /Plugins/JRay/Items/{itemId}/Truth`) so Jellyfin picks it up immediately, using `--api-key` (must be an **Administrator** key for the push to succeed). Pass `--no-push` to skip this and only write `--output` locally (e.g. for local debugging). @@ -208,3 +215,13 @@ Debug/preview branches fan out automatically from `identity_matcher`. ## Evaluation Scripts in `eval/` and `scripts/movienet_*.py` support benchmarking against the MovieNet dataset. + +## License + +The source code in this repository is licensed under the [MIT License](LICENSE). + +The MIT license covers **only the code**. The model weights in `models/` (see +[Models](#models)) are redistributed under their own licenses — several for +non-commercial research use only. Third-party libraries this software links +against (OpenCV, ONNX Runtime, FFmpeg, TensorRT/CUDA, nlohmann/json, nanobind, +and others) likewise carry their own licenses. diff --git a/external/KPN b/external/KPN index 79916f1..7c6a8be 160000 --- a/external/KPN +++ b/external/KPN @@ -1 +1 @@ -Subproject commit 79916f1da131465aa7a712dab8f7d1fc76aa5ba7 +Subproject commit 7c6a8be2b7ce8f5744259ad326059a04ddf86920