{"id":2446,"date":"2019-02-27T22:21:27","date_gmt":"2019-02-27T14:21:27","guid":{"rendered":"https:\/\/yanjingang.com\/blog\/?p=2446"},"modified":"2019-04-30T11:02:27","modified_gmt":"2019-04-30T03:02:27","slug":"%e5%b0%8f%e7%8c%aa%e5%ad%a6ai-%e5%b8%b8%e8%a7%81%e7%9a%84%e5%9b%be%e5%83%8f%e7%94%9f%e6%88%90%e5%99%a8","status":"publish","type":"post","link":"https:\/\/yanjingang.com\/blog\/?p=2446","title":{"rendered":"\u5c0f\u732a\u5b66AI\u2014\u56fe\u50cf\u751f\u6210\u539f\u7406\u4e0e\u5e94\u7528"},"content":{"rendered":"<h1>\u6982\u8ff0<\/h1>\n<p>\u6700\u8fd1\u66ff\u6362\u89c6\u9891\u4e2d\u7684\u4eba\u8138\u6bd4\u8f83\u706b\uff0c\u6d89\u53ca\u7684\u6280\u672f\u4e3b\u8981\u662f\u56fe\u50cf\u751f\u6210\uff0c\u4e3b\u8981\u91c7\u7528\u751f\u6210\u5f0f\u5bf9\u6297\u7f51\u7edc\uff08GAN, Generative Adversarial Networks \uff09\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b\u3002GAN\u662f\u8fd1\u5e74\u6765\u590d\u6742\u5206\u5e03\u4e0a\u65e0\u76d1\u7763\u5b66\u4e60\u6700\u5177\u524d\u666f\u7684\u65b9\u6cd5\u4e4b\u4e00\u3002\u6a21\u578b\u901a\u8fc7\u6846\u67b6\u4e2d\uff08\u81f3\u5c11\uff09\u4e24\u4e2a\u6a21\u5757\uff1a\u751f\u6210\u6a21\u578b\uff08Generative Model\uff09\u548c\u5224\u522b\u6a21\u578b\uff08Discriminative Model\uff09\u7684\u4e92\u76f8\u535a\u5f08\u5b66\u4e60\u4ea7\u751f\u76f8\u5f53\u597d\u7684\u8f93\u51fa\u3002<br \/>\n\u672c\u6587\u57fa\u4e8eDeepfakes Faceswap\u5b9e\u73b0\u4e86\u4e00\u4e2a\u7b80\u5355\u7684\u56fe\u7247\u6362\u8138\u8fc7\u7a0b\u3002<\/p>\n<h1>GAN<\/h1>\n<div class=\"para\">\n<div class=\"lemma-picture text-pic layout-right\">\n<p>\u751f\u6210\u5f0f\u5bf9\u6297\u7f51\u7edc\uff08GAN, Generative Adversarial Networks \uff09\u662f\u4e00\u79cd\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b\uff0c\u662f\u8fd1\u5e74\u6765\u590d\u6742\u5206\u5e03\u4e0a\u65e0\u76d1\u7763\u5b66\u4e60\u6700\u5177\u524d\u666f\u7684\u65b9\u6cd5\u4e4b\u4e00\u3002\u6a21\u578b\u901a\u8fc7\u6846\u67b6\u4e2d\uff08\u81f3\u5c11\uff09\u4e24\u4e2a\u6a21\u5757\uff1a\u751f\u6210\u6a21\u578b\uff08Generative Model\uff09\u548c\u5224\u522b\u6a21\u578b\uff08Discriminative Model\uff09\u7684\u4e92\u76f8\u535a\u5f08\u5b66\u4e60\u4ea7\u751f\u76f8\u5f53\u597d\u7684\u8f93\u51fa\u3002\u539f\u59cb GAN \u7406\u8bba\u4e2d\uff0c\u5e76\u4e0d\u8981\u6c42 G \u548c D \u90fd\u662f\u795e\u7ecf\u7f51\u7edc\uff0c\u53ea\u9700\u8981\u662f\u80fd\u62df\u5408\u76f8\u5e94\u751f\u6210\u548c\u5224\u522b\u7684\u51fd\u6570\u5373\u53ef\u3002\u4f46\u5b9e\u7528\u4e2d\u4e00\u822c\u5747\u4f7f\u7528\u6df1\u5ea6\u795e\u7ecf\u7f51\u7edc\u4f5c\u4e3a G \u548c D \u3002\u4e00\u4e2a\u4f18\u79c0\u7684GAN\u5e94\u7528\u9700\u8981\u6709\u826f\u597d\u7684\u8bad\u7ec3\u65b9\u6cd5\uff0c\u5426\u5219\u53ef\u80fd\u7531\u4e8e\u795e\u7ecf\u7f51\u7edc\u6a21\u578b\u7684\u81ea\u7531\u6027\u800c\u5bfc\u81f4\u8f93\u51fa\u4e0d\u7406\u60f3\u3002<\/p>\n<p>\u673a\u5668\u5b66\u4e60\u7684\u6a21\u578b\u53ef\u5927\u4f53\u5206\u4e3a\u4e24\u7c7b\uff0c\u751f\u6210\u6a21\u578b\uff08Generative Model\uff09\u548c\u5224\u522b\u6a21\u578b\uff08Discriminative Model\uff09\u3002\u5224\u522b\u6a21\u578b\u9700\u8981\u8f93\u5165\u53d8\u91cf \uff0c\u901a\u8fc7\u67d0\u79cd\u6a21\u578b\u6765\u9884\u6d4b \u3002\u751f\u6210\u6a21\u578b\u662f\u7ed9\u5b9a\u67d0\u79cd\u9690\u542b\u4fe1\u606f\uff0c\u6765\u968f\u673a\u4ea7\u751f\u89c2\u6d4b\u6570\u636e\u3002\u4e3e\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\uff0c<\/p>\n<ul>\n<li>\u5224\u522b\u6a21\u578b\uff1a\u7ed9\u5b9a\u4e00\u5f20\u56fe\uff0c\u5224\u65ad\u8fd9\u5f20\u56fe\u91cc\u7684\u52a8\u7269\u662f\u732b\u8fd8\u662f\u72d7<\/li>\n<li>\u751f\u6210\u6a21\u578b\uff1a\u7ed9\u4e00\u7cfb\u5217\u732b\u7684\u56fe\u7247\uff0c\u751f\u6210\u4e00\u5f20\u65b0\u7684\u732b\u54aa\uff08\u4e0d\u5728\u6570\u636e\u96c6\u91cc\uff09<\/li>\n<\/ul>\n<p>\u5bf9\u4e8e\u5224\u522b\u6a21\u578b\uff0c\u635f\u5931\u51fd\u6570\u662f\u5bb9\u6613\u5b9a\u4e49\u7684\uff0c\u56e0\u4e3a\u8f93\u51fa\u7684\u76ee\u6807\u76f8\u5bf9\u7b80\u5355\u3002\u4f46\u5bf9\u4e8e\u751f\u6210\u6a21\u578b\uff0c\u635f\u5931\u51fd\u6570\u7684\u5b9a\u4e49\u5c31\u4e0d\u662f\u90a3\u4e48\u5bb9\u6613\u3002\u6211\u4eec\u5bf9\u4e8e\u751f\u6210\u7ed3\u679c\u7684\u671f\u671b\uff0c\u5f80\u5f80\u662f\u4e00\u4e2a\u66a7\u6627\u4e0d\u6e05\uff0c\u96be\u4ee5\u6570\u5b66\u516c\u7406\u5316\u5b9a\u4e49\u7684\u8303\u5f0f\u3002\u6240\u4ee5\u4e0d\u59a8\u628a\u751f\u6210\u6a21\u578b\u7684\u56de\u9988\u90e8\u5206\uff0c\u4ea4\u7ed9\u5224\u522b\u6a21\u578b\u5904\u7406\u3002\u8fd9\u5c31\u662fGoodfellow\u4ed6\u5c06\u673a\u5668\u5b66\u4e60\u4e2d\u7684\u4e24\u5927\u7c7b\u6a21\u578b\uff0cGenerative\u548cDiscrimitive\u7ed9\u7d27\u5bc6\u5730\u8054\u5408\u5728\u4e86\u4e00\u8d77 \u3002<\/p>\n<p>GAN\u7684\u57fa\u672c\u539f\u7406\u5176\u5b9e\u975e\u5e38\u7b80\u5355\uff0c\u8fd9\u91cc\u4ee5\u751f\u6210\u56fe\u7247\u4e3a\u4f8b\u8fdb\u884c\u8bf4\u660e\u3002\u5047\u8bbe\u6211\u4eec\u6709\u4e24\u4e2a\u7f51\u7edc\uff0cG\uff08Generator\uff09\u548cD\uff08Discriminator\uff09\u3002\u6b63\u5982\u5b83\u7684\u540d\u5b57\u6240\u6697\u793a\u7684\u90a3\u6837\uff0c\u5b83\u4eec\u7684\u529f\u80fd\u5206\u522b\u662f\uff1a<\/p>\n<ul>\n<li>G\u662f\u4e00\u4e2a\u751f\u6210\u56fe\u7247\u7684\u7f51\u7edc\uff0c\u5b83\u63a5\u6536\u4e00\u4e2a\u968f\u673a\u7684\u566a\u58f0z\uff0c\u901a\u8fc7\u8fd9\u4e2a\u566a\u58f0\u751f\u6210\u56fe\u7247\uff0c\u8bb0\u505aG(z)\u3002<\/li>\n<li>D\u662f\u4e00\u4e2a\u5224\u522b\u7f51\u7edc\uff0c\u5224\u522b\u4e00\u5f20\u56fe\u7247\u662f\u4e0d\u662f\u201c\u771f\u5b9e\u7684\u201d\u3002\u5b83\u7684\u8f93\u5165\u53c2\u6570\u662fx\uff0cx\u4ee3\u8868\u4e00\u5f20\u56fe\u7247\uff0c\u8f93\u51faD\uff08x\uff09\u4ee3\u8868x\u4e3a\u771f\u5b9e\u56fe\u7247\u7684\u6982\u7387\uff0c\u5982\u679c\u4e3a1\uff0c\u5c31\u4ee3\u8868100%\u662f\u771f\u5b9e\u7684\u56fe\u7247\uff0c\u800c\u8f93\u51fa\u4e3a0\uff0c\u5c31\u4ee3\u8868\u4e0d\u53ef\u80fd\u662f\u771f\u5b9e\u7684\u56fe\u7247\u3002<\/li>\n<\/ul>\n<p>\u5728\u8bad\u7ec3\u8fc7\u7a0b\u4e2d\uff0c\u751f\u6210\u7f51\u7edcG\u7684\u76ee\u6807\u5c31\u662f\u5c3d\u91cf\u751f\u6210\u771f\u5b9e\u7684\u56fe\u7247\u53bb\u6b3a\u9a97\u5224\u522b\u7f51\u7edcD\u3002\u800cD\u7684\u76ee\u6807\u5c31\u662f\u5c3d\u91cf\u628aG\u751f\u6210\u7684\u56fe\u7247\u548c\u771f\u5b9e\u7684\u56fe\u7247\u5206\u522b\u5f00\u6765\u3002\u8fd9\u6837\uff0cG\u548cD\u6784\u6210\u4e86\u4e00\u4e2a\u52a8\u6001\u7684\u201c\u535a\u5f08\u8fc7\u7a0b\u201d\u3002<\/p>\n<p>\u6700\u540e\u535a\u5f08\u7684\u7ed3\u679c\u662f\u4ec0\u4e48\uff1f\u5728\u6700\u7406\u60f3\u7684\u72b6\u6001\u4e0b\uff0cG\u53ef\u4ee5\u751f\u6210\u8db3\u4ee5\u201c\u4ee5\u5047\u4e71\u771f\u201d\u7684\u56fe\u7247G(z)\u3002\u5bf9\u4e8eD\u6765\u8bf4\uff0c\u5b83\u96be\u4ee5\u5224\u5b9aG\u751f\u6210\u7684\u56fe\u7247\u7a76\u7adf\u662f\u4e0d\u662f\u771f\u5b9e\u7684\uff0c\u56e0\u6b64D(G(z)) = 0.5\u3002<\/p>\n<p>\u8fd9\u6837\u6211\u4eec\u7684\u76ee\u7684\u5c31\u8fbe\u6210\u4e86\uff1a\u6211\u4eec\u5f97\u5230\u4e86\u4e00\u4e2a\u751f\u6210\u5f0f\u7684\u6a21\u578bG\uff0c\u5b83\u53ef\u4ee5\u7528\u6765\u751f\u6210\u56fe\u7247\u3002<\/p>\n<p>Goodfellow\u4ece\u7406\u8bba\u4e0a\u8bc1\u660e\u4e86\u8be5\u7b97\u6cd5\u7684\u6536\u655b\u6027\u00a0\uff0c\u4ee5\u53ca\u5728\u6a21\u578b\u6536\u655b\u65f6\uff0c\u751f\u6210\u6570\u636e\u5177\u6709\u548c\u771f\u5b9e\u6570\u636e\u76f8\u540c\u7684\u5206\u5e03\uff08\u4fdd\u8bc1\u4e86\u6a21\u578b\u6548\u679c\uff09\u3002<\/p>\n<p>\u76ee\u524dGAN\u6700\u5e38\u4f7f\u7528\u7684\u5730\u65b9\u5c31\u662f\u56fe\u50cf\u751f\u6210\uff0c\u5982\u8d85\u5206\u8fa8\u7387\u4efb\u52a1\uff0c\u8bed\u4e49\u5206\u5272\u7b49\u7b49\u3002<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<div><\/div>\n<h1>\u5e38\u89c1\u7684\u56fe\u50cf\u751f\u6210\u5668<\/h1>\n<h1>\u4e00\u3001NVIDIA StyleGAN<\/h1>\n<p>https:\/\/github.com\/NVlabs\/stylegan<\/p>\n<p><a href=\"https:\/\/yanjingang.com\/blog\/?attachment_id=2453\" rel=\"attachment wp-att-2453\"><img loading=\"lazy\" class=\"alignnone wp-image-2453 size-medium\" src=\"https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/stylegan2-300x169.gif\" alt=\"\" width=\"300\" height=\"169\" srcset=\"https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/stylegan2-300x169.gif 300w, https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/stylegan2-624x351.gif 624w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>\u8fd9\u662f\u82f1\u4f1f\u8fbe2018\u5e74\u5e95\u53d1\u5e03\u7684\u6700\u65b0\u7814\u7a76\u6210\u679c\u3002\u5341\u5929\u524d\uff0c\u82f1\u4f1f\u8fbe\u6b63\u5f0f\u7ed9\u8fd9\u4e2a\u6a21\u578b\u547d\u540d\u4e3aStyleGAN\u3002\u987e\u540d\u601d\u4e49\uff0cGAN\u7684\u751f\u6210\u5668\uff0c\u662f\u501f\u7528\u98ce\u683c\u8fc1\u79fb\u7684\u601d\u8def\u91cd\u65b0\u53d1\u660e\u7684\u3002<\/p>\n<p><a href=\"https:\/\/yanjingang.com\/blog\/?attachment_id=2454\" rel=\"attachment wp-att-2454\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-2454\" src=\"https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/stylegan.png\" alt=\"\" width=\"686\" height=\"306\" srcset=\"https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/stylegan.png 686w, https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/stylegan-300x134.png 300w, https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/stylegan-624x278.png 624w\" sizes=\"(max-width: 686px) 100vw, 686px\" \/><\/a><\/p>\n<p>\u8fd9\u4e2a\u5f00\u6e90\u5b9e\u73b0\u53ef\u4ee5\u7528Linux\u8dd1\uff0c\u4e5f\u53ef\u4ee5\u7528Windows\u8dd1\uff0c\u4f46\u5899\u88c2\u63a8\u8350\u5927\u5bb6\u7528Linux\u8dd1\uff0c\u4e3a\u6027\u80fd\u548c\u517c\u5bb9\u6027\u7740\u60f3\u3002\u6b64\u5916\u8fd8\u9700\u8981Python 3.6\u548cTensorFlow 1.10\u4ee5\u4e0a (\u652f\u6301GPU CUDA9.0+\uff0ccuDNN 7.3.1+) \u3002<\/p>\n<p>\u548c\u5b98\u65b9\u4ee3\u7801\u5b9e\u73b0\u4e00\u8d77\u53d1\u5e03\u7684\uff0c\u8fd8\u6709Flickr\u9ad8\u6e05\u4eba\u8138\u6570\u636e\u96c6\u3002\u90a3\u4e9b\u51e0\u53ef\u4e71\u771f\u7684\u4eba\u8138\uff0c\u5c31\u662fStyleGAN\u5403\u4e86\u8fd9\u4e2a\u6570\u636e\u96c6\uff0c\u624d\u751f\u6210\u7684\u3002\u5f53\u7136\uff0cStyleGAN\u4e0d\u6b62\u80fd\u751f\u6210\u4eba\u8138\uff0c\u82f1\u4f1f\u8fbe\u8fd8\u63d0\u4f9b\u4e86\u732b\u3001\u6c7d\u8f66\u3001\u5367\u5ba4\u7684\u9884\u8bad\u7ec3\u6a21\u578b\u3002<\/p>\n<p>&nbsp;<\/p>\n<h1>\u4e8c\u3001Deepfakes Faceswap<\/h1>\n<p>https:\/\/github.com\/deepfakes\/faceswap<\/p>\n<p><a href=\"https:\/\/yanjingang.com\/blog\/?attachment_id=2452\" rel=\"attachment wp-att-2452\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-2452\" src=\"https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/stylegan.gif\" alt=\"\" width=\"450\" height=\"247\" \/><\/a><\/p>\n<p>\u4e0a\u9762\u8fd9\u4e00\u6bb5\u4e00\u6bb5\u5408\u6210\u89c6\u9891\u5c31\u662fDeepfake\u7684\u6770\u4f5c\uff0c\u901a\u8fc7\u673a\u5668\u5b66\u4e60\u6280\u672f\u642d\u5efa\u4e86\u4e00\u4e2a\u7cfb\u7edf\uff0c\u8ba9 AI \u5b66\u4e60\u4e86\u5973\u660e\u661f\u7684\u9762\u90e8\u7279\u5f81\uff0c\u6700\u540e\u5408\u6210\u5230\u4e86\u53e6\u4e00\u4e2a\u5973\u6f14\u5458\u7684\u5934\u90e8\u3002<\/p>\n<p>\u539f\u7406\u4e0eGAN\u53ca\u4e0b\u65b9\u7684NVIDIA StyleGAN\u3001CycleGAN\u57fa\u672c\u4e00\u81f4\u4e0d\u518d\u8d58\u8ff0\u3002<\/p>\n<pre><code class=\"\">\u5b9e\u73b0\u65b9\u6cd5\uff1a<\/code> yum install cmake bzip2 <code class=\"\">pip install tqdm psutil pathlib numpy opencv-python scikit-image scikit-learn matplotlib ffmpy nvidia-ml-py3 h5py Keras cmake dlib face-recognition flask\r\n<\/code><code>#0.download\u51c6\u5907\u7167\u7247\r\n#   python ~\/project\/piglab\/machinelearning\/lib\/download_image.py\r\n# 1.extract\u63d0\u53d6\r\n#   python faceswap.py extract -i .\/data\/photo\/huangrong\/ -o .\/data\/extract\/huangrong\/\r\n#   python faceswap.py extract -i .\/data\/photo\/guojing\/ -o .\/data\/extract\/guojing\/\r\n#   python faceswap.py extract -i .\/data\/photo\/zhu\/ -o .\/data\/extract\/zhu\/\r\n#   python faceswap.py extract -i .\/data\/photo\/yan\/ -o .\/data\/extract\/yan\/\r\n# 2.train\u8bad\u7ec3   (AB\u53c2\u6570\uff1a\u6a21\u578b\u7528\u4e8e\u8f93\u5165A\uff0c\u8f93\u51faB)\r\n#   python faceswap.py train -A .\/data\/extract\/huangrong\/ -B .\/data\/extract\/zhu\/ -m .\/models\/huangrong2zhu\/\r\n#   python faceswap.py train -A .\/data\/extract\/guojing\/ -B .\/data\/extract\/yan\/ -m .\/models\/guojing2yan\/\r\n# 3.convert\u66ff\u6362\r\n#   python faceswap.py convert -i .\/data\/test\/ -o .\/data\/output\/ -m .\/models\/huangrong2zhu\/\r\n# 9.\u89c6\u9891&lt;-&gt;\u56fe\u7247\u4e92\u8f6c\r\n#   ffmpeg -i .\/data\/video\/shediao.mp4 .\/data\/photo\/shediao\/video-%d.png\r\n#   ffmpeg -i .\/data\/photo\/shediao\/video-%0d.png -c:v libx264 -vf \"fps=25,format=yuv420p\" .\/data\/video\/shediao-out.mp4\r\n<\/code><code class=\"\">\r\n\u8bad\u7ec3\u6570\u636e\u548c\u6a21\u578b\u89c1\uff1ahttps:\/\/github.com\/yanjingang\/faceswap<\/code><\/pre>\n<p>*TODO\uff1a\u8bad\u7ec3\u7ed3\u679c\u5f85\u4e0a\u4f20<\/p>\n<p>\u8bad\u7ec3\u73af\u5883\uff1a4\u6838cpu<\/p>\n<p>\u8bad\u7ec33\u5c0f\u65f6\u7684\u60c5\u51b5\uff1a<span class=\"s1\">loss_A: 0.10076, loss_B: 0.11611<\/span><\/p>\n<p><a href=\"https:\/\/yanjingang.com\/blog\/?attachment_id=2475\" rel=\"attachment wp-att-2475\"><img loading=\"lazy\" class=\"alignnone wp-image-2475\" src=\"https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/huangrong2zhu.png\" alt=\"\" width=\"342\" height=\"408\" srcset=\"https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/huangrong2zhu.png 684w, https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/huangrong2zhu-251x300.png 251w, https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/huangrong2zhu-624x744.png 624w\" sizes=\"(max-width: 342px) 100vw, 342px\" \/><\/a><\/p>\n<p>\u8bad\u7ec312\u5c0f\u65f6\u540e\uff1a<span class=\"s1\">loss_A: 0.04685, loss_B: 0.04972<\/span><\/p>\n<p><a href=\"https:\/\/yanjingang.com\/blog\/?attachment_id=2476\" rel=\"attachment wp-att-2476\"><img loading=\"lazy\" class=\"alignnone wp-image-2476 size-full\" src=\"https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/73.jpg\" alt=\"\" width=\"342\" height=\"410\" srcset=\"https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/73.jpg 342w, https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/73-250x300.jpg 250w\" sizes=\"(max-width: 342px) 100vw, 342px\" \/><\/a><\/p>\n<p>\u8bad\u7ec3160\u5c0f\u65f6\u540e\uff1a<span class=\"s1\">loss_A: 0.03098, loss_B: 0.03123<\/span><\/p>\n<p><a href=\"https:\/\/yanjingang.com\/blog\/?attachment_id=2485\" rel=\"attachment wp-att-2485\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-2485\" src=\"https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/73-3.jpg\" alt=\"\" width=\"342\" height=\"410\" srcset=\"https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/73-3.jpg 342w, https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/73-3-250x300.jpg 250w\" sizes=\"(max-width: 342px) 100vw, 342px\" \/><\/a><\/p>\n<p>\u6ce8\uff1a\u8dd1\u4e861\u4e2a\u6708\u540e\uff0c\u53d1\u73b0\u6709\u4e2a\u975e\u5e38\u91cd\u8981\u7684\u5f71\u54cd\u56e0\u7d20\uff0c\u5373\u672c\u8eab\u4e24\u4e2a\u4eba\u7684\u80a4\u8272\u3001\u8138\u578b\u8981\u6bd4\u8f83\u50cf\uff0c\u5426\u5219\u5728\u6ca1gpu\u7684\u60c5\u51b5\u4e0b\u6781\u96be\u6536\u655b\u3002\u6240\u4ee5\u6362\u8138\u5148\u5f97\u6709gpu\u7136\u540e\u627e\u6bd4\u8f83\u50cf\u7684\u4e24\u4e2a\u4eba\u6362\u3002<\/p>\n<p><strong>\u89c6\u9891\u7684\u4eba\u8138\u66ff\u6362\u65b9\u6cd5<\/strong>\uff1a\u4f7f\u7528<a href=\"https:\/\/yanjingang.com\/blog\/?p=2464\" target=\"_blank\" rel=\"noopener noreferrer\">\u89c6\u9891\u4e0e\u56fe\u7247\u4e92\u8f6c\u5de5\u5177<\/a>\u4ece\u89c6\u9891\u4e2d\u63d0\u53d6\u5e27\u56fe\u7247\u4f5c\u4e3a\u8bad\u7ec3\u7d20\u6750\u6309\u4e0a\u8fb9\u7684\u65b9\u6cd5\u8fdb\u884c\u8bad\u7ec3\uff0c\u7136\u540e\u5c06\u6240\u6709\u5e27\u56fe\u7247\u6362\u8138\uff0c\u518d\u9006\u5411\u5c06\u5e27\u8f6c\u56de\u89c6\u9891\u5373\u53ef\u3002<\/p>\n<p>&nbsp;<\/p>\n<h1><strong>\u4e09\u3001CycleGAN<\/strong><\/h1>\n<p>https:\/\/github.com\/PaddlePaddle\/models\/tree\/develop\/fluid\/PaddleCV\/gan\/cycle_gan<\/p>\n<p>CycleGAN\u662f\u53d1\u8868\u4e8eICCV17\u7684\u4e00\u7bc7GAN\u5de5\u4f5c\uff0c\u53ef\u4ee5\u8ba9\u4e24\u4e2adomain\u7684\u56fe\u7247\u4e92\u76f8\u8f6c\u5316\u3002\u4f20\u7edf\u7684GAN\u662f\u5355\u5411\u751f\u6210\uff0c\u800cCycleGAN\u662f\u4e92\u76f8\u751f\u6210\uff0c\u7f51\u7edc\u662f\u4e2a\u73af\u5f62\uff0c\u6240\u4ee5\u547d\u540d\u4e3aCycle\u3002\u5e76\u4e14CycleGAN\u4e00\u4e2a\u975e\u5e38\u5b9e\u7528\u7684\u5730\u65b9\u5c31\u662f\u8f93\u5165\u7684\u4e24\u5f20\u56fe\u7247\u53ef\u4ee5\u662f\u4efb\u610f\u7684\u4e24\u5f20\u56fe\u7247\uff0c\u4e5f\u5c31\u662funpaired\u3002<\/p>\n<p><a href=\"https:\/\/yanjingang.com\/blog\/?attachment_id=2447\" rel=\"attachment wp-att-2447\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-2447\" src=\"https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/CycleGAN1.png\" alt=\"\" width=\"570\" height=\"362\" srcset=\"https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/CycleGAN1.png 570w, https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/CycleGAN1-300x191.png 300w\" sizes=\"(max-width: 570px) 100vw, 570px\" \/><\/a><\/p>\n<h3 id=\"\u5355\u5411gan\">\u5355\u5411GAN\uff1a<\/h3>\n<p>\u8bfb\u8005\u53ef\u4ee5\u6309\u7167\u539f\u8bba\u6587\u7684\u987a\u5e8f\u7406\u89e3CycleGAN\uff0c\u8fd9\u91cc\u6211\u6309\u7167\u81ea\u5df1\u7684\u601d\u8def\u89e3\u8bfb\u3002CycleGAN\u672c\u8d28\u4e0a\u662f\u4e24\u4e2a\u955c\u50cf\u5bf9\u79f0\u7684GAN\uff0c\u6784\u6210\u4e86\u4e00\u4e2a<a href=\"https:\/\/www.baidu.com\/s?wd=%E7%8E%AF%E5%BD%A2%E7%BD%91%E7%BB%9C&amp;tn=24004469_oem_dg&amp;rsv_dl=gh_pl_sl_csd\" target=\"_blank\" rel=\"noopener noreferrer\">\u73af\u5f62\u7f51\u7edc<\/a>\u3002\u5176\u5b9e\u53ea\u8981\u7406\u89e3\u4e86\u4e00\u534a\u7684\u5355\u5411GAN\u5c31\u7b49\u4e8e\u7406\u89e3\u4e86\u6574\u4e2aCycleGAN\u3002<\/p>\n<p><a href=\"https:\/\/yanjingang.com\/blog\/?attachment_id=2448\" rel=\"attachment wp-att-2448\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-2448\" src=\"https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/CycleGAN2.png\" alt=\"\" width=\"800\" height=\"393\" srcset=\"https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/CycleGAN2.png 800w, https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/CycleGAN2-300x147.png 300w, https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/CycleGAN2-768x377.png 768w, https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/CycleGAN2-624x307.png 624w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>\u4e0a\u56fe\u662f\u4e00\u4e2a\u5355\u5411GAN\u7684\u793a\u610f\u56fe\u3002\u6211\u4eec\u5e0c\u671b\u80fd\u591f\u628adomain A\u7684\u56fe\u7247\uff08\u547d\u540d\u4e3aa\uff09\u8f6c\u5316\u4e3adomain B\u7684\u56fe\u7247\uff08\u547d\u540d\u4e3a\u56fe\u7247b\uff09\u3002\u4e3a\u4e86\u5b9e\u73b0\u8fd9\u4e2a\u8fc7\u7a0b\uff0c\u6211\u4eec\u9700\u8981\u4e24\u4e2a\u751f\u6210\u5668GABGAB\u548cGBAGBA\uff0c\u5206\u522b\u628adomain A\u548cdomain B\u7684\u56fe\u7247\u8fdb\u884c\u4e92\u76f8\u8f6c\u6362\u3002\u56fe\u7247A\u7ecf\u8fc7\u751f\u6210\u5668GABGAB\u8868\u793a\u4e3aFake Image in domain B\uff0c\u7528GAB(a)GAB(a)\u8868\u793a\u3002\u800cGAB(a)GAB(a)\u7ecf\u8fc7\u751f\u8fb0\u5668GBAGBA\u8868\u793a\u4e3a\u56fe\u7247A\u7684\u91cd\u5efa\u56fe\u7247\uff0c\u7528GBA(GAB(a))GBA(GAB(a))\u8868\u793a\u3002\u6700\u540e\u4e3a\u4e86\u8bad\u7ec3\u8fd9\u4e2a\u5355\u5411GAN\u9700\u8981\u4e24\u4e2aloss\uff0c\u5206\u522b\u662f\u751f\u6210\u5668\u7684\u91cd\u5efaloss\u548c\u5224\u522b\u5668\u7684\u5224\u522bloss\u3002\u4ee5\u4e0a\u5c31\u662fA\u2192B\u5355\u5411GAN\u7684\u539f\u7406\u3002<\/p>\n<h3>\u73af\u5f62GAN\uff1a<\/h3>\n<p>CycleGAN\u5176\u5b9e\u5c31\u662f\u4e00\u4e2aA\u2192B\u5355\u5411GAN\u52a0\u4e0a\u4e00\u4e2aB\u2192A\u5355\u5411GAN\u3002\u4e24\u4e2aGAN\u5171\u4eab\u4e24\u4e2a\u751f\u6210\u5668\uff0c\u7136\u540e\u5404\u81ea\u5e26\u4e00\u4e2a\u5224\u522b\u5668\uff0c\u6240\u4ee5\u52a0\u8d77\u6765\u603b\u5171\u6709\u4e24\u4e2a\u5224\u522b\u5668\u548c\u4e24\u4e2a\u751f\u6210\u5668\u3002\u4e00\u4e2a\u5355\u5411GAN\u6709\u4e24\u4e2aloss\uff0c\u800cCycleGAN\u52a0\u8d77\u6765\u603b\u5171\u6709\u56db\u4e2aloss\u3002CycleGAN\u8bba\u6587\u7684\u539f\u7248\u539f\u7406\u56fe\u548c\u516c\u5f0f\u5982\u4e0b\uff0c\u5176\u5b9e\u7406\u89e3\u4e86\u5355\u5411GAN\u90a3\u4e48CycleGAN\u5df2\u7ecf\u5f88\u597d\u7406\u89e3\u3002<br \/>\n<a href=\"https:\/\/yanjingang.com\/blog\/?attachment_id=2449\" rel=\"attachment wp-att-2449\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-2449\" src=\"https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/CycleGAN3.png\" alt=\"\" width=\"800\" height=\"275\" srcset=\"https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/CycleGAN3.png 800w, https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/CycleGAN3-300x103.png 300w, https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/CycleGAN3-768x264.png 768w, https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/CycleGAN3-624x215.png 624w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p><strong>\u6548\u679c\uff1a<\/strong><\/p>\n<p><a href=\"https:\/\/yanjingang.com\/blog\/?attachment_id=2450\" rel=\"attachment wp-att-2450\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-2450\" src=\"https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/CycleGAN5-1024x492.jpeg\" alt=\"\" width=\"625\" height=\"300\" srcset=\"https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/CycleGAN5-1024x492.jpeg 1024w, https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/CycleGAN5-300x144.jpeg 300w, https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/CycleGAN5-768x369.jpeg 768w, https:\/\/yanjingang.com\/blog\/wp-content\/uploads\/2019\/02\/CycleGAN5-624x300.jpeg 624w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>\u53c2\u8003\uff1a<\/p>\n<p>https:\/\/blog.csdn.net\/sinat_26918145\/article\/details\/79591717<\/p>\n<p>https:\/\/mp.weixin.qq.com\/s\/Kqyv3tC7yeC0BOqin22cWQ<\/p>\n<p>https:\/\/mp.weixin.qq.com\/s\/Rgi6Yxy-kS5y8ui20aU3vg<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8ff0 \u6700\u8fd1\u66ff\u6362\u89c6\u9891\u4e2d\u7684\u4eba\u8138\u6bd4\u8f83\u706b\uff0c\u6d89\u53ca\u7684\u6280\u672f\u4e3b\u8981\u662f\u56fe\u50cf\u751f\u6210\uff0c\u4e3b\u8981\u91c7\u7528\u751f\u6210\u5f0f\u5bf9\u6297\u7f51\u7edc\uff08GAN, Generati [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[768],"tags":[767,764,761,765,758,760,766,763,759,732,762],"_links":{"self":[{"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2446"}],"collection":[{"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2446"}],"version-history":[{"count":0,"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2446\/revisions"}],"wp:attachment":[{"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yanjingang.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}