提交 52cc814f 编写于 作者: L LielinJiang

clean code

上级 e8f33934
...@@ -15,11 +15,7 @@ ...@@ -15,11 +15,7 @@
import argparse import argparse
import paddle import paddle
from ppgan.apps.dain_predictor import DAINPredictor from ppgan.apps import DAINPredictor, DeepRemasterPredictor, DeOldifyPredictor, RealSRPredictor, EDVRPredictor
from ppgan.apps.deepremaster_predictor import DeepReasterPredictor
from ppgan.apps.deoldify_predictor import DeOldifyPredictor
from ppgan.apps.realsr_predictor import RealSRPredictor
from ppgan.apps.edvr_predictor import EDVRPredictor
parser = argparse.ArgumentParser(description='Fix video') parser = argparse.ArgumentParser(description='Fix video')
parser.add_argument('--input', type=str, default=None, help='Input video') parser.add_argument('--input', type=str, default=None, help='Input video')
...@@ -97,7 +93,7 @@ if __name__ == "__main__": ...@@ -97,7 +93,7 @@ if __name__ == "__main__":
frames_path, temp_video_path = predictor.run(temp_video_path) frames_path, temp_video_path = predictor.run(temp_video_path)
paddle.disable_static() paddle.disable_static()
elif order == 'DeepRemaster': elif order == 'DeepRemaster':
predictor = DeepReasterPredictor( predictor = DeepRemasterPredictor(
args.output, args.output,
weight_path=args.DeepRemaster_weight, weight_path=args.DeepRemaster_weight,
colorization=args.colorization, colorization=args.colorization,
......
from .dain_predictor import DAINPredictor
from .deepremaster_predictor import DeepRemasterPredictor
from .deoldify_predictor import DeOldifyPredictor
from .realsr_predictor import RealSRPredictor
from .edvr_predictor import EDVRPredictor
...@@ -64,7 +64,7 @@ def addMergin(img, target_w, target_h, background_color=(0, 0, 0)): ...@@ -64,7 +64,7 @@ def addMergin(img, target_w, target_h, background_color=(0, 0, 0)):
return result return result
class DeepReasterPredictor(BasePredictor): class DeepRemasterPredictor(BasePredictor):
def __init__(self, def __init__(self,
output='output', output='output',
weight_path=None, weight_path=None,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册