baiguan.yt yingda.chen 3 years ago
parent
commit
eb6d81a53e
20 changed files with 38 additions and 0 deletions
  1. +2
    -0
      modelscope/metrics/image_portrait_enhancement_metric.py
  2. +2
    -0
      modelscope/models/cv/face_generation/op/conv2d_gradfix.py
  3. +2
    -0
      modelscope/models/cv/face_generation/op/fused_act.py
  4. +2
    -0
      modelscope/models/cv/face_generation/op/upfirdn2d.py
  5. +2
    -0
      modelscope/models/cv/face_generation/stylegan2.py
  6. +2
    -0
      modelscope/models/cv/image_colorization/unet.py
  7. +2
    -0
      modelscope/models/cv/image_colorization/utils.py
  8. +2
    -0
      modelscope/models/cv/image_portrait_enhancement/align_faces.py
  9. +1
    -0
      modelscope/models/cv/image_portrait_enhancement/eqface/fqa.py
  10. +2
    -0
      modelscope/models/cv/image_portrait_enhancement/eqface/model_resnet.py
  11. +2
    -0
      modelscope/models/cv/image_portrait_enhancement/gpen.py
  12. +1
    -0
      modelscope/models/cv/image_portrait_enhancement/image_portrait_enhancement.py
  13. +2
    -0
      modelscope/models/cv/image_portrait_enhancement/losses/helpers.py
  14. +2
    -0
      modelscope/models/cv/image_portrait_enhancement/losses/losses.py
  15. +2
    -0
      modelscope/models/cv/image_portrait_enhancement/losses/model_irse.py
  16. +2
    -0
      modelscope/models/cv/image_portrait_enhancement/retinaface/detection.py
  17. +2
    -0
      modelscope/models/cv/image_portrait_enhancement/retinaface/models/net.py
  18. +2
    -0
      modelscope/models/cv/image_portrait_enhancement/retinaface/models/retinaface.py
  19. +2
    -0
      modelscope/models/cv/super_resolution/arch_util.py
  20. +2
    -0
      modelscope/models/cv/super_resolution/rrdbnet_arch.py

+ 2
- 0
modelscope/metrics/image_portrait_enhancement_metric.py View File

@@ -1,3 +1,5 @@
# Part of the implementation is borrowed and modified from BasicSR, publicly available at
# https://github.com/XPixelGroup/BasicSR/blob/master/basicsr/metrics/psnr_ssim.py
from typing import Dict

import numpy as np


+ 2
- 0
modelscope/models/cv/face_generation/op/conv2d_gradfix.py View File

@@ -1,3 +1,5 @@
# The implementation is adopted from stylegan2-pytorch, made public available under the MIT License
# at https://github.com/rosinality/stylegan2-pytorch/blob/master/op/conv2d_gradfix.py
import contextlib
import warnings



+ 2
- 0
modelscope/models/cv/face_generation/op/fused_act.py View File

@@ -1,3 +1,5 @@
# The implementation is adopted from stylegan2-pytorch, made public available under the MIT License
# t https://github.com/rosinality/stylegan2-pytorch/blob/master/op/fused_act.py
import os

import torch


+ 2
- 0
modelscope/models/cv/face_generation/op/upfirdn2d.py View File

@@ -1,3 +1,5 @@
# The implementation is adopted from stylegan2-pytorch, made public available under the MIT License
# at https://github.com/rosinality/stylegan2-pytorch/blob/master/op/upfirdn2d.py
import os
from collections import abc



+ 2
- 0
modelscope/models/cv/face_generation/stylegan2.py View File

@@ -1,3 +1,5 @@
# The implementation is adopted from stylegan2-pytorch,
# made public available under the MIT License at https://github.com/rosinality/stylegan2-pytorch/blob/master/model.py
import functools
import math
import operator


+ 2
- 0
modelscope/models/cv/image_colorization/unet.py View File

@@ -1,3 +1,5 @@
# The implementation here is modified based on DeOldify, originally MIT License
# and publicly available at https://github.com/jantic/DeOldify/blob/master/deoldify/unet.py
import numpy as np
import torch
import torch.nn as nn


+ 2
- 0
modelscope/models/cv/image_colorization/utils.py View File

@@ -1,3 +1,5 @@
# The implementation here is modified based on DeOldify, originally MIT License and
# publicly available at https://github.com/jantic/DeOldify/blob/master/fastai/callbacks/hooks.py
import functools
from enum import Enum



+ 2
- 0
modelscope/models/cv/image_portrait_enhancement/align_faces.py View File

@@ -1,3 +1,5 @@
# Part of the implementation is borrowed and modified from Face-Alignment,
# publicly available at https://github.com/foamliu/Face-Alignment/blob/master/align_faces.py
import cv2
import numpy as np
from skimage import transform as trans


+ 1
- 0
modelscope/models/cv/image_portrait_enhancement/eqface/fqa.py View File

@@ -1,3 +1,4 @@
# Copyright (c) Alibaba, Inc. and its affiliates.
import os

import cv2


+ 2
- 0
modelscope/models/cv/image_portrait_enhancement/eqface/model_resnet.py View File

@@ -1,3 +1,5 @@
# The implementation is adopted from FaceQuality, made publicly available under the MIT License
# at https://github.com/deepcam-cn/FaceQuality/blob/master/models/model_resnet.py
import torch
from torch import nn



+ 2
- 0
modelscope/models/cv/image_portrait_enhancement/gpen.py View File

@@ -1,3 +1,5 @@
# The GPEN implementation is also open-sourced by the authors,
# and available at https://github.com/yangxy/GPEN/blob/main/face_model/gpen_model.py
import functools
import itertools
import math


+ 1
- 0
modelscope/models/cv/image_portrait_enhancement/image_portrait_enhancement.py View File

@@ -1,3 +1,4 @@
# Copyright (c) Alibaba, Inc. and its affiliates.
import math
import os.path as osp
from copy import deepcopy


+ 2
- 0
modelscope/models/cv/image_portrait_enhancement/losses/helpers.py View File

@@ -1,3 +1,5 @@
# The implementation is adopted from InsightFace_Pytorch,
# made publicly available under the MIT License at https://github.com/TreB1eN/InsightFace_Pytorch/blob/master/model.py
from collections import namedtuple

import torch


+ 2
- 0
modelscope/models/cv/image_portrait_enhancement/losses/losses.py View File

@@ -1,3 +1,5 @@
# The GPEN implementation is also open-sourced by the authors,
# and available at https://github.com/yangxy/GPEN/tree/main/training/loss/id_loss.py
import torch
import torch.nn as nn
import torch.nn.functional as F


+ 2
- 0
modelscope/models/cv/image_portrait_enhancement/losses/model_irse.py View File

@@ -1,3 +1,5 @@
# The implementation is adopted from InsightFace_Pytorch,
# made publicly available under the MIT License at https://github.com/TreB1eN/InsightFace_Pytorch/blob/master/model.py
from torch.nn import (BatchNorm1d, BatchNorm2d, Conv2d, Dropout, Linear,
Module, PReLU, Sequential)



+ 2
- 0
modelscope/models/cv/image_portrait_enhancement/retinaface/detection.py View File

@@ -1,3 +1,5 @@
# The GPEN implementation is also open-sourced by the authors,
# and available at https://github.com/yangxy/GPEN/blob/main/face_detect/retinaface_detection.py
import os

import cv2


+ 2
- 0
modelscope/models/cv/image_portrait_enhancement/retinaface/models/net.py View File

@@ -1,3 +1,5 @@
# The implementation is adopted from Pytorch_Retinaface, made pubicly available under the MIT License
# at https://github.com/biubug6/Pytorch_Retinaface/tree/master/models/net.py
import time

import torch


+ 2
- 0
modelscope/models/cv/image_portrait_enhancement/retinaface/models/retinaface.py View File

@@ -1,3 +1,5 @@
# The implementation is adopted from Pytorch_Retinaface, made pubicly available under the MIT License
# at https://github.com/biubug6/Pytorch_Retinaface/tree/master/models/retinaface.py
from collections import OrderedDict

import torch


+ 2
- 0
modelscope/models/cv/super_resolution/arch_util.py View File

@@ -1,3 +1,5 @@
# The implementation is adopted from BasicSR, made public available under the Apache 2.0 License
# at https://github.com/XPixelGroup/BasicSR/blob/master/basicsr/archs/arch_util.py
import collections.abc
import math
import warnings


+ 2
- 0
modelscope/models/cv/super_resolution/rrdbnet_arch.py View File

@@ -1,3 +1,5 @@
# The implementation is adopted from BasicSR, made public available under the Apache 2.0 License
# at https://github.com/XPixelGroup/BasicSR/blob/master/basicsr/archs/rrdbnet_arch.py
import torch
from torch import nn as nn
from torch.nn import functional as F


Loading…
Cancel
Save