{"id":17526,"date":"2025-01-07T12:39:29","date_gmt":"2025-01-07T04:39:29","guid":{"rendered":"https:\/\/www.aisharenet.com\/?p=17526"},"modified":"2025-01-07T12:39:29","modified_gmt":"2025-01-07T04:39:29","slug":"shmt","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/de\/shmt\/","title":{"rendered":"SHMT\uff1a\u81ea\u76d1\u7763\u5206\u5c42\u5316\u5986\u8f6c\u79fb\u6a21\u578b\uff0c\u865a\u62df\u5316\u5986\uff0c\u5c06\u5986\u5bb9\u8fc1\u79fb\u5230\u65b0\u7684\u4eba\u50cf\u4e2d"},"content":{"rendered":"<p>SHMT\uff08Self-supervised Hierarchical Makeup Transfer\uff09\u662f\u4e00\u4e2a\u57fa\u4e8e\u6f5c\u5728\u6269\u6563\u6a21\u578b\u7684\u81ea\u6211\u76d1\u7763\u5206\u5c42\u5316\u5986\u8fc1\u79fb\u9879\u76ee\uff0c\u65e8\u5728\u901a\u8fc7\u65e0\u76d1\u7763\u5b66\u4e60\u65b9\u6cd5\u5b9e\u73b0\u5316\u5986\u6548\u679c\u7684\u9ad8\u8d28\u91cf\u8fc1\u79fb\u3002\u8be5\u9879\u76ee\u91c7\u7528\u201c\u89e3\u8026\u4e0e\u91cd\u5efa\u201d\u8303\u5f0f\uff0c\u6452\u5f03\u4e86\u4e0d\u51c6\u786e\u7684\u4f2a\u914d\u5bf9\u6570\u636e\u5e26\u6765\u7684\u8bef\u5bfc\u3002\u540c\u65f6\uff0c\u4e3a\u4e86\u9002\u5e94\u591a\u6837\u5316\u7684\u5316\u5986\u98ce\u683c\uff0c\u901a\u8fc7\u62c9\u666e\u62c9\u65af\u91d1\u5b57\u5854\u5206\u89e3\u5c42\u6b21\u7eb9\u7406\u7ec6\u8282\uff0c\u5e76\u9009\u62e9\u6027\u5730\u5f15\u5165\u5230\u5185\u5bb9\u8868\u793a\u4e2d\u3002SHMT\u9879\u76ee\u7684\u7814\u7a76\u6210\u679c\u5df2\u5728NeurIPS 2024\u53d1\u8868\uff0c\u5c55\u793a\u4e86\u5728\u5904\u7406\u7b80\u5355\u548c\u590d\u6742\u5316\u5986\u98ce\u683c\u65f6\u7684\u51fa\u8272\u6548\u679c\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-17527\" title=\"SHMT\uff1a\u8fdb\u884c\u81ea\u6211\u76d1\u7763\u5206\u5c42\u5316\u5986\u8fc1\u79fb\uff0c\u5986\u5bb9\u8fc1\u79fb\u5230\u5176\u4ed6-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/01\/9b44418e52b194d.jpg\" alt=\"SHMT\uff1a\u8fdb\u884c\u81ea\u6211\u76d1\u7763\u5206\u5c42\u5316\u5986\u8fc1\u79fb\uff0c\u5986\u5bb9\u8fc1\u79fb\u5230\u5176\u4ed6-1\" width=\"1199\" height=\"548\" srcset=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/01\/9b44418e52b194d.jpg 1199w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/01\/9b44418e52b194d-300x137.jpg 300w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/01\/9b44418e52b194d-1024x468.jpg 1024w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/01\/9b44418e52b194d-768x351.jpg 768w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2025\/01\/9b44418e52b194d-18x8.jpg 18w\" sizes=\"auto, (max-width: 1199px) 100vw, 1199px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>\u529f\u80fd\u5217\u8868<\/h2>\n<ul>\n<li>\u81ea\u6211\u76d1\u7763\u5b66\u4e60\uff1a\u65e0\u9700\u914d\u5bf9\u6570\u636e\u5373\u53ef\u5b9e\u73b0\u5316\u5986\u8fc1\u79fb\u3002<\/li>\n<li>\u5206\u5c42\u7eb9\u7406\u7ec6\u8282\uff1a\u5229\u7528\u62c9\u666e\u62c9\u65af\u91d1\u5b57\u5854\u5206\u89e3\u548c\u91cd\u5efa\u7eb9\u7406\u7ec6\u8282\u3002<\/li>\n<li>\u9ad8\u6548\u8fc1\u79fb\uff1a\u5728\u5904\u7406\u591a\u79cd\u5316\u5986\u98ce\u683c\u65f6\u4fdd\u6301\u9ad8\u6548\u548c\u9ad8\u8d28\u91cf\u3002<\/li>\n<li>\u591a\u6837\u5316\u5e94\u7528\uff1a\u9002\u7528\u4e8e\u56fe\u50cf\u5904\u7406\u3001\u98ce\u683c\u8fc1\u79fb\u3001\u8ba1\u7b97\u673a\u89c6\u89c9\u7b49\u591a\u4e2a\u9886\u57df\u3002<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>\u4f7f\u7528\u5e2e\u52a9<\/h2>\n<h3>\u5b89\u88c5\u6d41\u7a0b<\/h3>\n<ol>\n<li>\u514b\u9686SHMT\u9879\u76ee\u4ed3\u5e93\uff1a\n<pre><code>git clone https:\/\/github.com\/Snowfallingplum\/SHMT.git\r\ncd SHMT\r\n<\/code><\/pre>\n<\/li>\n<\/ol>\n<pre><code>\r\n2. \u521b\u5efa\u5e76\u6fc0\u6d3b\u865a\u62df\u73af\u5883\uff1a\r\n```bash\r\npython -m venv venv\r\nsource venv\/bin\/activate       # on Windows use `venv\\Scripts\\activate`\r\n<\/code><\/pre>\n<ol start=\"3\">\n<li>\u5b89\u88c5\u9879\u76ee\u4f9d\u8d56\uff1a\n<pre><code>pip install -r requirements.txt\r\n<\/code><\/pre>\n<\/li>\n<li>\uff08\u53ef\u9009\uff09\u5b89\u88c5CUDA\u4ee5\u652f\u6301GPU\u52a0\u901f\u3002<\/li>\n<\/ol>\n<h3>\u4f7f\u7528\u6559\u7a0b<\/h3>\n<h4>1. \u8fd0\u884c\u4e3b\u7a0b\u5e8f<\/h4>\n<p>\u4e3b\u7a0b\u5e8f\u4f4d\u4e8e<code>main.py<\/code>\u6587\u4ef6\u4e2d\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5373\u53ef\u542f\u52a8\uff1a<\/p>\n<pre><code>python main.py --input your_image_path --style your_desired_style\r\n<\/code><\/pre>\n<p>\u4e0a\u8ff0\u547d\u4ee4\u4e2d\uff0c<code>--input<\/code>\u53c2\u6570\u6307\u5b9a\u8f93\u5165\u56fe\u50cf\u8def\u5f84\uff0c<code>--style<\/code>\u53c2\u6570\u6307\u5b9a\u76ee\u6807\u5316\u5986\u98ce\u683c\u3002<\/p>\n<h4>2. \u7ec6\u8282\u8c03\u6574<\/h4>\n<p>\u5728<code>config.yaml<\/code>\u6587\u4ef6\u4e2d\uff0c\u53ef\u4ee5\u8c03\u6574\u6a21\u578b\u53c2\u6570\u548c\u7ec6\u8282\u8bbe\u7f6e\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u8c03\u6574\u62c9\u666e\u62c9\u65af\u91d1\u5b57\u5854\u7684\u5c42\u6570\u548c\u91cd\u5efa\u7ec6\u8282\u7684\u5f3a\u5ea6\u3002<\/p>\n<h4>3. \u7ed3\u679c\u8f93\u51fa<\/h4>\n<p>\u8fd0\u884c\u4e3b\u7a0b\u5e8f\u540e\uff0c\u7ed3\u679c\u5c06\u4fdd\u5b58\u5728\u6307\u5b9a\u7684\u8f93\u51fa\u6587\u4ef6\u5939\u4e2d\u3002\u53ef\u4ee5\u901a\u8fc7\u56fe\u50cf\u67e5\u770b\u5de5\u5177\u6253\u5f00\u5e76\u67e5\u770b\u5316\u5986\u8fc1\u79fb\u6548\u679c\u3002<\/p>\n<h3>\u793a\u4f8b<\/h3>\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b\u4ee3\u7801\uff1a<\/p>\n<pre><code>from shmt import SHMT\r\n# \u521d\u59cb\u5316\u6a21\u578b\r\nmodel = SHMT()\r\n# \u52a0\u8f7d\u8f93\u5165\u56fe\u50cf\u548c\u76ee\u6807\u98ce\u683c\r\ninput_image = 'path\/to\/input\/image.jpg'\r\nstyle = 'glamorous'\r\n# \u8fdb\u884c\u5316\u5986\u8fc1\u79fb\r\noutput_image = model.transfer(input_image, style)\r\n# \u4fdd\u5b58\u7ed3\u679c\r\noutput_image.save('path\/to\/output\/image.jpg')\r\n<\/code><\/pre>\n<h3>\u5e38\u89c1\u95ee\u9898<\/h3>\n<ol>\n<li><strong>\u5982\u4f55\u5904\u7406\u8f93\u5165\u56fe\u50cf\u8d28\u91cf\u4e0d\u9ad8\u7684\u95ee\u9898\uff1f<\/strong><br \/>\n\u786e\u4fdd\u8f93\u5165\u56fe\u50cf\u6e05\u6670\u3001\u9ad8\u5206\u8fa8\u7387\u3002\u4f4e\u8d28\u91cf\u56fe\u50cf\u53ef\u80fd\u5f71\u54cd\u5316\u5986\u8fc1\u79fb\u6548\u679c\u3002<\/li>\n<li><strong>\u5982\u4f55\u8c03\u6574\u5316\u5986\u98ce\u683c\u7684\u5f3a\u5ea6\uff1f<\/strong><br \/>\n\u5728\u914d\u7f6e\u6587\u4ef6<code>config.yaml<\/code>\u4e2d\u8c03\u6574\u76f8\u5173\u53c2\u6570\uff0c\u4f8b\u5982<code>style_strength<\/code>\u3002<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>SHMT\uff08Self-supervised Hierarchical Makeup Transfer\uff09\u662f\u4e00\u4e2a\u57fa\u4e8e\u6f5c\u5728\u6269\u6563\u6a21\u578b\u7684\u81ea\u6211\u76d1\u7763\u5206\u5c42\u5316\u5986\u8fc1\u79fb\u9879\u76ee\uff0c\u65e8\u5728\u901a\u8fc7\u65e0\u76d1\u7763\u5b66\u4e60\u65b9\u6cd5\u5b9e\u73b0\u5316\u5986\u6548\u679c\u7684\u9ad8\u8d28\u91cf\u8fc1\u79fb\u3002\u8be5\u9879\u76ee\u91c7\u7528\u201c\u89e3\u8026\u4e0e\u91cd\u5efa\u201d\u8303\u5f0f\uff0c\u6452\u5f03\u4e86\u4e0d\u51c6\u786e&#8230;<\/p>\n","protected":false},"author":1,"featured_media":61579,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[230,220],"class_list":["post-17526","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tool","tag-aikaiyuanxiangmu","tag-aihuanlianyuhuanzhuang"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts\/17526","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/comments?post=17526"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts\/17526\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/media\/61579"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/media?parent=17526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/categories?post=17526"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/tags?post=17526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}