{"id":48781,"date":"2020-03-09T17:24:16","date_gmt":"2020-03-09T09:24:16","guid":{"rendered":"http:\/\/4563.org\/?p=48781"},"modified":"2020-03-09T17:24:16","modified_gmt":"2020-03-09T09:24:16","slug":"chevereto-%e8%b0%83%e7%94%a8%e7%99%be%e5%ba%a6%e5%9b%be%e5%83%8f%e5%ae%a1%e6%a0%b8-%e9%89%b4%e9%bb%84","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=48781","title":{"rendered":"Chevereto \u8c03\u7528\u767e\u5ea6\u56fe\u50cf\u5ba1\u6838 \u9274\u9ec4"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>October\u5341\u6708<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>Chevereto \u8c03\u7528\u767e\u5ea6\u56fe\u50cf\u5ba1\u6838 \u9274\u9ec4<\/h3>\n<p>  \t\t\u770b\u5230\u8bba\u575b\u633a\u591a\u4eba\u9700\u6c42\u8fd9\u4e2a\u529f\u80fd \u5c31\u987a\u5e26\u7814\u7a76\u4e86\u4e00\u4e0b \u4e4b\u524d\u6709\u8fc7\u7c7b\u4f3c\u7ecf\u9a8c \u5199\u8d77\u6765\u633a\u5feb\u7684<\/p>\n<p>  \u9996\u5148 \u6709\u4e2a\u767e\u5ea6\u8d26\u53f7\uff08\u5e9f\u8bdd\u2026\u2026\uff09<\/p>\n<p>  \u767b\u5f55\u767e\u5ea6AI\u63a7\u5236\u53f0 https:\/\/console.bce.baidu.com\/<\/p>\n<p>  \u5728\u5185\u5bb9\u5ba1\u6838\u4e2d\u521b\u5efa\u65b0\u5e94\u7528<br \/>  https:\/\/s2.ax1x.com\/2020\/03\/09\/89CCOs.png<br \/>  \u8bb0\u4e0bAPP_ID API_KEY SECRET_KEY<br \/>  https:\/\/s2.ax1x.com\/2020\/03\/09\/89P0v4.png<\/p>\n<p>  \u767e\u5ea6 \u56fe\u50cf\u5ba1\u6838SDK https:\/\/ai.baidu.com\/sdk#anti<br \/>  https:\/\/s2.ax1x.com\/2020\/03\/09\/8999Vx.png<\/p>\n<p>  \u89e3\u538b\u5230 appvendoraip \u6587\u4ef6\u5939\uff08\u5982\u679c\u6ca1\u6709\u8be5\u6587\u4ef6\u8bf7\u521b\u5efa\uff09<\/p>\n<p>  \u4e4b\u540e\u4fee\u6539 applibclassesclass.image.php \u6587\u4ef6 \u6587\u4ef6\u5934\u90e8 use \u548c class \u4e2d\u95f4 \u52a0\u4e0a require_once CHV_APP_PATH_LIB_VENDOR . &#8216;aip\/AipImage**.php&#8217;;<\/p>\n<p>  https:\/\/s2.ax1x.com\/2020\/03\/09\/8996y9.png<\/p>\n<p>  \u4e4b\u540e\u8df3\u8f6c\u5230577\u884c \u52a0\u4e0a$APP_ID = &#8216;\u4f60\u7684APP_ID&#8217;;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$API_KEY = &#8216;\u4f60\u7684API_KEY&#8217;;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$SECRET_KEY = &#8216;\u4f60\u7684SECRET_KEY&#8217;;<\/p>\n<p>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$aip = new AipImage**($APP_ID, $API_KEY, $SECRET_KEY);<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$res = $aip-&gt;image**UserDefined(file_get_contents($upload-&gt;uploaded[&#8216;file&#8217;]));<\/p>\n<p>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;\/\/ error \u9519\u8bef\u63d0\u793a\u4fe1\u606f\uff0c\u5931\u8d25\u624d\u8fd4\u56de\uff0c\u6210\u529f\u4e0d\u8fd4\u56de<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;if (array_key_exists(&#8216;error_msg&#8217;, $res)) throw new UploadException($res[&#8216;error_msg&#8217;], 201);<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;\/\/ conclusionType \u5ba1\u6838\u7ed3\u679c\u7c7b\u578b\uff0c\u53ef\u53d6\u503c1\u30012\u30013\u30014\uff0c\u5206\u522b\u4ee3\u88681\uff1a\u5408\u89c4\uff0c2\uff1a\u4e0d\u5408\u89c4\uff0c3\uff1a\u7591\u4f3c\uff0c4\uff1a\u5ba1\u6838\u5931\u8d25<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;if ($res[&#8216;conclusionType&#8217;] == 4) throw new UploadException(&#8216;\u56fe\u50cf\u5ba1\u6838\u5931\u8d25&#8217;, 201);<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;if ($res[&#8216;conclusionType&#8217;] &gt; 1) throw new UploadException(&#8216;\u56fe\u50cf**, \u7981\u6b62\u4e0a\u4f20&#8217;, 201);<\/p>\n<p>  \u5177\u4f53\u6587\u6863\u53ef\u4ee5\u770b https:\/\/ai.baidu.com\/ai-doc\/ANTI**\/bk3h6xfag<\/p>\n<p>  \u4e4b\u540e\u4e0a\u4f20\u56fe\u7247\u5c31\u4f1a\u81ea\u5e26\u5ba1\u6838 \u5982\u679c\u4e0d\u60f3\u5f00\u542f\u53ef\u4ee5\u628a\u6dfb\u52a0\u7684\u4ee3\u7801\u90fd\u6ce8\u91ca\u4e86\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>work<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u597d\u4e1c\u897f\uff0c\u5e2e\u9876\u4e86<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; \t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>loveqianool<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u4e0d\u662f\u8bf4\u4e0a oss \u81ea\u5e26\u9274\u9ec4\u5417\uff1f\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>October\u5341\u6708 \u5927\u4f6c\u6709\u8bdd\u8bf4 :&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/48781"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=48781"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/48781\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=48781"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=48781"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=48781"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}