{"id":62,"date":"2024-01-09T16:34:33","date_gmt":"2024-01-09T08:34:33","guid":{"rendered":"https:\/\/hali.life\/?p=62"},"modified":"2024-01-09T16:44:01","modified_gmt":"2024-01-09T08:44:01","slug":"%e3%80%90roop%e3%80%91%e6%8d%a2%e8%84%b8%e5%a4%a7%e5%8d%87%e7%ba%a7%ef%bc%8c%e9%ab%98%e6%b8%85%e6%8d%a2%e8%84%b8%ef%bc%8c%e5%a4%9a%e4%ba%ba%e6%8d%a2%e8%84%b8%ef%bc%8c%e6%91%84%e5%83%8f%e5%a4%b4","status":"publish","type":"post","link":"https:\/\/hali.life\/?p=62","title":{"rendered":"\u3010Roop\u3011\u6362\u8138\u5927\u5347\u7ea7\uff0c\u9ad8\u6e05\u6362\u8138\uff0c\u591a\u4eba\u6362\u8138\uff0c\u6444\u50cf\u5934\u76f4\u64ad\u6362\u8138\u3002"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">\u6559\u5b66\u89c6\u9891<\/h1>\n\n\n\n<p>B\u7ad9\uff1a<a href=\"https:\/\/www.bilibili.com\/video\/BV1Mu4y1e7sr\/\">https:\/\/www.bilibili.com\/video\/BV1Mu4y1e7sr\/<\/a><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u524d\u8a00<\/h1>\n\n\n\n<p>\u4e4b\u524d\u505a\u8fc7Roop v1.0\u7248\u672c\u7684\u6559\u7a0b\uff0c\u73b0\u5728Roop\u7248\u672c\u5df2\u7ecf\u66f4\u65b0\u52301.3.2\uff0c\u6bd41.0\u6548\u679c\u5927\u5927\u63d0\u5347\uff0c\u5e76\u4e14\u591a\u4e86\u8bb8\u591a\u529f\u80fd\u3002<br>\u4f46\u662f\uff0croop\u7684\u4f5c\u8005\u4f3c\u4e4e\u51fa\u4e8e\u9053\u5fb7\u538b\u529b\u5df2\u7ecf\u5ba3\u5e03\u4e0d\u4f1a\u518d\u7ee7\u7eed\u66f4\u65b0\u8fd9\u4e2a\u9879\u76ee\u4e86\uff0c\u4e0d\u8fc7\u803d\u8bef\u6211\u4eec\u4f7f\u7528\u4ed6\u7559\u7ed9\u6211\u4eec\u7684\u9057\u4ea7\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u524d\u671f\u51c6\u5907<\/h1>\n\n\n\n<h5 class=\"wp-block-heading\">\u4e00\u3001 python\u73af\u5883<\/h5>\n\n\n\n<p>\u9700\u8981\u4f60\u7684\u7535\u8111\u5b89\u88c5python3.10\u4ee5\u4e0a\u7684\u73af\u5883\uff0c\u6ca1\u6709\u7684\u8bdd\u79fb\u6b65<a href=\"https:\/\/www.python.org\/downloads\/\"><strong>python\u5b98\u7f51\u4e0b\u8f7d<\/strong><\/a><\/p>\n\n\n\n<h5 class=\"wp-block-heading\">\u4e8c\u3001 roop\u4ee3\u7801<\/h5>\n\n\n\n<p>\u53ef\u4ee5<a href=\"https:\/\/codeload.github.com\/s0md3v\/roop\/zip\/refs\/heads\/main\"><strong>\u70b9\u51fb\u6b64\u5904\u4e0b\u8f7droop\u4ee3\u7801<\/strong><\/a>\uff0c\u4e5f\u53ef\u4ee5\u5728github\u4e2d\u81ea\u884c\u4e0b\u8f7d<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>GitHub roop\u5730\u5740\uff1a https:\/\/github.com\/s0md3v\/roop<\/p>\n<\/blockquote>\n\n\n\n<h5 class=\"wp-block-heading\">\u4e09\u3001\u5b89\u88c5ffmpeg<\/h5>\n\n\n\n<p>\u5230ffmpeg\u4e0b\u8f7d6.0\u7248\u672c\u7684\u538b\u7f29\u5305\uff0cffmepg\u4e0d\u9700\u8981\u5b89\u88c5\uff0c\u538b\u7f29\u5305\u91cc\u6709\u5bf9\u5e94\u7684exe\u6587\u4ef6\uff0c\u4e0b\u8f7d\u540e\u5c06exe\u6587\u4ef6\u952e\u5165\u73af\u5883\u53d8\u91cf\u3002<a href=\"https:\/\/ffmpeg.org\/download.html\"><strong>ffmepg\u5b98\u7f51\u4e0b\u8f7d\u5730\u5740<\/strong><\/a><\/p>\n\n\n\n<h5 class=\"wp-block-heading\">\u56db\u3001 Nvidia CUDA \u5b89\u88c5 (\u5982\u679c\u4f60\u6ca1\u6709\u663e\u5361\u6216\u4e0d\u7528\u663e\u5361 \u8bf7\u5ffd\u7565)<\/h5>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u4e0b\u8f7d<a href=\"https:\/\/developer.nvidia.com\/cuda-11-8-0-download-archive\"><strong>CUDA Toolkit 11.8 Downloads<\/strong><\/a> \u6839\u636e\u81ea\u8eab\u64cd\u4f5c\u7cfb\u7edf\u8fdb\u884c\u9009\u62e9<\/li>\n\n\n\n<li>\u4e0b\u8f7d <a href=\"https:\/\/developer.nvidia.com\/rdp\/cudnn-archive\"><strong>cuDNN for Cuda 11.x<\/strong><\/a> \u6ce8\u610f\u8981\u9009\u62e9 for CUDA 11.X \u7684<\/li>\n<\/ol>\n\n\n\n<h5 class=\"wp-block-heading\">\u4e94\u3001 \u4e00\u4e2a\u5728\u4f7f\u7528\u6444\u50cf\u5934\u6362\u8138\u65f6\u8981\u7528\u5230\u7684python\u811a\u672c (\u4e0d\u4f7f\u7528\u672c\u529f\u80fd\u8bf7\u5ffd\u7565)<\/h5>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u5938\u514b\u94fe\u63a5\uff1ahttps:\/\/pan.quark.cn\/s\/c4f53c91bd6a<\/p>\n<\/blockquote>\n\n\n\n<h1 class=\"wp-block-heading\">\u5b89\u88c5<\/h1>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e00\u3001\u8fdb\u5165roop\u4ee3\u7801\u6587\u4ef6\u5939<\/h3>\n\n\n\n<p>\u5b89\u88c5pip\u63d2\u4ef6<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>pip install -r requirements.txt<br>\u9996\u6b21\u5b89\u88c5\u4f1a\u4e0b\u8f7d\u4e00\u4e2a\u6a21\u578binswapper_128.onnx\uff0c\u5982\u679c\u4e0b\u8f7d\u592a\u6162\u53ef\u4ee5\u5728\u6211\u7684\u7f51\u76d8\u4e2d\u4e0b\u8f7d<br>\u5938\u514b\u94fe\u63a5\uff1ahttps:\/\/pan.quark.cn\/s\/c4f53c91bd6a<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e8c\u3001\u4f7f\u7528 CPU<\/h3>\n\n\n\n<p>\u597d\u5904\uff1a\u5b89\u88c5\u7b80\u5355<br>\u574f\u5904\uff1a\u8fd0\u884c\u975e\u5e38\u6162<br>\u53ea\u9700\u8fd0\u884c<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>python run.py<\/p>\n<\/blockquote>\n\n\n\n<p>\u5c31\u53ef\u4ee5\u5f00\u59cb\u4f7f\u7528\u4e86\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e09\u3001\u4f7f\u7528 GPU<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u5b89\u88c5\u4e4b\u524d\u4e0b\u8f7d\u7684 CUDA Toolkit 11.8<\/li>\n\n\n\n<li>\u89e3\u538b\u4e4b\u524d\u4e0b\u8f7d\u7684 cuDNN for Cuda 11.x<\/li>\n\n\n\n<li>\u5c06cuDNN for Cuda 11.x\u89e3\u538b\u540e\u4e2d\u7684 bin include lib \u4e09\u4e2a\u6587\u4ef6\u5939\u4e2d\u7684\u5185\u5bb9\uff0c\u4f9d\u6b21\u5bf9\u5e94\u7684\u590d\u5236\u5230 CUDA Toolkit 11.8 \u5b89\u88c5\u7684\u76ee\u5f55\u4e2d\u5bf9\u5e94\u7684 bin include lib \u4e2d\u3002 \u6211\u7684CUDA Toolkit 11.8\u5b89\u88c5\u8def\u5f84\u662f \uff1a C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8 \u8bf7\u4f60\u518d\u81ea\u5df1\u5bf9\u5e94\u7684\u5b89\u88c5\u8def\u5f84\u53bb\u627e<\/li>\n<\/ol>\n\n\n\n<p><strong>\u4f7f\u7528GPU\u9700\u8981\u7528\u5982\u4e0b\u547d\u4ee4<\/strong><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>python run.py &#8211;execution-provider cuda<\/p>\n<\/blockquote>\n\n\n\n<p>\u4e0d\u8fc7\u6211\u5f3a\u70c8\u5efa\u8bae\u4f60\u589e\u52a0\u4ee5\u4e0b\u53c2\u6570\uff0c\u4f60\u4f1a\u5f97\u5230\u66f4\u597d\u7684\u6548\u679c<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>--temp-frame-format jpg   \u7701\u786c\u76d8\u63a7\u4ef6\uff0c\u52a0\u5feb\u901f\u5ea6\n--framw-processor face_swapper face_enhancer \u4eba\u8138\u9ad8\u6e05\u6a21\u578b,\u4f7f\u7528\u65f6\u4eba\u8138\u53ef\u80fd\u51fa\u73b0\u95ea\u70c1\n--similar-face-distance 1.5  \u76f8\u4f3c\u5ea6 \u5982\u679c\u4eba\u8138\u51fa\u73b0\u95ea\u70c1\uff0c\u8bf7\u8c03\u5927\u6b64\u53c2\u6570\n--reference-face-position 3   \u9009\u62e9\u9700\u8981\u66f4\u6362\u7684\u4eba\u8138 \u4ece\u53f3\u5f00\u59cb\n--reference-frame-number 166   \u9009\u62e9\u5e27<\/code><\/pre>\n\n\n\n<p><strong>\u7528\u8fd9\u4e2a\u547d\u4ee4<\/strong><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>python run.py &#8211;execution-provider cuda &#8211;temp-frame-format jpg &#8211;frame-processor face_swapper face_enhancer<\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u6559\u5b66\u89c6\u9891 B\u7ad9\uff1ahttps:\/\/www.bilibili.com\/video\/BV1Mu4y1e7sr\/ \u524d\u8a00&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":66,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,1],"tags":[],"class_list":["post-62","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-uncategorized"],"views":8340,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/hali.life\/index.php?rest_route=\/wp\/v2\/posts\/62","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hali.life\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hali.life\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hali.life\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hali.life\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=62"}],"version-history":[{"count":2,"href":"https:\/\/hali.life\/index.php?rest_route=\/wp\/v2\/posts\/62\/revisions"}],"predecessor-version":[{"id":65,"href":"https:\/\/hali.life\/index.php?rest_route=\/wp\/v2\/posts\/62\/revisions\/65"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hali.life\/index.php?rest_route=\/wp\/v2\/media\/66"}],"wp:attachment":[{"href":"https:\/\/hali.life\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=62"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hali.life\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=62"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hali.life\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=62"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}