Skip to content

Commit

Permalink
Added license support for YoloNAS-R
Browse files Browse the repository at this point in the history
  • Loading branch information
BloodAxe committed May 16, 2024
1 parent 3ff845e commit 37665a2
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
16 changes: 16 additions & 0 deletions LICENSE.YOLONAS-R.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# YOLO-NAS-R License

These model weights or any components comprising the model and the associated documentation (the "Software") is licensed to you by Deci.AI, Inc. ("Deci") under the following terms:
© 2023 – Deci.AI, Inc.

Subject to your full compliance with all of the terms herein, Deci hereby grants you a non-exclusive, revocable, non-sublicensable, non-transferable worldwide and limited right and license to use the Software. If you are using the Deci platform for model optimization, your use of the Software is subject to the Terms of Use available here (the "Terms of Use").

You shall not, without Deci's prior written consent:
(i) resell, lease, sublicense or distribute the Software to any person;
(ii) use the Software to provide third parties with managed services or provide remote access to the Software to any person or compete with Deci in any way;
(iii) represent that you possess any proprietary interest in the Software;
(iv) directly or indirectly, take any action to contest Deci's intellectual property rights or infringe them in any way;
(V) reverse-engineer, decompile, disassemble, alter, enhance, improve, add to, delete from, or otherwise modify, or derive (or attempt to derive) the technology or source code underlying any part of the Software;
(vi) use the Software (or any part thereof) in any illegal, indecent, misleading, harmful, abusive, harassing and/or disparaging manner or for any such purposes. Except as provided under the terms of any separate agreement between you and Deci, including the Terms of Use to the extent applicable, you may not use the Software for any commercial use, including in connection with any models used in a production environment.

DECI PROVIDES THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS OF THE SOFTWARE 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.
5 changes: 5 additions & 0 deletions src/super_gradients/training/pretrained_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
"yolo_nas_pose_s_coco_pose": "https://sghub.deci.ai/models/yolo_nas_pose_s_coco_pose.pth",
"yolo_nas_pose_m_coco_pose": "https://sghub.deci.ai/models/yolo_nas_pose_m_coco_pose.pth",
"yolo_nas_pose_l_coco_pose": "https://sghub.deci.ai/models/yolo_nas_pose_l_coco_pose.pth",
"yolo_nas_r_s_dota2": "https://sghub.deci.ai/models/yolo_nas_r_s_dota2.pth",
"yolo_nas_r_m_dota2": "https://sghub.deci.ai/models/yolo_nas_r_m_dota2.pth",
"yolo_nas_r_l_dota2": "https://sghub.deci.ai/models/yolo_nas_r_l_dota2.pth",
}

PRETRAINED_NUM_CLASSES = {
Expand All @@ -69,6 +72,7 @@
"coco": 80,
"coco_pose": 17,
"cifar10": 10,
"dota2": 18,
}

DATASET_LICENSES = {
Expand All @@ -79,4 +83,5 @@
"coco_pose": "https://cocodataset.org/#termsofuse",
"cityscapes": "https://www.cs.toronto.edu/~kriz/cifar.html",
"objects365": "https://www.objects365.org/download.html",
"dota2": "https://captain-whu.github.io/DOTA/dataset.html",
}
7 changes: 6 additions & 1 deletion src/super_gradients/training/utils/checkpoint_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1582,7 +1582,12 @@ def load_pretrained_weights(model: torch.nn.Module, architecture: str, pretraine
"https://github.com/Deci-AI/super-gradients/blob/master/LICENSE.YOLONAS-POSE.md\n"
"By downloading the pre-trained weight files you agree to comply with these terms."
)

elif architecture in {Models.YOLO_NAS_R_S, Models.YOLO_NAS_R_M, Models.YOLO_NAS_R_L}:
logger.info(
"License Notification: YOLO-NAS-R pre-trained weights are subjected to the specific license terms and conditions detailed in \n"
"https://github.com/Deci-AI/super-gradients/blob/master/LICENSE.YOLONAS-R.md\n"
"By downloading the pre-trained weight files you agree to comply with these terms."
)
# Basically this check allows settings pretrained weights from local path using file:///path/to/weights scheme
# which is a valid URI scheme for local files
# Supporting local files and file URI allows us modification of pretrained weights dics in unit tests
Expand Down

0 comments on commit 37665a2

Please sign in to comment.