Add DDColor paper tiny ONNX (colourisation), update model card and licences
Browse files- LICENSE +206 -0
- README.md +10 -0
- ddcolor-paper-tiny.onnx +3 -0
LICENSE
CHANGED
|
@@ -621,3 +621,209 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
| 621 |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 622 |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 623 |
SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 621 |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 622 |
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 623 |
SOFTWARE.
|
| 624 |
+
|
| 625 |
+
================================================================
|
| 626 |
+
DDColor (piddnad) - Apache-2.0
|
| 627 |
+
Source: https://github.com/piddnad/DDColor/blob/2adb63f2656ac41cbdf7b894cddd94121a3faf13/LICENSE
|
| 628 |
+
================================================================
|
| 629 |
+
Apache License
|
| 630 |
+
Version 2.0, January 2004
|
| 631 |
+
http://www.apache.org/licenses/
|
| 632 |
+
|
| 633 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 634 |
+
|
| 635 |
+
1. Definitions.
|
| 636 |
+
|
| 637 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 638 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 639 |
+
|
| 640 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 641 |
+
the copyright owner that is granting the License.
|
| 642 |
+
|
| 643 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 644 |
+
other entities that control, are controlled by, or are under common
|
| 645 |
+
control with that entity. For the purposes of this definition,
|
| 646 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 647 |
+
direction or management of such entity, whether by contract or
|
| 648 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 649 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 650 |
+
|
| 651 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 652 |
+
exercising permissions granted by this License.
|
| 653 |
+
|
| 654 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 655 |
+
including but not limited to software source code, documentation
|
| 656 |
+
source, and configuration files.
|
| 657 |
+
|
| 658 |
+
"Object" form shall mean any form resulting from mechanical
|
| 659 |
+
transformation or translation of a Source form, including but
|
| 660 |
+
not limited to compiled object code, generated documentation,
|
| 661 |
+
and conversions to other media types.
|
| 662 |
+
|
| 663 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 664 |
+
Object form, made available under the License, as indicated by a
|
| 665 |
+
copyright notice that is included in or attached to the work
|
| 666 |
+
(an example is provided in the Appendix below).
|
| 667 |
+
|
| 668 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 669 |
+
form, that is based on (or derived from) the Work and for which the
|
| 670 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 671 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 672 |
+
of this License, Derivative Works shall not include works that remain
|
| 673 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 674 |
+
the Work and Derivative Works thereof.
|
| 675 |
+
|
| 676 |
+
"Contribution" shall mean any work of authorship, including
|
| 677 |
+
the original version of the Work and any modifications or additions
|
| 678 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 679 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 680 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 681 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 682 |
+
means any form of electronic, verbal, or written communication sent
|
| 683 |
+
to the Licensor or its representatives, including but not limited to
|
| 684 |
+
communication on electronic mailing lists, source code control systems,
|
| 685 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 686 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 687 |
+
excluding communication that is conspicuously marked or otherwise
|
| 688 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 689 |
+
|
| 690 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 691 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 692 |
+
subsequently incorporated within the Work.
|
| 693 |
+
|
| 694 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 695 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 696 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 697 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 698 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 699 |
+
Work and such Derivative Works in Source or Object form.
|
| 700 |
+
|
| 701 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 702 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 703 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 704 |
+
(except as stated in this section) patent license to make, have made,
|
| 705 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 706 |
+
where such license applies only to those patent claims licensable
|
| 707 |
+
by such Contributor that are necessarily infringed by their
|
| 708 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 709 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 710 |
+
institute patent litigation against any entity (including a
|
| 711 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 712 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 713 |
+
or contributory patent infringement, then any patent licenses
|
| 714 |
+
granted to You under this License for that Work shall terminate
|
| 715 |
+
as of the date such litigation is filed.
|
| 716 |
+
|
| 717 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 718 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 719 |
+
modifications, and in Source or Object form, provided that You
|
| 720 |
+
meet the following conditions:
|
| 721 |
+
|
| 722 |
+
(a) You must give any other recipients of the Work or
|
| 723 |
+
Derivative Works a copy of this License; and
|
| 724 |
+
|
| 725 |
+
(b) You must cause any modified files to carry prominent notices
|
| 726 |
+
stating that You changed the files; and
|
| 727 |
+
|
| 728 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 729 |
+
that You distribute, all copyright, patent, trademark, and
|
| 730 |
+
attribution notices from the Source form of the Work,
|
| 731 |
+
excluding those notices that do not pertain to any part of
|
| 732 |
+
the Derivative Works; and
|
| 733 |
+
|
| 734 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 735 |
+
distribution, then any Derivative Works that You distribute must
|
| 736 |
+
include a readable copy of the attribution notices contained
|
| 737 |
+
within such NOTICE file, excluding those notices that do not
|
| 738 |
+
pertain to any part of the Derivative Works, in at least one
|
| 739 |
+
of the following places: within a NOTICE text file distributed
|
| 740 |
+
as part of the Derivative Works; within the Source form or
|
| 741 |
+
documentation, if provided along with the Derivative Works; or,
|
| 742 |
+
within a display generated by the Derivative Works, if and
|
| 743 |
+
wherever such third-party notices normally appear. The contents
|
| 744 |
+
of the NOTICE file are for informational purposes only and
|
| 745 |
+
do not modify the License. You may add Your own attribution
|
| 746 |
+
notices within Derivative Works that You distribute, alongside
|
| 747 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 748 |
+
that such additional attribution notices cannot be construed
|
| 749 |
+
as modifying the License.
|
| 750 |
+
|
| 751 |
+
You may add Your own copyright statement to Your modifications and
|
| 752 |
+
may provide additional or different license terms and conditions
|
| 753 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 754 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 755 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 756 |
+
the conditions stated in this License.
|
| 757 |
+
|
| 758 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 759 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 760 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 761 |
+
this License, without any additional terms or conditions.
|
| 762 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 763 |
+
the terms of any separate license agreement you may have executed
|
| 764 |
+
with Licensor regarding such Contributions.
|
| 765 |
+
|
| 766 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 767 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 768 |
+
except as required for reasonable and customary use in describing the
|
| 769 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 770 |
+
|
| 771 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 772 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 773 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 774 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 775 |
+
implied, including, without limitation, any warranties or conditions
|
| 776 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 777 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 778 |
+
appropriateness of using or redistributing the Work and assume any
|
| 779 |
+
risks associated with Your exercise of permissions under this License.
|
| 780 |
+
|
| 781 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 782 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 783 |
+
unless required by applicable law (such as deliberate and grossly
|
| 784 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 785 |
+
liable to You for damages, including any direct, indirect, special,
|
| 786 |
+
incidental, or consequential damages of any character arising as a
|
| 787 |
+
result of this License or out of the use or inability to use the
|
| 788 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 789 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 790 |
+
other commercial damages or losses), even if such Contributor
|
| 791 |
+
has been advised of the possibility of such damages.
|
| 792 |
+
|
| 793 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 794 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 795 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 796 |
+
or other liability obligations and/or rights consistent with this
|
| 797 |
+
License. However, in accepting such obligations, You may act only
|
| 798 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 799 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 800 |
+
defend, and hold each Contributor harmless for any liability
|
| 801 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 802 |
+
of your accepting any such warranty or additional liability.
|
| 803 |
+
|
| 804 |
+
END OF TERMS AND CONDITIONS
|
| 805 |
+
|
| 806 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 807 |
+
|
| 808 |
+
To apply the Apache License to your work, attach the following
|
| 809 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 810 |
+
replaced with your own identifying information. (Don't include
|
| 811 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 812 |
+
comment syntax for the file format. We also recommend that a
|
| 813 |
+
file or class name and description of purpose be included on the
|
| 814 |
+
same "printed page" as the copyright notice for easier
|
| 815 |
+
identification within third-party archives.
|
| 816 |
+
|
| 817 |
+
Copyright [yyyy] [name of copyright owner]
|
| 818 |
+
|
| 819 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 820 |
+
you may not use this file except in compliance with the License.
|
| 821 |
+
You may obtain a copy of the License at
|
| 822 |
+
|
| 823 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 824 |
+
|
| 825 |
+
Unless required by applicable law or agreed to in writing, software
|
| 826 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 827 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 828 |
+
See the License for the specific language governing permissions and
|
| 829 |
+
limitations under the License.
|
README.md
CHANGED
|
@@ -12,6 +12,8 @@ tags:
|
|
| 12 |
- face-restoration
|
| 13 |
- super-resolution
|
| 14 |
- background-removal
|
|
|
|
|
|
|
| 15 |
- on-device
|
| 16 |
---
|
| 17 |
|
|
@@ -32,11 +34,13 @@ Pin a commit in your download URL (`/resolve/<commit>/<file>`) and verify the SH
|
|
| 32 |
| `realesr-general-x4v3.onnx` | 4,866,420 | `7b10e80021ec3e0ff35017ae5022791879d93a799b2e201e1010a37510202266` | Real-ESRGAN general x4v3 (SRVGGNetCompact), fp32 | Unmodified copy of `onnx/model.onnx` from [vlad-grig/realesr-general-x4v3-onnx](https://huggingface.co/vlad-grig/realesr-general-x4v3-onnx) (commit `0e95d93e454cf6b5de9bdf5a1c9e7ec340d38231`), an export of the official `realesr-general-x4v3.pth` from [xinntao/Real-ESRGAN release v0.2.5.0](https://github.com/xinntao/Real-ESRGAN/releases/tag/v0.2.5.0) | BSD-3-Clause, © 2021 Xintao Wang |
|
| 33 |
| `u2netp.onnx` | 4,574,861 | `309c8469258dda742793dce0ebea8e6dd393174f89934733ecc8b14c76f4ddd8` | U²-Netp (small) salient-object matte (default background model) | Unmodified copy of `u2netp.onnx` from [danielgatis/rembg release v0.0.0](https://github.com/danielgatis/rembg/releases/tag/v0.0.0) (rembg is MIT), converted from the weights of [xuebinqin/U-2-Net](https://github.com/xuebinqin/U-2-Net) | Apache-2.0, © Xuebin Qin et al. |
|
| 34 |
| `u2net.onnx` | 175,997,641 | `8d10d2f3bb75ae3b6d527c77944fc5e7dcd94b29809d47a739a7a728a912b491` | U²-Net (full) salient-object matte (HD option) | Unmodified copy of `u2net.onnx` from [danielgatis/rembg release v0.0.0](https://github.com/danielgatis/rembg/releases/tag/v0.0.0) (rembg is MIT), converted from the weights of [xuebinqin/U-2-Net](https://github.com/xuebinqin/U-2-Net) | Apache-2.0, © Xuebin Qin et al. |
|
|
|
|
| 35 |
|
| 36 |
## Input and output contracts
|
| 37 |
|
| 38 |
- **GFPGAN (both files):** input `input`, float32 `[1,3,512,512]` RGB in −1..1 (one aligned face crop). Output `output`, the same shape and range.
|
| 39 |
- **Real-ESRGAN general x4v3:** input `input`, float32 `[1,3,H,W]` RGB in 0..1, with dynamic H and W. Output `output`, `[1,3,4H,4W]`. Clamp the output to 0..1.
|
|
|
|
| 40 |
- **U²-Net / U²-Netp:** input `input.1`, float32 `[1,3,320,320]` RGB, with ImageNet normalisation applied after dividing by the peak pixel. The first output is the matte.
|
| 41 |
|
| 42 |
## Training data note: FFHQ
|
|
@@ -46,11 +50,17 @@ GFPGAN was trained on the [FFHQ](https://github.com/NVlabs/ffhq-dataset) face da
|
|
| 46 |
The GFPGAN code and weights are released under Apache-2.0. Whether the dataset's terms carry over to the trained weights is legally unsettled.
|
| 47 |
Commercial users of the GFPGAN files should make their own assessment.
|
| 48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
## Attribution and citations
|
| 50 |
|
| 51 |
- GFPGAN: Xintao Wang, Yu Li, Honglun Zhang, Ying Shan. *Towards Real-World Blind Face Restoration with Generative Facial Prior.* CVPR 2021. https://github.com/TencentARC/GFPGAN (Apache-2.0)
|
| 52 |
- Real-ESRGAN: Xintao Wang, Liangbin Xie, Chao Dong, Ying Shan. *Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data.* ICCVW 2021. https://github.com/xinntao/Real-ESRGAN (BSD-3-Clause)
|
| 53 |
- U²-Net: Xuebin Qin, Zichen Zhang, Chenyang Huang, Masood Dehghan, Osmar R. Zaiane, Martin Jagersand. *U²-Net: Going Deeper with Nested U-Structure for Salient Object Detection.* Pattern Recognition 2020. https://github.com/xuebinqin/U-2-Net (Apache-2.0)
|
|
|
|
| 54 |
- ONNX conversions: rembg by Daniel Gatis (MIT), sidkonduru/gfpgan-v1.4-onnx, vlad-grig/realesr-general-x4v3-onnx.
|
| 55 |
|
| 56 |
See `LICENSE` for the full licence texts.
|
|
|
|
| 12 |
- face-restoration
|
| 13 |
- super-resolution
|
| 14 |
- background-removal
|
| 15 |
+
- colorization
|
| 16 |
+
- ddcolor
|
| 17 |
- on-device
|
| 18 |
---
|
| 19 |
|
|
|
|
| 34 |
| `realesr-general-x4v3.onnx` | 4,866,420 | `7b10e80021ec3e0ff35017ae5022791879d93a799b2e201e1010a37510202266` | Real-ESRGAN general x4v3 (SRVGGNetCompact), fp32 | Unmodified copy of `onnx/model.onnx` from [vlad-grig/realesr-general-x4v3-onnx](https://huggingface.co/vlad-grig/realesr-general-x4v3-onnx) (commit `0e95d93e454cf6b5de9bdf5a1c9e7ec340d38231`), an export of the official `realesr-general-x4v3.pth` from [xinntao/Real-ESRGAN release v0.2.5.0](https://github.com/xinntao/Real-ESRGAN/releases/tag/v0.2.5.0) | BSD-3-Clause, © 2021 Xintao Wang |
|
| 35 |
| `u2netp.onnx` | 4,574,861 | `309c8469258dda742793dce0ebea8e6dd393174f89934733ecc8b14c76f4ddd8` | U²-Netp (small) salient-object matte (default background model) | Unmodified copy of `u2netp.onnx` from [danielgatis/rembg release v0.0.0](https://github.com/danielgatis/rembg/releases/tag/v0.0.0) (rembg is MIT), converted from the weights of [xuebinqin/U-2-Net](https://github.com/xuebinqin/U-2-Net) | Apache-2.0, © Xuebin Qin et al. |
|
| 36 |
| `u2net.onnx` | 175,997,641 | `8d10d2f3bb75ae3b6d527c77944fc5e7dcd94b29809d47a739a7a728a912b491` | U²-Net (full) salient-object matte (HD option) | Unmodified copy of `u2net.onnx` from [danielgatis/rembg release v0.0.0](https://github.com/danielgatis/rembg/releases/tag/v0.0.0) (rembg is MIT), converted from the weights of [xuebinqin/U-2-Net](https://github.com/xuebinqin/U-2-Net) | Apache-2.0, © Xuebin Qin et al. |
|
| 37 |
+
| `ddcolor-paper-tiny.onnx` | 220,552,834 | `5479b1b00d8ba2b3c312e5378e75dc93eac6f80c8497e90169801896e1eeb68d` | DDColor-T (`ddcolor_paper_tiny`), ConvNeXt-T encoder + multi-scale colour decoder, fp32, opset 17 (photo colourisation) | Built by MomoApps from the official weights [piddnad/ddcolor_paper_tiny](https://huggingface.co/piddnad/ddcolor_paper_tiny) (commit `cf9fd99c1d7472689ec7413441c1b799a51866a3`, `pytorch_model.bin` sha256 `8a1277bc90a1bfbb6d2d83933a9a6bc821931879ca93e26e4fcec12165d41fce`) and the architecture in [piddnad/DDColor](https://github.com/piddnad/DDColor) (commit `2adb63f2656ac41cbdf7b894cddd94121a3faf13`). The weights load with no missing or unexpected keys. The 8 spectral-norm layers are folded into plain weights, which is exact in eval mode. Exported with `torch.onnx.export` (torch 2.15.0). | Apache-2.0, © Xiaoyang Kang et al. (DAMO Academy, Alibaba) |
|
| 38 |
|
| 39 |
## Input and output contracts
|
| 40 |
|
| 41 |
- **GFPGAN (both files):** input `input`, float32 `[1,3,512,512]` RGB in −1..1 (one aligned face crop). Output `output`, the same shape and range.
|
| 42 |
- **Real-ESRGAN general x4v3:** input `input`, float32 `[1,3,H,W]` RGB in 0..1, with dynamic H and W. Output `output`, `[1,3,4H,4W]`. Clamp the output to 0..1.
|
| 43 |
+
- **DDColor paper tiny:** input `input`, float32 `[1,3,512,512]` RGB in 0..1. Build it as DDColor's `ColorizationPipeline` does: resize the photo to 512×512, convert to Lab (OpenCV float), keep L, set a = b = 0, and convert back to RGB. The result is the greyscale L channel replicated as RGB. Output `output`, float32 `[1,2,512,512]`: the predicted Lab a and b channels on OpenCV's float Lab scale (roughly −128..127; clamp them). Resize a and b to the original size, combine them with the original L, and convert Lab to RGB. Ops include `Einsum`, `Erf` and `LayerNormalization`, which the full ONNX Runtime Android package supports. A reduced-operator ORT Mobile build must include them.
|
| 44 |
- **U²-Net / U²-Netp:** input `input.1`, float32 `[1,3,320,320]` RGB, with ImageNet normalisation applied after dividing by the peak pixel. The first output is the matte.
|
| 45 |
|
| 46 |
## Training data note: FFHQ
|
|
|
|
| 50 |
The GFPGAN code and weights are released under Apache-2.0. Whether the dataset's terms carry over to the trained weights is legally unsettled.
|
| 51 |
Commercial users of the GFPGAN files should make their own assessment.
|
| 52 |
|
| 53 |
+
## Training data note: ImageNet
|
| 54 |
+
|
| 55 |
+
DDColor `ddcolor_paper_tiny` was trained on [ImageNet](https://www.image-net.org/) (ILSVRC 2012), according to the DDColor model zoo. ImageNet's terms of access limit the images to non-commercial research and educational use.
|
| 56 |
+
The DDColor code and weights are released under Apache-2.0. As with FFHQ above, whether the dataset's terms carry over to the trained weights is legally unsettled.
|
| 57 |
+
|
| 58 |
## Attribution and citations
|
| 59 |
|
| 60 |
- GFPGAN: Xintao Wang, Yu Li, Honglun Zhang, Ying Shan. *Towards Real-World Blind Face Restoration with Generative Facial Prior.* CVPR 2021. https://github.com/TencentARC/GFPGAN (Apache-2.0)
|
| 61 |
- Real-ESRGAN: Xintao Wang, Liangbin Xie, Chao Dong, Ying Shan. *Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data.* ICCVW 2021. https://github.com/xinntao/Real-ESRGAN (BSD-3-Clause)
|
| 62 |
- U²-Net: Xuebin Qin, Zichen Zhang, Chenyang Huang, Masood Dehghan, Osmar R. Zaiane, Martin Jagersand. *U²-Net: Going Deeper with Nested U-Structure for Salient Object Detection.* Pattern Recognition 2020. https://github.com/xuebinqin/U-2-Net (Apache-2.0)
|
| 63 |
+
- DDColor: Xiaoyang Kang, Tao Yang, Wenqi Ouyang, Peiran Ren, Lingzhi Li, Xuansong Xie. *DDColor: Towards Photo-Realistic Image Colorization via Dual Decoders.* ICCV 2023. https://github.com/piddnad/DDColor (Apache-2.0)
|
| 64 |
- ONNX conversions: rembg by Daniel Gatis (MIT), sidkonduru/gfpgan-v1.4-onnx, vlad-grig/realesr-general-x4v3-onnx.
|
| 65 |
|
| 66 |
See `LICENSE` for the full licence texts.
|
ddcolor-paper-tiny.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5479b1b00d8ba2b3c312e5378e75dc93eac6f80c8497e90169801896e1eeb68d
|
| 3 |
+
size 220552834
|