Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- set "FACE_IMG="
- set "OUTPUT_DIR=output"
- if "%~1"=="" (
- echo Pass at least one picture!
- pause
- goto :eof
- )
- echo Path to face image:
- set /p "FACE_IMG="
- for %%i in ("%FACE_IMG%") do (
- if "%%~xi"==".jpg" set "FACE_IMG=%%i"
- if "%%~xi"==".jpeg" set "FACE_IMG=%%i"
- if "%%~xi"==".png" set "FACE_IMG=%%i"
- )
- if not defined FACE_IMG goto wrong_args
- echo Face image file is: %FACE_IMG%
- call %userprofile%\anaconda3\Scripts\activate.bat %userprofile%\anaconda3
- cd %~dp0
- call activate simswap
- :swap_picture
- echo Swapping picture: %~nx1
- if not exist "%OUTPUT_DIR%\%~n1\" mkdir "%OUTPUT_DIR%\%~n1"
- call python test_wholeimage_swapmulti.py --isTrain false --name people --Arc_path arcface_model/arcface_checkpoint.tar --temp_path ./temp_results ^
- --pic_a_path %FACE_IMG% ^
- --pic_b_path %~1 ^
- --output_path "./%OUTPUT_DIR%/%~n1/"
- shift
- if not "%~1"=="" goto :swap_picture
- if exist %~dp0%OUTPUT_DIR%\ call explorer /select,%~dp0%OUTPUT_DIR%\
- goto :eof
- :wrong_args
- echo No face image provided^!
- echo Args: %~1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement