Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import sys
- usingBat=1
- if sys.argv[0]!="" and len(sys.argv)!=3:
- input("Drag and drop image and video")
- exit()
- file=os.path.dirname(sys.argv[0])+"\\queue.bat"
- output_file=f"{os.path.splitext(os.path.basename(sys.argv[1]))[0]}_{os.path.basename(sys.argv[2])}"
- with open(file,"a") as f:
- if os.path.getsize(file) < 2:
- if not usingBat:
- f.write("cd ..\n")
- f.write("echo break^>\"%%~f0\">>\"%~f0\"\n")
- if usingBat:
- f.write("drop_here_to_edit.py \"{0}\" \"{1}\"\n".format(sys.argv[1],sys.argv[2]))
- else:
- f.write("python test_video_swapsingle.py --isTrain false --name people --Arc_path arcface_model/arcface_checkpoint.tar --pic_a_path \"{0}\" --video_path \"{1}\" --output_path \"./output/{2}\" --temp_path ./temp_results\n".format(sys.argv[1],sys.argv[2],output_file))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement