{"id":15172,"date":"2024-12-09T21:44:59","date_gmt":"2024-12-09T13:44:59","guid":{"rendered":"https:\/\/www.aisharenet.com\/?p=15172"},"modified":"2024-12-09T21:44:59","modified_gmt":"2024-12-09T13:44:59","slug":"musegan","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/en\/musegan\/","title":{"rendered":"MuseGAN\uff1a\u751f\u6210\u591a\u8f68\u97f3\u4e50\/\u914d\u4e50\u7684\u5f00\u6e90\u6a21\u578b\uff0c\u8f7b\u677e\u521b\u4f5c\u591a\u79cd\u4e50\u5668\u7684\u97f3\u4e50\u7247\u6bb5"},"content":{"rendered":"<p>MuseGAN\u662f\u4e00\u4e2a\u57fa\u4e8e\u751f\u6210\u5bf9\u6297\u7f51\u7edc\uff08GAN\uff09\u7684\u97f3\u4e50\u751f\u6210\u9879\u76ee\uff0c\u65e8\u5728\u751f\u6210\u591a\u8f68\uff08\u591a\u79cd\u4e50\u5668\uff09\u97f3\u4e50\u3002\u8be5\u9879\u76ee\u80fd\u591f\u4ece\u96f6\u5f00\u59cb\u751f\u6210\u97f3\u4e50\uff0c\u6216\u6839\u636e\u7528\u6237\u63d0\u4f9b\u7684\u8f68\u9053\u8fdb\u884c\u4f34\u594f\u3002MuseGAN\u4f7f\u7528Lakh Pianoroll Dataset\u8fdb\u884c\u8bad\u7ec3\uff0c\u751f\u6210\u5305\u542b\u8d1d\u65af\u3001\u9f13\u3001\u5409\u4ed6\u3001\u94a2\u7434\u548c\u5f26\u4e50\u7684\u6d41\u884c\u6b4c\u66f2\u7247\u6bb5\u3002\u6700\u65b0\u7684\u5b9e\u73b0\u57fa\u4e8e3D\u5377\u79ef\u5c42\u7684\u7f51\u7edc\u67b6\u6784\uff0c\u5177\u6709\u8f83\u5c0f\u7684\u7f51\u7edc\u89c4\u6a21\uff0c\u4f46\u63a7\u5236\u80fd\u529b\u6709\u6240\u964d\u4f4e\u3002MuseGAN\u63d0\u4f9b\u4e86\u591a\u79cd\u811a\u672c\uff0c\u65b9\u4fbf\u7528\u6237\u7ba1\u7406\u5b9e\u9a8c\u3001\u8bad\u7ec3\u65b0\u6a21\u578b\u3001\u4f7f\u7528\u9884\u8bad\u7ec3\u6a21\u578b\u8fdb\u884c\u63a8\u7406\u548c\u63d2\u503c\u7b49\u64cd\u4f5c\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15173\" title=\"MuseGAN\uff1a\u751f\u6210\u591a\u8f68\u97f3\u4e50\/\u914d\u4e50\u7684\u5f00\u6e90\u6a21\u578b\uff0c\u8f7b\u677e\u521b\u4f5c\u591a\u79cd\u4e50\u5668\u7684\u97f3\u4e50\u7247\u6bb5-1\" src=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/afcbdaf596aeb3f.jpg\" alt=\"MuseGAN\uff1a\u751f\u6210\u591a\u8f68\u97f3\u4e50\/\u914d\u4e50\u7684\u5f00\u6e90\u6a21\u578b\uff0c\u8f7b\u677e\u521b\u4f5c\u591a\u79cd\u4e50\u5668\u7684\u97f3\u4e50\u7247\u6bb5-1\" width=\"847\" height=\"498\" srcset=\"https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/afcbdaf596aeb3f.jpg 847w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/afcbdaf596aeb3f-300x176.jpg 300w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/afcbdaf596aeb3f-768x452.jpg 768w, https:\/\/www.kdjingpai.com\/wp-content\/uploads\/2024\/12\/afcbdaf596aeb3f-18x12.jpg 18w\" sizes=\"auto, (max-width: 847px) 100vw, 847px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>\u529f\u80fd\u5217\u8868<\/h2>\n<ul>\n<li>\u751f\u6210\u591a\u8f68\u97f3\u4e50\uff1a\u4ece\u96f6\u5f00\u59cb\u751f\u6210\u5305\u542b\u591a\u79cd\u4e50\u5668\u7684\u97f3\u4e50\u7247\u6bb5\u3002<\/li>\n<li>\u4f34\u594f\u751f\u6210\uff1a\u6839\u636e\u7528\u6237\u63d0\u4f9b\u7684\u8f68\u9053\u751f\u6210\u4f34\u594f\u3002<\/li>\n<li>\u8bad\u7ec3\u65b0\u6a21\u578b\uff1a\u63d0\u4f9b\u811a\u672c\u548c\u914d\u7f6e\u6587\u4ef6\uff0c\u65b9\u4fbf\u7528\u6237\u8bad\u7ec3\u81ea\u5df1\u7684\u97f3\u4e50\u751f\u6210\u6a21\u578b\u3002<\/li>\n<li>\u4f7f\u7528\u9884\u8bad\u7ec3\u6a21\u578b\uff1a\u4e0b\u8f7d\u5e76\u4f7f\u7528\u9884\u8bad\u7ec3\u6a21\u578b\u8fdb\u884c\u97f3\u4e50\u751f\u6210\u3002<\/li>\n<li>\u6570\u636e\u5904\u7406\uff1a\u4e0b\u8f7d\u548c\u5904\u7406\u8bad\u7ec3\u6570\u636e\uff0c\u652f\u6301Lakh Pianoroll Dataset\u3002<\/li>\n<li>\u5b9e\u9a8c\u7ba1\u7406\uff1a\u63d0\u4f9b\u591a\u79cd\u811a\u672c\uff0c\u65b9\u4fbf\u7528\u6237\u8bbe\u7f6e\u548c\u7ba1\u7406\u5b9e\u9a8c\u3002<\/li>\n<li>\u8f93\u51fa\u683c\u5f0f\uff1a\u751f\u6210\u7684\u97f3\u4e50\u53ef\u4ee5\u4ee5numpy\u6570\u7ec4\u3001\u56fe\u50cf\u6587\u4ef6\u548c\u591a\u8f68pianoroll\u6587\u4ef6\u683c\u5f0f\u4fdd\u5b58\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>\u786e\u4fdd\u5df2\u5b89\u88c5pipenv\uff08\u63a8\u8350\uff09\u6216pip\u3002<\/li>\n<li>\u4f7f\u7528pipenv\u5b89\u88c5\u4f9d\u8d56\uff1a<\/li>\n<\/ol>\n<pre><code>\r\n<\/code><\/pre>\n<p>bash<br \/>\npipenv install<br \/>\npipenv shell<\/p>\n<pre><code>\u6216\u4f7f\u7528pip\u5b89\u88c5\u4f9d\u8d56\uff1a\r\n<\/code><\/pre>\n<p>bash<br \/>\npip install -r requirements.txt<\/p>\n<pre><code>### \u6570\u636e\u51c6\u5907\r\n1. \u4e0b\u8f7d\u8bad\u7ec3\u6570\u636e\uff1a\r\n<\/code><\/pre>\n<p>bash<br \/>\n.\/scripts\/download_data.sh<\/p>\n<pre><code>2. \u5904\u7406\u8bad\u7ec3\u6570\u636e\uff1a\r\n<\/code><\/pre>\n<p>bash<br \/>\n.\/scripts\/process_data.sh<\/p>\n<pre><code>### \u8bad\u7ec3\u65b0\u6a21\u578b\r\n1. \u8bbe\u7f6e\u65b0\u5b9e\u9a8c\uff1a\r\n<\/code><\/pre>\n<p>bash<br \/>\n.\/scripts\/setup<em>exp.sh &#8220;.\/exp\/my<\/em>experiment\/&#8221; &#8220;\u5b9e\u9a8c\u5907\u6ce8&#8221;<\/p>\n<pre><code>2. \u4fee\u6539\u914d\u7f6e\u6587\u4ef6\u548c\u6a21\u578b\u53c2\u6570\u6587\u4ef6\u4ee5\u8bbe\u7f6e\u5b9e\u9a8c\u53c2\u6570\u3002\r\n3. \u8bad\u7ec3\u6a21\u578b\uff1a\r\n<\/code><\/pre>\n<p>bash<br \/>\n.\/scripts\/run<em>train.sh &#8220;.\/exp\/my<\/em>experiment\/&#8221; &#8220;0&#8221;<\/p>\n<pre><code>\u6216\u8fd0\u884c\u5b8c\u6574\u5b9e\u9a8c\uff08\u8bad\u7ec3+\u63a8\u7406+\u63d2\u503c\uff09\uff1a\r\n<\/code><\/pre>\n<p>bash<br \/>\n.\/scripts\/run<em>exp.sh &#8220;.\/exp\/my<\/em>experiment\/&#8221; &#8220;0&#8221;<\/p>\n<pre><code>### \u4f7f\u7528\u9884\u8bad\u7ec3\u6a21\u578b\r\n1. \u4e0b\u8f7d\u9884\u8bad\u7ec3\u6a21\u578b\uff1a\r\n<\/code><\/pre>\n<p>bash<br \/>\n.\/scripts\/download_models.sh<\/p>\n<pre><code>2. \u4f7f\u7528\u9884\u8bad\u7ec3\u6a21\u578b\u8fdb\u884c\u63a8\u7406\uff1a\r\n<\/code><\/pre>\n<p>bash<br \/>\n.\/scripts\/run_inference.sh &#8220;.\/exp\/default\/&#8221; &#8220;0&#8221;<\/p>\n<pre><code>\u6216\u8fdb\u884c\u63d2\u503c\uff1a\r\n<\/code><\/pre>\n<p>bash<br \/>\n.\/scripts\/run_interpolation.sh &#8220;.\/exp\/default\/&#8221; &#8220;0&#8221;<\/p>\n<pre><code>### \u8f93\u51fa\u7ba1\u7406\r\n\u751f\u6210\u7684\u97f3\u4e50\u6837\u672c\u9ed8\u8ba4\u4f1a\u5728\u8bad\u7ec3\u8fc7\u7a0b\u4e2d\u751f\u6210\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684`save_samples_steps`\u4e3a0\u6765\u7981\u7528\u6b64\u884c\u4e3a\u3002\u751f\u6210\u7684\u97f3\u4e50\u6837\u672c\u4f1a\u4ee5\u4ee5\u4e0b\u4e09\u79cd\u683c\u5f0f\u4fdd\u5b58\uff1a\r\n- `.npy`\uff1a\u539f\u59cbnumpy\u6570\u7ec4\r\n- `.png`\uff1a\u56fe\u50cf\u6587\u4ef6\r\n- `.npz`\uff1a\u591a\u8f68pianoroll\u6587\u4ef6\uff0c\u53ef\u901a\u8fc7Pypianoroll\u5305\u52a0\u8f7d\r\n\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684`save_array_samples`\u3001`save_image_samples`\u548c`save_pianoroll_samples`\u4e3aFalse\u6765\u7981\u7528\u7279\u5b9a\u683c\u5f0f\u7684\u4fdd\u5b58\u3002\u751f\u6210\u7684pianoroll\u6587\u4ef6\u4ee5`.npz`\u683c\u5f0f\u4fdd\u5b58\uff0c\u4ee5\u8282\u7701\u7a7a\u95f4\u548c\u5904\u7406\u65f6\u95f4\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u5c06\u5176\u5199\u5165MIDI\u6587\u4ef6\uff1a\r\n<\/code><\/pre>\n<p>python<br \/>\nfrom pypianoroll import Multitrack<br \/>\nm = Multitrack(&#8216;.\/test.npz&#8217;)<br \/>\nm.write(&#8216;.\/test.mid&#8217;)<\/p>\n<h3>\u793a\u4f8b\u7ed3\u679c<\/h3>\n<p>\u4e00\u4e9b\u793a\u4f8b\u7ed3\u679c\u53ef\u4ee5\u5728<code>.\/exp\/<\/code>\u76ee\u5f55\u4e2d\u627e\u5230\u3002\u66f4\u591a\u793a\u4f8b\u53ef\u4ee5\u4ece\u4ee5\u4e0b\u94fe\u63a5\u4e0b\u8f7d\uff1a<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/salu133445\/musegan\">sample_results.tar.gz<\/a>\uff0854.7 MB\uff09\uff1a\u63a8\u7406\u548c\u63d2\u503c\u7ed3\u679c\u793a\u4f8b<\/li>\n<li><a href=\"https:\/\/github.com\/salu133445\/musegan\">training_samples.tar.gz<\/a>\uff0818.7 MB\uff09\uff1a\u4e0d\u540c\u6b65\u9aa4\u751f\u6210\u7684\u7ed3\u679c\u793a\u4f8b<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>MuseGAN\u662f\u4e00\u4e2a\u57fa\u4e8e\u751f\u6210\u5bf9\u6297\u7f51\u7edc\uff08GAN\uff09\u7684\u97f3\u4e50\u751f\u6210\u9879\u76ee\uff0c\u65e8\u5728\u751f\u6210\u591a\u8f68\uff08\u591a\u79cd\u4e50\u5668\uff09\u97f3\u4e50\u3002\u8be5\u9879\u76ee\u80fd\u591f\u4ece\u96f6\u5f00\u59cb\u751f\u6210\u97f3\u4e50\uff0c\u6216\u6839\u636e\u7528\u6237\u63d0\u4f9b\u7684\u8f68\u9053\u8fdb\u884c\u4f34\u594f\u3002MuseGAN\u4f7f\u7528Lakh Pianoroll Dataset\u8fdb\u884c\u8bad\u7ec3\uff0c\u751f\u6210\u5305\u542b\u8d1d\u65af\u3001\u9f13\u3001&#8230;<\/p>\n","protected":false},"author":1,"featured_media":61387,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[230,206],"class_list":["post-15172","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tool","tag-aikaiyuanxiangmu","tag-aiyinle"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/posts\/15172","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/comments?post=15172"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/posts\/15172\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/media\/61387"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/media?parent=15172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/categories?post=15172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/en\/wp-json\/wp\/v2\/tags?post=15172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}