diff --git a/modules/image/Image_gan/gan/photopen/model.py b/modules/image/Image_gan/gan/photopen/model.py index f9e517ec1de880a62f0fcb1e0c14ded2f58dc33e..4a0b0a4836b010ca4d72995c8857a8bb0ddd7aa2 100644 --- a/modules/image/Image_gan/gan/photopen/model.py +++ b/modules/image/Image_gan/gan/photopen/model.py @@ -11,17 +11,16 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +import os -from PIL import Image, ImageOps import cv2 import numpy as np -import os - import paddle - +from PIL import Image +from PIL import ImageOps from ppgan.models.generators import SPADEGenerator -from ppgan.utils.photopen import data_onehot_pro from ppgan.utils.filesystem import load +from ppgan.utils.photopen import data_onehot_pro class PhotoPenPredictor: diff --git a/modules/image/Image_gan/gan/photopen/module.py b/modules/image/Image_gan/gan/photopen/module.py index a099c5db78bd78eafed5a5a4cc866cf9caa7bc09..4ff21cebf1a114896667ac4f658b6a84e6c795aa 100644 --- a/modules/image/Image_gan/gan/photopen/module.py +++ b/modules/image/Image_gan/gan/photopen/module.py @@ -11,22 +11,24 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - -import os import argparse import copy +import os -import paddle -import paddlehub as hub -from paddlehub.module.module import moduleinfo, runnable, serving -import numpy as np import cv2 -from skimage.io import imread -from skimage.transform import rescale, resize +import numpy as np +import paddle from ppgan.utils.config import get_config +from skimage.io import imread +from skimage.transform import rescale +from skimage.transform import resize +import paddlehub as hub from .model import PhotoPenPredictor from .util import base64_to_cv2 +from paddlehub.module.module import moduleinfo +from paddlehub.module.module import runnable +from paddlehub.module.module import serving @moduleinfo( diff --git a/modules/image/Image_gan/gan/photopen/util.py b/modules/image/Image_gan/gan/photopen/util.py index b88ac3562b74cadc1d4d6459a56097ca4a938a0b..531a0ae0d487822a870ba7f09817e658967aff10 100644 --- a/modules/image/Image_gan/gan/photopen/util.py +++ b/modules/image/Image_gan/gan/photopen/util.py @@ -1,4 +1,5 @@ import base64 + import cv2 import numpy as np