{"id":104241,"date":"2026-09-12T07:17:02","date_gmt":"2026-09-11T23:17:02","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/104241.html"},"modified":"2026-09-12T07:17:02","modified_gmt":"2026-09-11T23:17:02","slug":"day-01-%ef%bc%9aai-%e6%8a%a0%e5%9b%be%ef%bc%9a3-%e8%a1%8c%e4%bb%a3%e7%a0%81%e5%8e%bb%e6%8e%89%e5%9b%be%e7%89%87%e8%83%8c%e6%99%af","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/104241.html","title":{"rendered":"Day 01 \uff1aAI \u62a0\u56fe\uff1a3 \u884c\u4ee3\u7801\u53bb\u6389\u56fe\u7247\u80cc\u666f"},"content":{"rendered":"<p>\u4e0a\u5468\u5e2e\u670b\u53cb\u7684\u5c0f\u5e97\u505a\u6dd8\u5b9d\u4e3b\u56fe&#xff0c;50 \u5f20\u5546\u54c1\u7167\u7247\u8981\u628a\u80cc\u666f\u5168\u6362\u6210\u7eaf\u767d\u8272\u3002\u670b\u53cb\u95ee&#xff1a;&#034;\u4f60\u4f1a PS \u5427&#xff1f;\u5e2e\u6211\u62a0\u4e2a\u56fe\u5457\u3002&#034;\u6211\u7528\u94a2\u7b14\u5de5\u5177\u8bd5\u4e86\u4e00\u5f20&#xff0c;5 \u5206\u949f\u8d77\u6b65&#xff0c;50 \u5f20\u5c31\u662f 4 \u4e2a\u591a\u5c0f\u65f6\u3002\u540e\u6765\u82b1 3 \u5206\u949f\u5199\u4e86\u6bb5 Python&#xff0c;50 \u5f20\u56fe\u5168\u90e8\u81ea\u52a8\u62a0\u5b8c&#xff0c;\u6548\u679c\u6bd4\u624b\u52a8\u63cf\u7684\u8fd8\u5e72\u51c0\u3002\u8fd9\u7bc7\u6587\u7ae0\u5c31\u628a\u8fd9\u4ef6\u4e8b\u62c6\u5f00\u8bb2&#xff1a;\u5355\u5f20\u62a0\u56fe\u3001\u6279\u91cf\u5904\u7406\u3001\u8bc1\u4ef6\u7167\u6362\u5e95\u3001\u7535\u5546\u767d\u5e95\u56fe&#xff0c;\u4ee5\u53ca\u6bdb\u53d1\u8fb9\u7f18\u7684 Alpha Matting \u6280\u5de7\u548c Segment Anything \u6a21\u578b\u3002\u5168\u7a0b\u672c\u5730\u8fd0\u884c&#xff0c;\u96f6 API \u8d39\u7528\u3002<\/p>\n<p>\u5148\u770b\u4f20\u7edf\u65b9\u5f0f\u548c rembg \u7684\u5bf9\u6bd4&#xff1a;<\/p>\n<table>\n<tr>\u65b9\u5f0f\u5355\u5f20\u8017\u65f6\u6279\u91cf\u80fd\u529b\u8fb9\u7f18\u8d28\u91cf\u95e8\u69db<\/tr>\n<tbody>\n<tr>\n<td>PS \u94a2\u7b14\u5de5\u5177<\/td>\n<td>3~10 \u5206\u949f<\/td>\n<td>\u65e0<\/td>\n<td>\u53d6\u51b3\u4e8e\u624b\u7a33<\/td>\n<td>\u9ad8<\/td>\n<\/tr>\n<tr>\n<td>PS \u5feb\u901f\u9009\u62e9\/\u9b54\u68d2<\/td>\n<td>30 \u79d2~2 \u5206\u949f<\/td>\n<td>\u65e0<\/td>\n<td>\u4e00\u822c&#xff0c;\u6bdb\u53d1\u707e\u96be<\/td>\n<td>\u4e2d<\/td>\n<\/tr>\n<tr>\n<td>remove.bg \u7b49\u5728\u7ebf\u5de5\u5177<\/td>\n<td>5 \u79d2<\/td>\n<td>\u6709&#xff08;\u6536\u8d39&#xff09;<\/td>\n<td>\u597d<\/td>\n<td>\u4f4e&#xff0c;\u4f46\u8981\u94b1<\/td>\n<\/tr>\n<tr>\n<td>Python &#043; rembg<\/td>\n<td>2~5 \u79d2<\/td>\n<td>\u6279\u91cf\u65e0\u4e0a\u9650<\/td>\n<td>\u597d<\/td>\n<td>\u4f1a\u88c5 pip \u5c31\u884c<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5173\u952e\u533a\u522b&#xff1a;rembg \u5b8c\u5168\u514d\u8d39\u3001\u672c\u5730\u8fd0\u884c\u3001\u6279\u91cf\u65e0\u9650\u5236&#xff0c;\u56fe\u7247\u4e0d\u7528\u4f20\u5230\u522b\u4eba\u7684\u670d\u52a1\u5668\u4e0a&#xff0c;\u5546\u4e1a\u7d20\u6750\u548c\u5ba2\u6237\u7167\u7247\u4e0d\u7528\u62c5\u5fc3\u6cc4\u9732\u3002<\/p>\n<h3>\u539f\u7406&#xff1a;U\u00b2-Net \u600e\u4e48\u628a\u524d\u666f&#034;\u770b&#034;\u51fa\u6765<\/h3>\n<p>\u4e0d\u5c55\u5f00\u8bba\u6587&#xff0c;\u53ea\u8bf4\u601d\u8def\u3002rembg \u7684\u6838\u5fc3\u662f\u4e00\u5957\u53eb U\u00b2-Net \u7684\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b&#xff1a;<\/p>\n<li>\u8bad\u7ec3\u9636\u6bb5&#xff08;\u5df2\u7ecf\u66ff\u4f60\u505a\u5b8c\u4e86&#xff09;&#xff1a;\u7ed9\u6a21\u578b\u770b\u4e86\u51e0\u767e\u4e07\u5f20\u56fe&#xff0c;\u544a\u8bc9\u5b83&#034;\u8fd9\u4e9b\u50cf\u7d20\u5c5e\u4e8e\u524d\u666f\u7269\u4f53&#xff0c;\u90a3\u4e9b\u5c5e\u4e8e\u80cc\u666f&#034;&#xff0c;\u6a21\u578b\u6162\u6162\u5b66\u4f1a\u5206\u8fa8\u7269\u4f53\u8fb9\u754c\u3002<\/li>\n<li>\u63a8\u7406\u9636\u6bb5&#xff08;\u4f60\u7528\u7684\u90e8\u5206&#xff09;&#xff1a;\u628a\u56fe\u7247\u5582\u7ed9\u6a21\u578b&#xff0c;\u6a21\u578b\u7ed9\u6bcf\u4e2a\u50cf\u7d20\u6253\u4e00\u4e2a\u5206\u2014\u2014\u201c\u8fd9\u4e2a\u50cf\u7d20\u5c5e\u4e8e\u524d\u666f\u7684\u6982\u7387\u662f\u591a\u5c11\u201d&#xff0c;\u6700\u540e\u751f\u6210\u4e00\u5f20 Alpha \u8499\u7248&#xff08;\u767d\u8272&#061;\u524d\u666f&#xff0c;\u9ed1\u8272&#061;\u80cc\u666f&#xff0c;\u7070\u8272&#061;\u8fb9\u7f18\u8fc7\u6e21\u533a\u57df&#xff09;\u3002<\/li>\n<li>\u5408\u6210\u9636\u6bb5&#xff1a;\u7528\u8fd9\u5f20\u8499\u7248\u505a\u900f\u660e\u5904\u7406&#xff0c;\u80cc\u666f\u53d8\u900f\u660e&#xff0c;\u524d\u666f\u4fdd\u7559\u3002<\/li>\n<p>\u6574\u4e2a\u8fc7\u7a0b\u5c31\u662f&#xff1a;\u8f93\u5165\u4e00\u5f20\u56fe \u2192 \u6a21\u578b\u9884\u6d4b\u8499\u7248 \u2192 \u8f93\u51fa\u900f\u660e\u80cc\u666f\u56fe\u3002<\/p>\n<p>rembg \u5185\u7f6e\u4e86\u597d\u51e0\u4e2a\u6a21\u578b&#xff0c;\u6700\u5e38\u7528\u8fd9\u51e0\u4e2a&#xff1a;<\/p>\n<table>\n<tr>\u6a21\u578b\u5927\u5c0f\u7279\u70b9<\/tr>\n<tbody>\n<tr>\n<td>u2net<\/td>\n<td>170MB<\/td>\n<td>\u901a\u7528\u4e4b\u738b&#xff0c;\u6548\u679c\u6700\u5747\u8861&#xff08;\u9ed8\u8ba4&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>u2netp<\/td>\n<td>4MB<\/td>\n<td>\u8f7b\u91cf\u5feb\u901f&#xff0c;\u6548\u679c\u7a0d\u5dee<\/td>\n<\/tr>\n<tr>\n<td>u2net_human_seg<\/td>\n<td>170MB<\/td>\n<td>\u4e13\u4e3a\u4eba\u50cf\u4f18\u5316&#xff0c;\u5934\u53d1\u8fb9\u7f18\u66f4\u597d<\/td>\n<\/tr>\n<tr>\n<td>isnet-general-use<\/td>\n<td>\u7ea6 180MB<\/td>\n<td>ISNet \u6a21\u578b&#xff0c;\u7ec6\u8282\u4fdd\u7559\u5f3a<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u9996\u6b21\u4f7f\u7528\u67d0\u4e2a\u6a21\u578b\u65f6\u4f1a\u81ea\u52a8\u4e0b\u8f7d&#xff0c;\u4e4b\u540e\u5c31\u5b58\u5728\u672c\u5730\u4e86&#xff0c;\u4e0d\u9700\u8981\u8054\u7f51\u3002\u4ee3\u7801\u548c\u6a21\u578b\u5206\u522b\u6765\u81ea rembg \u7684 GitHub \u4ed3\u5e93 \u548c U\u00b2-Net \u8bba\u6587&#xff08;arXiv: 2005.09007&#xff09;\u3002<\/p>\n<h3>\u5b89\u88c5\u4e0e\u7b2c\u4e00\u6bb5\u4ee3\u7801<\/h3>\n<p>\u88c5\u4e09\u4e2a\u5305&#xff0c;\u6ca1\u6709\u522b\u7684\u4f9d\u8d56&#xff1a;<\/p>\n<p>pip <span class=\"token function\">install<\/span> rembg pillow onnxruntime<\/p>\n<ul>\n<li>rembg&#xff1a;\u62a0\u56fe\u6838\u5fc3\u5e93<\/li>\n<li>pillow&#xff1a;Python \u56fe\u7247\u5904\u7406\u6807\u51c6\u5e93<\/li>\n<li>onnxruntime&#xff1a;\u6a21\u578b\u63a8\u7406\u5f15\u64ce<\/li>\n<\/ul>\n<p>\u6700\u7b80\u7248\u672c\u771f\u7684\u53ea\u8981 3 \u884c&#xff1a;<\/p>\n<p><span class=\"token keyword\">from<\/span> PIL <span class=\"token keyword\">import<\/span> Image<br \/>\n<span class=\"token keyword\">from<\/span> rembg <span class=\"token keyword\">import<\/span> remove<\/p>\n<p><span class=\"token comment\"># \u6253\u5f00\u56fe\u7247 \u2192 \u53bb\u9664\u80cc\u666f \u2192 \u4fdd\u5b58<\/span><br \/>\nimg <span class=\"token operator\">&#061;<\/span> Image<span class=\"token punctuation\">.<\/span><span class=\"token builtin\">open<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;input.jpg&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\nresult <span class=\"token operator\">&#061;<\/span> remove<span class=\"token punctuation\">(<\/span>img<span class=\"token punctuation\">)<\/span><br \/>\nresult<span class=\"token punctuation\">.<\/span>save<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;output.png&#034;<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>\u4e09\u884c\u3002\u6ca1\u7701\u7565\u3002\u6ca1 trick\u3002\u8dd1\u5b8c\u4f60\u5c31\u80fd\u62ff\u5230\u4e00\u5f20\u900f\u660e\u80cc\u666f\u7684 PNG\u3002\u8fd9\u91cc remove() \u5185\u90e8\u4f1a\u81ea\u5df1\u52a0\u8f7d\u9ed8\u8ba4\u7684 u2net \u6a21\u578b&#xff0c;\u5355\u5f20\u56fe\u65e0\u6240\u8c13&#xff1b;\u6279\u91cf\u5904\u7406\u5c31\u522b\u8fd9\u4e48\u5199\u4e86&#xff0c;\u89c1\u4e0b\u4e00\u8282\u3002<\/p>\n<h3>\u6279\u91cf\u5904\u7406&#xff1a;50 \u5f20\u56fe\u51e0\u5206\u949f<\/h3>\n<p>\u6279\u91cf\u573a\u666f\u4e0b\u6700\u91cd\u8981\u7684\u662f\u9884\u52a0\u8f7d\u6a21\u578b\u2014\u2014\u5982\u679c\u6bcf\u5f20\u56fe\u90fd\u8ba9 remove() \u91cd\u65b0\u52a0\u8f7d\u4e00\u6b21&#xff0c;170MB \u7684\u6a21\u578b\u5149\u52a0\u8f7d\u5c31\u5f97\u597d\u51e0\u79d2&#xff0c;\u603b\u65f6\u95f4\u80fd\u7ffb 3 \u500d&#xff1a;<\/p>\n<p><span class=\"token keyword\">import<\/span> os<br \/>\n<span class=\"token keyword\">from<\/span> pathlib <span class=\"token keyword\">import<\/span> Path<br \/>\n<span class=\"token keyword\">from<\/span> PIL <span class=\"token keyword\">import<\/span> Image<br \/>\n<span class=\"token keyword\">from<\/span> rembg <span class=\"token keyword\">import<\/span> remove<span class=\"token punctuation\">,<\/span> new_session<\/p>\n<p>input_dir <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;.\/product_photos&#034;<\/span><br \/>\noutput_dir <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">&#034;.\/product_photos_cutout&#034;<\/span><br \/>\nos<span class=\"token punctuation\">.<\/span>makedirs<span class=\"token punctuation\">(<\/span>output_dir<span class=\"token punctuation\">,<\/span> exist_ok<span class=\"token operator\">&#061;<\/span><span class=\"token boolean\">True<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># \u652f\u6301\u7684\u56fe\u7247\u683c\u5f0f<\/span><br \/>\nvalid_ext <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;.jpg&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;.jpeg&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;.png&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;.bmp&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;.webp&#034;<\/span><span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\"># \u9884\u52a0\u8f7d\u6a21\u578b&#xff08;\u91cd\u8981&#xff01;\u907f\u514d\u6bcf\u5f20\u56fe\u7247\u91cd\u590d\u52a0\u8f7d&#xff09;<\/span><br \/>\nsession <span class=\"token operator\">&#061;<\/span> new_session<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;u2net&#034;<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>image_files <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span><br \/>\n    f <span class=\"token keyword\">for<\/span> f <span class=\"token keyword\">in<\/span> Path<span class=\"token punctuation\">(<\/span>input_dir<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>iterdir<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> f<span class=\"token punctuation\">.<\/span>suffix<span class=\"token punctuation\">.<\/span>lower<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">in<\/span> valid_ext<br \/>\n<span class=\"token punctuation\">]<\/span><\/p>\n<p><span class=\"token keyword\">for<\/span> i<span class=\"token punctuation\">,<\/span> img_path <span class=\"token keyword\">in<\/span> <span class=\"token builtin\">enumerate<\/span><span class=\"token punctuation\">(<\/span>image_files<span class=\"token punctuation\">,<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    img <span class=\"token operator\">&#061;<\/span> Image<span class=\"token punctuation\">.<\/span><span class=\"token builtin\">open<\/span><span class=\"token punctuation\">(<\/span>img_path<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>convert<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;RGB&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    result <span class=\"token operator\">&#061;<\/span> remove<span class=\"token punctuation\">(<\/span>img<span class=\"token punctuation\">,<\/span> session<span class=\"token operator\">&#061;<\/span>session<span class=\"token punctuation\">)<\/span><\/p>\n<p>    out_name <span class=\"token operator\">&#061;<\/span> img_path<span class=\"token punctuation\">.<\/span>stem <span class=\"token operator\">&#043;<\/span> <span class=\"token string\">&#034;_nobg.png&#034;<\/span><br \/>\n    result<span class=\"token punctuation\">.<\/span>save<span class=\"token punctuation\">(<\/span>os<span class=\"token punctuation\">.<\/span>path<span class=\"token punctuation\">.<\/span>join<span class=\"token punctuation\">(<\/span>output_dir<span class=\"token punctuation\">,<\/span> out_name<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string-interpolation\"><span class=\"token string\">f&#034;[<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>i<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">\/<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span><span class=\"token builtin\">len<\/span><span class=\"token punctuation\">(<\/span>image_files<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">] \u2705 <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>img_path<span class=\"token punctuation\">.<\/span>name<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string-interpolation\"><span class=\"token string\">f&#034;&#x1f389; \u5168\u90e8\u5b8c\u6210&#xff01;\u8f93\u51fa\u76ee\u5f55&#xff1a;<\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>output_dir<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>\u914d\u5957\u811a\u672c day01_remove_bg.py \u628a\u5355\u5f20\u3001\u6279\u91cf\u3001\u7cbe\u7ec6\u62a0\u56fe\u3001\u8bc1\u4ef6\u7167\u6362\u5e95\u3001\u767d\u5e95\u56fe\u90fd\u6574\u5408\u597d\u4e86&#xff0c;\u5e26\u6ce8\u91ca&#xff0c;\u76f4\u63a5\u8fd0\u884c\u5373\u53ef\u3002<\/p>\n<h3>\u8fdb\u9636&#xff1a;\u7cbe\u7ec6\u8fb9\u7f18\u3001\u6362\u5e95\u8272\u3001\u767d\u5e95\u56fe<\/h3>\n<h4>Alpha Matting&#xff1a;\u6bdb\u53d1\u6551\u661f<\/h4>\n<p>\u5904\u7406\u732b\u54aa\u3001\u957f\u53d1\u4eba\u50cf\u3001\u6bdb\u7ed2\u73a9\u5177\u8fd9\u7c7b\u6709&#034;\u6a21\u7cca\u8fb9\u7f18&#034;\u7684\u7269\u4f53\u65f6&#xff0c;\u666e\u901a\u7684\u4e8c\u503c\u8499\u7248\u4f1a\u8ba9\u8fb9\u7f18\u770b\u8d77\u6765\u786c\u90a6\u90a6\u7684\u3002\u5f00\u542f alpha_matting&#061;True \u540e&#xff0c;rembg \u4f1a\u5728\u8fb9\u7f18\u533a\u57df\u505a\u66f4\u7cbe\u7ec6\u7684\u534a\u900f\u660e\u8ba1\u7b97&#xff0c;\u8ba9\u6bdb\u53d1\u4e1d\u4e00\u6839\u6839\u81ea\u7136\u5730\u4fdd\u7559\u4e0b\u6765&#xff1a;<\/p>\n<p>result <span class=\"token operator\">&#061;<\/span> remove<span class=\"token punctuation\">(<\/span><br \/>\n    img<span class=\"token punctuation\">,<\/span><br \/>\n    alpha_matting<span class=\"token operator\">&#061;<\/span><span class=\"token boolean\">True<\/span><span class=\"token punctuation\">,<\/span>                        <span class=\"token comment\"># \u5f00\u542f&#xff01;<\/span><br \/>\n    alpha_matting_foreground_threshold<span class=\"token operator\">&#061;<\/span><span class=\"token number\">240<\/span><span class=\"token punctuation\">,<\/span>     <span class=\"token comment\"># \u524d\u666f\u5224\u5b9a\u9608\u503c<\/span><br \/>\n    alpha_matting_background_threshold<span class=\"token operator\">&#061;<\/span><span class=\"token number\">10<\/span><span class=\"token punctuation\">,<\/span>      <span class=\"token comment\"># \u80cc\u666f\u5224\u5b9a\u9608\u503c<\/span><br \/>\n    alpha_matting_erode_size<span class=\"token operator\">&#061;<\/span><span class=\"token number\">10<\/span><span class=\"token punctuation\">,<\/span>               <span class=\"token comment\"># \u8fb9\u7f18\u8150\u8680\u534a\u5f84<\/span><br \/>\n<span class=\"token punctuation\">)<\/span><\/p>\n<p>\u4e09\u4e2a\u53c2\u6570\u7684\u76f4\u89c9\u7406\u89e3&#xff1a;<\/p>\n<ul>\n<li>\u524d\u666f\u9608\u503c&#xff1a;\u8d8a\u9ad8\u8d8a\u4e25\u683c&#xff0c;\u53ea\u6709&#034;\u975e\u5e38\u786e\u5b9a\u662f\u524d\u666f&#034;\u7684\u50cf\u7d20\u624d\u4fdd\u7559<\/li>\n<li>\u80cc\u666f\u9608\u503c&#xff1a;\u8d8a\u4f4e\u8d8a\u4e25\u683c&#xff0c;\u53ea\u6709&#034;\u975e\u5e38\u786e\u5b9a\u662f\u80cc\u666f&#034;\u7684\u50cf\u7d20\u624d\u53bb\u9664<\/li>\n<li>\u8150\u8680\u534a\u5f84&#xff1a;\u8d8a\u5927&#xff0c;\u8fb9\u7f18\u8d8a\u5411\u5185\u6536\u7f29&#xff0c;\u9002\u5408\u53bb\u80cc\u666f\u8272\u6e17\u5165\u7684\u60c5\u51b5<\/li>\n<\/ul>\n<h4>\u8bc1\u4ef6\u7167\u6362\u5e95\u8272<\/h4>\n<p>\u62a0\u51fa\u4eba\u50cf\u540e\u586b\u4e00\u5c42\u7eaf\u8272\u80cc\u666f&#xff0c;\u5c31\u662f\u8bc1\u4ef6\u7167\u6362\u5e95\u3002\u914d\u5957\u811a\u672c\u91cc\u7684 id_photo_change_bg() \u5c31\u662f\u8fd9\u4e2a\u601d\u8def&#xff1a;\u7528 u2net_human_seg \u4eba\u50cf\u6a21\u578b\u62a0\u56fe \u2192 \u65b0\u5efa\u7eaf\u8272 RGBA \u80cc\u666f \u2192 bg.paste(result, (0, 0), result) \u900f\u660e\u6df7\u5408\u3002\u5e38\u7528\u5e95\u8272&#xff1a;\u84dd\u8272 (0, 102, 204)\u3001\u7ea2\u8272 (255, 0, 0)\u3001\u767d\u8272 (255, 255, 255)\u3002<\/p>\n<p>\u60f3\u7ec3\u624b\u7684\u8bdd&#xff0c;\u628a\u5b83\u6539\u6210\u547d\u4ee4\u884c\u5de5\u5177&#xff1a;\u8f93\u5165\u56fe\u7247\u8def\u5f84\u548c\u989c\u8272&#xff08;r g b&#xff09;&#xff0c;\u8f93\u51fa\u6362\u597d\u5e95\u8272\u7684\u8bc1\u4ef6\u7167&#xff1b;\u518d\u52a0\u4e2a\u53c2\u6570\u652f\u6301\u81ea\u5b9a\u4e49\u8f93\u51fa\u5c3a\u5bf8&#xff08;\u4e00\u5bf8 295\u00d7413\u3001\u4e8c\u5bf8 413\u00d7579&#xff09;\u3002<\/p>\n<h4>\u7535\u5546\u767d\u5e95\u56fe<\/h4>\n<p>\u540c\u6837\u7684\u5957\u8def&#xff0c;\u80cc\u666f\u6362\u6210\u7eaf\u767d&#xff0c;\u4fdd\u5b58\u6210\u9ad8\u8d28\u91cf JPEG&#xff08;quality&#061;95&#xff09;&#xff0c;\u5c31\u662f\u6dd8\u5b9d\/\u62fc\u591a\u591a\/1688 \u7684\u5546\u54c1\u4e3b\u56fe\u683c\u5f0f\u3002\u914d\u5957\u811a\u672c\u7684 product_white_bg() \u76f4\u63a5\u53ef\u7528\u3002<\/p>\n<h4>CPU \u591f\u7528&#xff0c;GPU \u66f4\u5feb<\/h4>\n<p>rembg \u9ed8\u8ba4\u7528 CPU \u63a8\u7406&#xff0c;\u5355\u5f20 2~5 \u79d2\u5b8c\u5168\u591f\u7528&#xff1b;\u6279\u91cf\u51e0\u767e\u5f20\u6216\u5bf9\u901f\u5ea6\u8981\u6c42\u6781\u9ad8\u65f6&#xff0c;GPU \u80fd\u5feb 5~10 \u500d&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u5148\u786e\u4fdd\u88c5\u4e86 CUDA \u7248 onnxruntime<\/span><br \/>\npip <span class=\"token function\">install<\/span> rembg<span class=\"token punctuation\">[<\/span>gpu<span class=\"token punctuation\">]<\/span> onnxruntime-gpu<\/p>\n<p>\u4ee3\u7801\u5b8c\u5168\u4e0d\u7528\u6539&#xff0c;rembg \u4f1a\u81ea\u52a8\u68c0\u6d4b\u5e76\u4f7f\u7528 GPU\u3002<\/p>\n<p>\u6a21\u578b\u9009\u62e9\u7b56\u7565&#xff1a;<\/p>\n<table>\n<tr>\u573a\u666f\u63a8\u8350\u6a21\u578b\u7406\u7531<\/tr>\n<tbody>\n<tr>\n<td>\u65e5\u5e38\u62a0\u56fe\u3001\u793e\u4ea4\u5a92\u4f53\u7d20\u6750<\/td>\n<td>u2net&#xff08;\u9ed8\u8ba4&#xff09;<\/td>\n<td>\u5747\u8861<\/td>\n<\/tr>\n<tr>\n<td>\u5b9e\u65f6\u9884\u89c8\u3001\u79fb\u52a8\u7aef\u90e8\u7f72<\/td>\n<td>u2netp<\/td>\n<td>\u5feb&#xff0c;4MB \u5c31\u80fd\u8dd1<\/td>\n<\/tr>\n<tr>\n<td>\u4eba\u50cf\u3001\u8bc1\u4ef6\u7167<\/td>\n<td>u2net_human_seg<\/td>\n<td>\u5934\u53d1\u8fb9\u7f18\u66f4\u81ea\u7136<\/td>\n<\/tr>\n<tr>\n<td>\u590d\u6742\u80cc\u666f\u3001\u5546\u54c1<\/td>\n<td>isnet-general-use<\/td>\n<td>\u7ec6\u8282\u4fdd\u7559\u597d<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u8fd0\u884c\u6548\u679c<\/h3>\n<p>\u4ee5 input.jpg \u4e3a\u4f8b&#xff0c;\u914d\u5957\u811a\u672c\u8dd1\u5b8c\u4f1a\u5f97\u5230\u8fd9\u51e0\u7c7b\u4ea7\u7269&#xff08;\u4e0b\u56fe\u4e3a\u672c\u673a\u5b9e\u8dd1\u7ed3\u679c&#xff09;&#xff1a;<\/p>\n<p>!\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0<\/p>\n<p>\u8fd0\u884c\u65e5\u5fd7&#xff1a;<\/p>\n<p>!\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0<\/p>\n<p>\u900f\u660e\u80cc\u666f\u62a0\u56fe&#xff1a;<\/p>\n<p>!\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0<\/p>\n<p>Alpha Matting \u7cbe\u7ec6\u62a0\u56fe&#xff08;\u9002\u5408\u6bdb\u53d1\u3001\u534a\u900f\u660e\u8fb9\u7f18&#xff09;&#xff1a;<\/p>\n<p>!\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0<\/p>\n<p>\u8bc1\u4ef6\u7167\u6362\u84dd\u5e95&#xff1a;<\/p>\n<p>!\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0<\/p>\n<p>\u7535\u5546\u767d\u5e95\u56fe&#xff1a;<\/p>\n<p>!\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0<\/p>\n<h3>\u8d39\u7528\u4e0e\u8bb8\u53ef<\/h3>\n<table>\n<tr>\u9879\u76ee\u8d39\u7528<\/tr>\n<tbody>\n<tr>\n<td>rembg \u5e93<\/td>\n<td>\u514d\u8d39&#xff0c;MIT \u5f00\u6e90\u534f\u8bae<\/td>\n<\/tr>\n<tr>\n<td>\u6a21\u578b\u6743\u91cd<\/td>\n<td>\u514d\u8d39&#xff0c;\u9996\u6b21\u81ea\u52a8\u4e0b\u8f7d<\/td>\n<\/tr>\n<tr>\n<td>GPU \u63a8\u7406<\/td>\n<td>\u672c\u5730\u663e\u5361&#xff0c;\u65e0\u989d\u5916\u8d39\u7528<\/td>\n<\/tr>\n<tr>\n<td>\u5728\u7ebf API&#xff08;remove.bg \u7b49&#xff09;<\/td>\n<td>\u7ea6 \u00a50.1~0.5\/\u5f20&#xff08;\u5bf9\u6bd4\u7528&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u6bcf\u6708\u6279\u91cf 1000 \u5f20\u6210\u672c<\/td>\n<td>\u00a50<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5546\u7528\u5408\u89c4\u6027&#xff1a;rembg \u662f MIT \u534f\u8bae&#xff0c;\u5546\u7528\u65e0\u9650\u5236&#xff1b;U\u00b2-Net \u6a21\u578b\u662f Apache 2.0 \u534f\u8bae&#xff0c;\u5546\u7528\u65e0\u9650\u5236&#xff1b;ISNet \u6a21\u578b\u662f\u5b66\u672f\u7814\u7a76\u7528\u9014&#xff0c;\u5546\u7528\u9700\u8981\u786e\u8ba4\u8bb8\u53ef\u3002\u5bf9\u6bd4\u4e00\u4e0b&#xff1a;\u7528 remove.bg \u7684 API \u5904\u7406 1000 \u5f20\u56fe\u5927\u7ea6 \u00a5100~500&#xff0c;\u7528 rembg&#xff0c;\u6210\u672c\u662f\u96f6\u3002<\/p>\n<h3>\u5ef6\u4f38&#xff1a;Segment Anything<\/h3>\n<p>\u5982\u679c\u4f60\u9700\u8981\u7684\u662f&#034;\u5206\u5272\u56fe\u4e2d\u67d0\u4e2a\u7269\u4f53&#034;\u800c\u4e0d\u662f&#034;\u4e00\u952e\u53bb\u80cc\u666f&#034;&#xff0c;\u53ef\u4ee5\u770b\u770b Meta \u5728 2023 \u5e74\u5f00\u6e90\u7684 Segment Anything Model&#xff08;SAM&#xff09;\u3002\u4e24\u8005\u601d\u8def\u4e0d\u540c&#xff1a;rembg \u81ea\u52a8\u5224\u65ad&#034;\u4ec0\u4e48\u662f\u524d\u666f&#034;&#xff0c;\u4e00\u952e\u51fa\u7ed3\u679c&#xff1b;SAM \u7528\u70b9\u3001\u6846\u3001\u6587\u5b57\u63d0\u793a\u6307\u5b9a&#034;\u5206\u5272\u8fd9\u4e2a\u533a\u57df&#034;&#xff0c;\u518d\u7cbe\u786e\u5206\u5272\u51fa\u6765\u3002\u7c7b\u6bd4&#xff1a;rembg \u50cf\u81ea\u52a8\u6321\u6c7d\u8f66&#xff0c;SAM \u50cf\u624b\u52a8\u6321\u2014\u2014\u66f4\u7075\u6d3b&#xff0c;\u4f46\u9700\u8981\u66f4\u591a\u64cd\u4f5c\u3002<\/p>\n<p><span class=\"token comment\"># pip install segment-anything opencv-python<\/span><br \/>\n<span class=\"token keyword\">from<\/span> segment_anything <span class=\"token keyword\">import<\/span> sam_model_registry<span class=\"token punctuation\">,<\/span> SamAutomaticMaskGenerator<br \/>\n<span class=\"token keyword\">import<\/span> cv2<\/p>\n<p><span class=\"token comment\"># \u52a0\u8f7d SAM \u6a21\u578b<\/span><br \/>\nsam <span class=\"token operator\">&#061;<\/span> sam_model_registry<span class=\"token punctuation\">[<\/span><span class=\"token string\">&#034;vit_h&#034;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">(<\/span>checkpoint<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;sam_vit_h_4b8939.pth&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\nmask_generator <span class=\"token operator\">&#061;<\/span> SamAutomaticMaskGenerator<span class=\"token punctuation\">(<\/span>sam<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token comment\"># \u751f\u6210\u6240\u6709\u53ef\u80fd\u7684\u5206\u5272\u533a\u57df<\/span><br \/>\nimage <span class=\"token operator\">&#061;<\/span> cv2<span class=\"token punctuation\">.<\/span>imread<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;input.jpg&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\nmasks <span class=\"token operator\">&#061;<\/span> mask_generator<span class=\"token punctuation\">.<\/span>generate<span class=\"token punctuation\">(<\/span>image<span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string-interpolation\"><span class=\"token string\">f&#034;\u68c0\u6d4b\u5230 <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span><span class=\"token builtin\">len<\/span><span class=\"token punctuation\">(<\/span>masks<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\"> \u4e2a\u5206\u5272\u533a\u57df&#034;<\/span><\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token comment\"># \u6bcf\u4e2a mask \u5305\u542b&#xff1a;segmentation&#xff08;\u5e03\u5c14\u77e9\u9635&#xff09;\u3001area&#xff08;\u9762\u79ef&#xff09;\u3001bbox&#xff08;\u8fb9\u754c\u6846&#xff09;\u7b49<\/span><\/p>\n<p>SAM \u7684\u6a21\u578b\u6587\u4ef6\u6bd4\u8f83\u5927&#xff08;ViT-H \u7ea6 2.4GB&#xff09;&#xff0c;\u9996\u6b21\u4f7f\u7528\u9700\u8981\u4e0b\u8f7d&#xff0c;\u9002\u5408\u9700\u8981\u66f4\u7cbe\u7ec6\u63a7\u5236\u7684\u573a\u666f&#xff1b;\u65e5\u5e38\u7b80\u5355\u62a0\u56fe\u7528 rembg \u5c31\u591f\u4e86\u3002\u76f8\u5173\u8d44\u6599&#xff1a;SAM \u5b98\u7f51\u3001SAM GitHub\u30022024 \u5e74 Meta \u53c8\u5f00\u6e90\u4e86 SAM 2&#xff0c;\u6269\u5c55\u5230\u4e86\u89c6\u9891\u5206\u5272&#xff0c;\u53ef\u4ee5\u8ffd\u8e2a\u89c6\u9891\u4e2d\u7684\u7269\u4f53&#xff0c;\u5bf9\u89c6\u9891\u5206\u5272\u611f\u5174\u8da3\u53ef\u4ee5\u5173\u6ce8\u3002<\/p>\n<p>\u53e6\u5916\u4e24\u4e2a\u7ec3\u624b\u65b9\u5411&#xff1a;\u4e00\u662f\u6279\u91cf\u6c34\u5370\u6dfb\u52a0\u5668&#xff0c;\u5728\u62a0\u56fe\u57fa\u7840\u4e0a\u7528 Pillow \u7684 ImageDraw \u548c ImageFont \u7ed9\u6bcf\u5f20\u56fe\u53f3\u4e0b\u89d2\u52a0\u534a\u900f\u660e\u6587\u5b57\u6c34\u5370&#xff08;\u5982\u5e97\u94fa\u540d&#xff09;&#xff0c;\u652f\u6301\u81ea\u5b9a\u4e49\u4f4d\u7f6e\u3001\u5b57\u53f7\u3001\u900f\u660e\u5ea6&#xff1b;\u4e8c\u662f\u89c6\u9891\u62a0\u56fe&#xff0c;pip install opencv-python \u540e\u7528 cv2.VideoCapture \u9010\u5e27\u8bfb\u53d6\u3001\u5bf9\u6bcf\u5e27\u8c03\u7528 remove() \u751f\u6210\u7eff\u5e55\u6548\u679c\u77ed\u89c6\u9891&#xff0c;\u52a0\u5206\u9879\u662f\u7528\u591a\u7ebf\u7a0b\/\u591a\u8fdb\u7a0b\u52a0\u901f\u3001\u52a0\u8fdb\u5ea6\u6761\u663e\u793a\u3002<\/p>\n<h3>\u6536\u5c3e<\/h3>\n<p>\u6838\u5fc3\u5c31\u4e00\u53e5\u8bdd&#xff1a;<\/p>\n<p><span class=\"token keyword\">from<\/span> rembg <span class=\"token keyword\">import<\/span> remove<br \/>\nresult <span class=\"token operator\">&#061;<\/span> remove<span class=\"token punctuation\">(<\/span>Image<span class=\"token punctuation\">.<\/span><span class=\"token builtin\">open<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;input.jpg&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\nresult<span class=\"token punctuation\">.<\/span>save<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;output.png&#034;<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>\u8bb0\u4f4f\u56db\u6761&#xff1a;\u6279\u91cf\u5904\u7406\u4e00\u5b9a\u8981\u9884\u52a0\u8f7d session&#xff0c;\u522b\u6bcf\u6b21\u91cd\u65b0\u52a0\u8f7d\u6a21\u578b&#xff1b;\u6bdb\u53d1\/\u534a\u900f\u660e\u573a\u666f\u5f00 alpha_matting&#xff1b;\u4eba\u50cf\u7528 u2net_human_seg&#xff1b;\u5b8c\u5168\u672c\u5730\u8fd0\u884c&#xff0c;\u96f6\u6210\u672c&#xff0c;MIT \u5546\u7528\u65e0\u5fe7\u3002\u628a input.jpg \u6362\u6210\u4f60\u81ea\u5df1\u7684\u56fe\u8dd1\u4e00\u904d&#xff0c;\u5269\u4e0b\u7684\u5c31\u662f\u770b\u6548\u679c\u4e86\u3002<\/p>\n<p>\u53c2\u8003\u6587\u6863&#xff1a;Pillow&#xff08;Pillow \u5b98\u65b9\u6587\u6863&#xff09;\u3001onnxruntime&#xff08;onnxruntime \u5b98\u65b9\u6587\u6863&#xff09;\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0a\u5468\u5e2e\u670b\u53cb\u7684\u5c0f\u5e97\u505a\u6dd8\u5b9d\u4e3b\u56fe&#xff0c;50 \u5f20\u5546\u54c1\u7167\u7247\u8981\u628a\u80cc\u666f\u5168\u6362\u6210\u7eaf\u767d\u8272\u3002\u670b\u53cb\u95ee&#xff1a;\\&#8221;\u4f60\u4f1a PS \u5427&#xff1f;\u5e2e\u6211\u62a0\u4e2a\u56fe\u5457\u3002\\&#8221;\u6211\u7528\u94a2\u7b14\u5de5\u5177\u8bd5\u4e86\u4e00\u5f20&#xff0c;5 \u5206\u949f\u8d77\u6b65&#xff0c;50 \u5f20\u5c31\u662f 4 \u4e2a\u591a\u5c0f\u65f6\u3002\u540e\u6765\u82b1 3 \u5206\u949f\u5199\u4e86\u6bb5 Python&#xff0c;50 \u5f20\u56fe\u5168\u90e8\u81ea\u52a8\u62a0\u5b8c&#xff0c;\u6548\u679c\u6bd4\u624b\u52a8\u63cf\u7684\u8fd8\u5e72\u51c0\u3002\u8fd9\u7bc7\u6587\u7ae0\u5c31\u628a\u8fd9\u4ef6\u4e8b\u62c6\u5f00\u8bb2&#xff1a;\u5355\u5f20\u62a0\u56fe\u3001\u6279\u91cf\u5904\u7406\u3001\u8bc1\u4ef6\u7167\u6362\u5e95\u3001\u7535\u5546\u767d\u5e95\u56fe&#xff0c;\u4ee5\u53ca\u6bdb\u53d1\u8fb9\u7f18\u7684 Alpha <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[9755,11863,11864,11721,81],"topic":[],"class_list":["post-104241","post","type-post","status-publish","format-standard","hentry","category-server","tag-ai","tag-rembg","tag-u2net","tag-11721","tag-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Day 01 \uff1aAI \u62a0\u56fe\uff1a3 \u884c\u4ee3\u7801\u53bb\u6389\u56fe\u7247\u80cc\u666f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/104241.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Day 01 \uff1aAI \u62a0\u56fe\uff1a3 \u884c\u4ee3\u7801\u53bb\u6389\u56fe\u7247\u80cc\u666f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4e0a\u5468\u5e2e\u670b\u53cb\u7684\u5c0f\u5e97\u505a\u6dd8\u5b9d\u4e3b\u56fe&#xff0c;50 \u5f20\u5546\u54c1\u7167\u7247\u8981\u628a\u80cc\u666f\u5168\u6362\u6210\u7eaf\u767d\u8272\u3002\u670b\u53cb\u95ee&#xff1a;&quot;\u4f60\u4f1a PS \u5427&#xff1f;\u5e2e\u6211\u62a0\u4e2a\u56fe\u5457\u3002&quot;\u6211\u7528\u94a2\u7b14\u5de5\u5177\u8bd5\u4e86\u4e00\u5f20&#xff0c;5 \u5206\u949f\u8d77\u6b65&#xff0c;50 \u5f20\u5c31\u662f 4 \u4e2a\u591a\u5c0f\u65f6\u3002\u540e\u6765\u82b1 3 \u5206\u949f\u5199\u4e86\u6bb5 Python&#xff0c;50 \u5f20\u56fe\u5168\u90e8\u81ea\u52a8\u62a0\u5b8c&#xff0c;\u6548\u679c\u6bd4\u624b\u52a8\u63cf\u7684\u8fd8\u5e72\u51c0\u3002\u8fd9\u7bc7\u6587\u7ae0\u5c31\u628a\u8fd9\u4ef6\u4e8b\u62c6\u5f00\u8bb2&#xff1a;\u5355\u5f20\u62a0\u56fe\u3001\u6279\u91cf\u5904\u7406\u3001\u8bc1\u4ef6\u7167\u6362\u5e95\u3001\u7535\u5546\u767d\u5e95\u56fe&#xff0c;\u4ee5\u53ca\u6bdb\u53d1\u8fb9\u7f18\u7684 Alpha\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/104241.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-11T23:17:02+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/104241.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/104241.html\",\"name\":\"Day 01 \uff1aAI \u62a0\u56fe\uff1a3 \u884c\u4ee3\u7801\u53bb\u6389\u56fe\u7247\u80cc\u666f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-11T23:17:02+00:00\",\"dateModified\":\"2026-09-11T23:17:02+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/104241.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/104241.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/104241.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Day 01 \uff1aAI \u62a0\u56fe\uff1a3 \u884c\u4ee3\u7801\u53bb\u6389\u56fe\u7247\u80cc\u666f\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Day 01 \uff1aAI \u62a0\u56fe\uff1a3 \u884c\u4ee3\u7801\u53bb\u6389\u56fe\u7247\u80cc\u666f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/104241.html","og_locale":"zh_CN","og_type":"article","og_title":"Day 01 \uff1aAI \u62a0\u56fe\uff1a3 \u884c\u4ee3\u7801\u53bb\u6389\u56fe\u7247\u80cc\u666f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4e0a\u5468\u5e2e\u670b\u53cb\u7684\u5c0f\u5e97\u505a\u6dd8\u5b9d\u4e3b\u56fe&#xff0c;50 \u5f20\u5546\u54c1\u7167\u7247\u8981\u628a\u80cc\u666f\u5168\u6362\u6210\u7eaf\u767d\u8272\u3002\u670b\u53cb\u95ee&#xff1a;\"\u4f60\u4f1a PS \u5427&#xff1f;\u5e2e\u6211\u62a0\u4e2a\u56fe\u5457\u3002\"\u6211\u7528\u94a2\u7b14\u5de5\u5177\u8bd5\u4e86\u4e00\u5f20&#xff0c;5 \u5206\u949f\u8d77\u6b65&#xff0c;50 \u5f20\u5c31\u662f 4 \u4e2a\u591a\u5c0f\u65f6\u3002\u540e\u6765\u82b1 3 \u5206\u949f\u5199\u4e86\u6bb5 Python&#xff0c;50 \u5f20\u56fe\u5168\u90e8\u81ea\u52a8\u62a0\u5b8c&#xff0c;\u6548\u679c\u6bd4\u624b\u52a8\u63cf\u7684\u8fd8\u5e72\u51c0\u3002\u8fd9\u7bc7\u6587\u7ae0\u5c31\u628a\u8fd9\u4ef6\u4e8b\u62c6\u5f00\u8bb2&#xff1a;\u5355\u5f20\u62a0\u56fe\u3001\u6279\u91cf\u5904\u7406\u3001\u8bc1\u4ef6\u7167\u6362\u5e95\u3001\u7535\u5546\u767d\u5e95\u56fe&#xff0c;\u4ee5\u53ca\u6bdb\u53d1\u8fb9\u7f18\u7684 Alpha","og_url":"https:\/\/www.wsisp.com\/helps\/104241.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-11T23:17:02+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/104241.html","url":"https:\/\/www.wsisp.com\/helps\/104241.html","name":"Day 01 \uff1aAI \u62a0\u56fe\uff1a3 \u884c\u4ee3\u7801\u53bb\u6389\u56fe\u7247\u80cc\u666f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-11T23:17:02+00:00","dateModified":"2026-09-11T23:17:02+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/104241.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/104241.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/104241.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Day 01 \uff1aAI \u62a0\u56fe\uff1a3 \u884c\u4ee3\u7801\u53bb\u6389\u56fe\u7247\u80cc\u666f"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/104241","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=104241"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/104241\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=104241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=104241"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=104241"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=104241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}