Add NeoRefacer code and updates

This commit is contained in:
Felipe Daragon
2025-04-10 22:08:59 +01:00
parent 3549b7e50c
commit a6c9eb3efe
15 changed files with 817 additions and 423 deletions

31
LICENSE
View File

@@ -23,9 +23,9 @@ 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.
- You may only use this Software with content (such as images) for which you
have the necessary rights and permissions. Unauthorized use of third-party
content is strictly prohibited.
- You may only use this Software with content (such as images and videos)
for which you have the necessary rights and permissions. Unauthorized use of
third-party content is strictly prohibited.
- This Software is intended for educational and research purposes only. Use
of this Software for malicious purposes, including but not limited to identity
@@ -69,10 +69,33 @@ If you wish to use this project solely under the MIT License (for example,
for commercial purposes), you **must remove** the `codeformer` component.
Please follow the instructions provided below:
- Remove the subdirectories basicsr, facelib and weights.
- Remove the subdirectories basicsr and facelib
- Remove within weights subdirectory Codeformer and facelib.
- Remove codeformer_wrapper.py
- Edit refacer.py and remove the import: codeformer_wrapper import enhance_image
- Within def reface_image, comment the line: output_path = enhance_image(output_path)
- That's all!
Failure to remove `codeformer` when required may violate the terms of its license.
About User Outputs:
The outputs generated by this software (such as refaced images or videos) are not
subject to the CC BY-NC-SA license and may be used freely, including for commercial
purposes, regardless of whether the optional codeformer component is used.
Explanation:
Codeformer is a model that processes images for face enhancement.
It does not embed its own visible content into the output.
This is very different from a case where licensed assets (such as textures,
overlays, characters, backgrounds, or artwork) appear visibly in the output.
Codeformer simply modifies the input image without adding original copyrighted
material.
Therefore, output images are not derivative works of Codeformer
and are not bound by the NonCommercial restrictions of its license.
Only the Codeformer model code and weights themselves are under CC BY-NC-SA 4.0
— not the results produced through their use.