Deci-AI / super-gradients

Easily train or fine-tune SOTA computer vision models with one open source training library. The home of Yolo-NAS.
https://www.supergradients.com
Apache License 2.0
4.61k stars 513 forks source link

Clarification on license for modifications to Yolo-NAS with pre-trained weights #1993

Closed MarcA711 closed 6 months ago

MarcA711 commented 6 months ago

💡 Your Question

Hi, I want to implement yolo-nas in the open-source project Frigate for Rockchip devices. These devices include a NPU that can speed up inference. However, the model has to be converted to another format (.rknn) and inference has to be performed with the Rockchip API using Rockchips open-source toolkit.

As far as I understand, Yolo-NAS with pretrained weights is licensed under this license that says:

You shall not, without Deci's prior written consent: [...] (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;

Is it therefore forbidden to convert the model to .rknn format, because it is a modification? Moreover, some (mostly post-process) layers don't run efficiently on the NPU or sometimes don't work at all. In this case I need to remove the layer from the model and perform the operation on the CPU/GPU. Is this allowed?

Moreover, here it says:

The YOLO-NAS model is available [...] on SuperGradients.

Does this mean, that one can use yolo-nas only with SuperGradients and not with the Rockchip API that is required to use the NPU?

If any of the above steps are prohibited, can I get your consent to perform them in order to integrate Yolo-NAS in Frigate for Rockchip users?

Thank you in advance for your help.

Versions

No response

BloodAxe commented 6 months ago

Not a legal advice here. But this question has been already earlier, you may want to search for closed issues for more info.

But in short: A commercial use of pre-trained weights of YoloNAS is a subject of license restrictions. If you don't use Deci's pre-trained weights for training a model (E.g you train from scratch) then you are not bound to these terms and only Apache 2 licence applies.

MarcA711 commented 6 months ago

Hi, thank you for your help. I think I read through all questions regarding the yolo-nas license. Most of them are about using yolo-nas commercially.

However, my question is about using yolo-nas with pre-trained weight non-commercially. As far as I understand the pre-trained weights fall under the license(s) that I linked above. Specifically, I want to know:

If this has been already answered, could you please point me there since I am unable to find it? And if it is forbidden, can I get your consent to do these steps in order to use yolo-nas on Friagte with Rockchip devices?

MarcA711 commented 6 months ago

Sorry for asking again, but can anybody help me understand the license?

MarcA711 commented 6 months ago

Hey @BloodAxe, I implemented support for yolonas in Frigate (see https://github.com/blakeblackshear/frigate/pull/11365) and used yolonas with pre-trained weigths. I hope this is in accordance with your license. If you have a problem with this, please feel free to contact me so that I can remove the models as quickly as possible. Thank you very much.

BloodAxe commented 6 months ago

I'm certainly not a person in charge of enforcing license compliance :) I write code and I prefer this kind of activity over the legal stuff. If you want to hear the some official reply I suggest reaching via https://deci.ai/contact/. Sorry for inconvenience. But lawyers are rare visitors here on GitHub )

MarcA711 commented 6 months ago

Hey @BloodAxe, I tried this as well a couple of weeks ago but never got an reply as well. However, thank you for your help :)