{"id":3834,"date":"2018-07-22T09:28:33","date_gmt":"2018-07-22T01:28:33","guid":{"rendered":"http:\/\/benjenq.ddns.net\/blog\/%e3%80%90%e6%a9%9f%e6%a2%b0%e5%ad%b8%e7%bf%92%e3%80%91%e6%95%99%e4%bd%a0%e7%9a%84-iphone-%e8%aa%8d%e8%ad%98-gogoro-%e6%8f%9b%e9%9b%bb%e7%ab%99%ef%bc%88part-2%ef%bc%89-%e7%94%a8%e9%bb%91%e8%98%8b\/"},"modified":"2018-07-22T09:28:33","modified_gmt":"2018-07-22T01:28:33","slug":"%e3%80%90%e6%a9%9f%e6%a2%b0%e5%ad%b8%e7%bf%92%e3%80%91%e6%95%99%e4%bd%a0%e7%9a%84-iphone-%e8%aa%8d%e8%ad%98-gogoro-%e6%8f%9b%e9%9b%bb%e7%ab%99%ef%bc%88part-2%ef%bc%89-%e7%94%a8%e9%bb%91%e8%98%8b","status":"publish","type":"post","link":"http:\/\/benjenq.ddns.net\/blog\/%e3%80%90%e6%a9%9f%e6%a2%b0%e5%ad%b8%e7%bf%92%e3%80%91%e6%95%99%e4%bd%a0%e7%9a%84-iphone-%e8%aa%8d%e8%ad%98-gogoro-%e6%8f%9b%e9%9b%bb%e7%ab%99%ef%bc%88part-2%ef%bc%89-%e7%94%a8%e9%bb%91%e8%98%8b\/","title":{"rendered":"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\uff08Part 2\uff09 &#8211; \u7528\u9ed1\u860b\u679c\u96fb\u8166\u73a9\u8f49\u6700\u592f\u7684\u6a5f\u68b0\u5b78\u7fd2"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" alt=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" border=\"0\" height=\"316\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532282161-2658330607.png\" title=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" width=\"586\"><\/p>\n<p>\u524d\u60c5\u63d0\u8981\uff1a<a href=\"http:\/\/benjenq.pixnet.net\/blog\/post\/45974352\" target=\"_blank\">\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\uff08Part 1\uff09- \u7528\u9ed1\u860b\u679c\u96fb\u8166\u73a9\u8f49\u6700\u592f\u7684\u6a5f\u68b0\u5b78\u7fd2<\/a>\u3002<\/p>\n<p>\u5728<a href=\"http:\/\/benjenq.pixnet.net\/blog\/post\/45974352\" target=\"_blank\">\u524d\u4e00\u7bc7\u6587\u7ae0<\/a>\u4e2d\uff0c\u7b2c\u4e00\u6b21\u5617\u8a66\u5f9e\u7121\u5230\u6709\u5b8c\u6210\u6574\u500b\u6a5f\u68b0\u5b78\u7fd2\u5f71\u50cf\u8fa8\u8b58\u7684\u7df4\u7fd2\u904e\u7a0b\uff0c\u6700\u7d42\u5f97\u5230\u4e00\u500b\u300c\u5fc5\u9808\u4ee5\u534a\u4f5c\u5f0a\u7684\u65b9\u5f0f\u5f97\u5230\u8c8c\u4f3c\u53ef\u7528\u7684\u8a13\u7df4\u6a21\u578b\u300d\u9019\u7a2e\u4e0d\u592a\u6eff\u610f\u7684\u7d50\u679c\uff0c\u5f8c\u7e8c\u4e5f\u7559\u4e0b\u8a31\u591a\u554f\u984c\u7559\u5f85\u5f8c\u7e8c\u63a2\u8a0e\u3002\u63a5\u4e0b\u4f86\u9019\u6bb5\u6642\u9593\u88e1\uff0c\u6211\u4e00\u76f4\u4e0d\u65b7\u5617\u8a66\u5404\u7a2e\u624b\u6bb5\uff0c\u589e\u52a0\u8fa8\u8b58\u6210\u529f\u7684\u6a5f\u7387\uff0c\u4e0d\u904e\u7d42\u7a76\u6548\u679c\u6709\u9650\uff0c\u8aa4\u5224\u7684\u539f\u56e0\u4e5f\u8d8a\u4f86\u8d8a\u96e3\u6df1\u7a76\uff0c\u4ee5\u81f3\u65bc\u6559\u5b78\u8ab2\u7a0b\u8a13\u7df4\u597d\u7684\u7bc4\u4f8b\u8cc7\u6599\u53ef\u7528\uff0c\u81ea\u5df1\u8a13\u7df4\u51fa\u4f86\u8cc7\u6599\u537b\u4e0d\u80fd\u7528\u3002\u624d\u6b63\u8981\u958b\u5fc3\u7684\u5411\u524d\u8e0f\u51fa\u4e00\u6b65\uff0c\u63a5\u8457\u53c8\u5361\u95dc\u4e86\uff0c\u5be6\u5728\u5f88\u7070\u5fc3\uff01<\/p>\n<p>\u65bc\u662f\u53c8\u518d\u5ea6\u4e0a\u8c37\u6b4c\u5927\u6d77\u4e2d\u6f02\u6d41\uff0c\u53cd\u8986\u5617\u8a66\u641c\u5c0b\u81ea\u5df1\u53ef\u80fd\u907a\u6f0f\u4e86\u4ec0\u9ebc\u95dc\u9375\u5b57\uff0c\u4e00\u6b21\u53c8\u4e00\u6b21\u7684\u641c\u5c0b\uff0c\u4e00\u6b21\u53c8\u4e00\u6b21\u7684\u89f8\u78b0\u8271\u6df1\u96e3\u61c2\u4e5f\u59cb\u7d42\u641e\u4e0d\u61c2\u7684\u6f14\u7b97\u6cd5\u8b70\u984c\u3002\u5728\u67d0\u4e00\u6b21\u7684\u8cc7\u6599\u641c\u5c0b\u4e2d\uff0c\u641c\u5230\u4e00\u5f35\u5716\u7247\uff1a<\/p>\n<p><!-- more --><\/p>\n<p><img decoding=\"async\" alt=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" border=\"0\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532224007-2201955033.jpg?v=1532224009\" title=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\"><\/p>\n<p>\u4e00\u76ee\u77ad\u7136&#8230;\u9019\u4e0d\u5c31\u662f\u6211\u60f3\u8981\u7684\u8fa8\u8b58\u7d50\u679c\u55ce\uff1f\u5728\u4e0a\u6b21\u7684\u64cd\u4f5c\u7df4\u7fd2\u4e2d\uff0c\u662f\u91dd\u5c0d\u6574\u5f35\u5716\u7684\u8fa8\u8b58\uff0c\u4e5f\u5c0e\u81f4\u300cGogoro \u63db\u96fb\u7ad9\u300d\u7684\u8a13\u7df4\u8cc7\u6599\u4e2d\uff0c\u5468\u906d\u4f34\u96a8\u4e00\u5806\u5730\u666f\u5730\u7269\u800c\u5e72\u64fe\u5b78\u7fd2\u7d50\u679c\uff0c\u6211\u7e3d\u7b97\u610f\u8b58\u5230\u81ea\u5df1\u5ffd\u7565\u7684\u5730\u65b9\u3002\u9806\u8457\u9019\u5f35\u5716\u7684\u7dda\u7d22\uff0c\u627e\u5230\u5716\u7247\u7684\u4f86\u6e90\uff1a<\/p>\n<p>\u300c<a href=\"https:\/\/apple.github.io\/turicreate\/docs\/userguide\/object_detection\/\" target=\"_blank\">Turi Create &#8211; Object detection<\/a>\u300d<\/p>\n<p>\u5728\u9019\u88e1\u51fa\u73fe\u4e86\u65b0\u7684\u95dc\u9375\u5b57\u300cObject Detection\u300d\uff08\u7269\u9ad4\u5075\u6e2c\uff09\uff0c\u6211\u7d42\u65bc\u641e\u61c2\u5361\u95dc\u7684\u539f\u56e0\u4e86\uff01\u539f\u4f86\u6211\u4e00\u76f4\u628a\u300c\u5f71\u50cf\u8fa8\u8b58\u300d\uff08Image Classification\uff09\u8207\u300c\u7269\u9ad4\u5075\u6e2c\u300d\uff08Object Detection\uff09\u5169\u8005\u6df7\u70ba\u4e00\u8ac7\u4e86\uff0c\u6a5f\u68b0\u5b78\u7fd2\u7684\u61c9\u7528\u65b9\u5f0f\u932f\u8aa4\uff0c\u6240\u4ee5\u59cb\u7d42\u64fa\u812b\u4e0d\u4e86\u8fa8\u8b58\u7d50\u679c\u906d\u8aa4\u5224\u7684\u547d\u904b\u3002\u4f86\u6e90\u7db2\u5740\u7d66\u51fa\u53e6\u4e00\u500b\u95dc\u9375\u5b57\u300cTuri Create\u300d\uff0c\u4e5f\u627e\u5230\u4e86\u300cTuri Create\u300d\u5c08\u6848\u7684 Github \u4e3b\u9801\uff1a<\/p>\n<p>\u300c<a href=\"https:\/\/github.com\/apple\/turicreate\" target=\"_blank\">GitHub &#8211; apple\/turicreate<\/a>\u300d<\/p>\n<p>\u86c7\u561b\uff1f\uff01\u8766\u6bc0\uff1f\u9019\u662f\u860b\u679c\u5728 GitHub \u4e0a\u7684\u5c08\u6848\uff1f\u4ec0\u9ebc\u6642\u5019\u860b\u679c\u7d66\u51fa\u9019\u73a9\u610f\u4f46\u6211\u4e0d\u77e5\u9053\uff0c\u6211\u610f\u8b58\u5230\u81ea\u5df1\u80af\u5b9a\u53c8\u5ffd\u7565\u4e86\u4ec0\u9ebc\uff0c\u518d\u5ea6\u56de\u5230\u860b\u679c\u7684\u958b\u767c\u8005\u7db2\u9801\uff0c\u91cd\u65b0\u700f\u89bd\u4e86\u4e00\u904d\uff0c\u624d\u767c\u73fe\u860b\u679c\u65e9\u5728\u300c<a href=\"https:\/\/developer.apple.com\/machine-learning\/build-run-models\/\" target=\"_blank\">Machine Learning &#8211; Working with Core ML Models<\/a>\u300d\u9019\u500b\u5c08\u984c\u9801\u9762\u4e2d\uff0c\u5c31\u63d0\u904e\u9019\u73a9\u610f\u5152\u3002\u9019\u7db2\u9801\u6211\u4e0d\u77e5\u5237\u4e86\u591a\u5c11\u56de\u90fd\u6c92\u6ce8\u610f\u5230\uff0c\u6b63\u6240\u8b02\u300c\u76f4\u89ba\u5f80\u5f80\u662f\u76f2\u9ede\u300d\uff0c\u4ee5\u70ba\u53c8\u662f\u96e3\u641e\u7684\u7b2c\u4e09\u65b9\u5b78\u7fd2\u5957\u4ef6\uff0c\u6240\u4ee5\u5c31\u81ea\u52d5\u5ffd\u7565\u3002<\/p>\n<p>\u597d\u5427\uff01\u5c31\u627f\u8a8d\u81ea\u5df1\u6c92\u628a\u66f8\u8b80\u597d\uff0c\u7e5e\u4e86\u592a\u591a\u51a4\u6789\u8def\uff0c\u767c\u73fe\u932f\u8aa4\u4e5f\u662f\u5b78\u7fd2\u7684\u904e\u7a0b\u3002<\/p>\n<p>\u65e2\u7136\u300cTuri Create\u300d\u662f\u860b\u679c\u5728 GitHub \u4e0a\u767c\u8868\u7684\u5c08\u6848\uff0c\u61c9\u8a72\u8981\u597d\u597d\u641e\u61c2\u300cTuri Create\u300d\u662f\u600e\u9ebc\u4e00\u56de\u4e8b\uff0c\u5e0c\u671b\u9019\u73a9\u610f\u5152\u5982\u540c\u860b\u679c\u81ea\u5df1\u5728\u5c08\u6848\u9801\u4e0a\u5ba3\u7a31\u300c You don\u2019t have to be a machine learning expert to&#8230;\u300d\uff08\u60a8\u4e0d\u9700\u5177\u5099\u6a5f\u68b0\u5b78\u7fd2\u5c08\u5bb6\u77e5\u8b58\u5c31\u80fd ooxx &#8230;\uff09\u3002<\/p>\n<p>\u7d42\u65bc\uff0c\u900f\u904e <a href=\"https:\/\/apple.github.io\/turicreate\/docs\/userguide\/\" target=\"_blank\">Turi Create \u7684 \u7528\u6236\u6307\u5357\u7db2\u9801\uff08User Guide\uff09<\/a>\uff0c\u6211\u7e3d\u7b97\u5b8c\u6210\u7b2c\u4e00\u500b\uff0c\u5f9e\u7121\u5230\u6709\u7684\u8cc7\u6599\u6536\u96c6\u3001\u6574\u7406\uff0c\u6700\u7d42\u81ea\u5df1\u4e5f\u89ba\u5f97\u6eff\u610f\u7684\u8a13\u7df4\u6a21\u578b\uff0c\u8b93 iPhone \u80fd\u300c\u771f\u6b63\u8a8d\u8b58\u300d Gogoro \u63db\u96fb\u7ad9\u60f9\uff01<\/p>\n<p>\u9019\u7bc7\u6587\u7ae0\u662f\u7c21\u55ae\u7d00\u9304\u6211\u7684\u300cTuri Create &#8211; Object Detection\u300d\u5b78\u7fd2\u904e\u7a0b\u3002\u5148\u8aaa\u7d50\u8ad6\uff1a\u8207\u524d\u4e00\u7bc7\u6587\u7ae0\u4e2d\u4f7f\u7528&nbsp; Xcode \u5167\u5efa\u7684\u300cCreate ML\u300d\u7684\u7121\u8166\u8a13\u7df4\u65b9\u5f0f\u76f8\u6bd4\uff0c Turi Create \u9084\u662f\u6709\u4e00\u5b9a\u7a0b\u5ea6\u7684\u96e3\u5ea6\uff0c\u4e0d\u80fd\u50cf Create ML \u6ed1\u9f20\u62d6\u62c9\u7c21\u55ae\u64cd\u4f5c\u7684\u65b9\u5f0f\u3002\u96e3\u5ea6\u4e3b\u8981\u6709\u5169\u500b\uff1a<\/p>\n<ul>\n<li>\u5177\u5099\u57fa\u672c\u7684 Python \u8a9e\u8a00\u57fa\u790e\uff1a\u6beb\u7121\u7591\u554f\uff0c\u76ee\u524d Python \u8a9e\u8a00\u662f\u6a5f\u68b0\u5b78\u7fd2\u5165\u9580\u57fa\u790e\u3002\u904e\u7a0b\u4e2d\u7121\u6cd5\u907f\u514d\u9700\u8981\u64b0\u5beb Python \u7a0b\u5f0f\u3002<\/li>\n<li>\u8cc7\u6599\u6a19\u8a3b\uff08Annotations\uff09\u4f5c\u696d\uff1a\u9019\u662f\u771f\u6b63\u7684\u82e6\u5de5\uff0c\u4e5f\u76f4\u63a5\u5f71\u97ff\u6a21\u578b\u7684\u5b78\u7fd2\u6210\u679c\u3002<\/li>\n<\/ul>\n<p>\u9996\u5148\uff0c\u7576\u7136\u662f\u5148\u628a Turi Create \u88dd\u8d77\u4f86\uff0c\u4e26\u9806\u8457 Turi Create \u7684 <a href=\"https:\/\/apple.github.io\/turicreate\/docs\/userguide\/object_detection\/\" target=\"_blank\">Object-Detection User Guide \u6587\u4ef6<\/a>\uff0c\u4e00\u6b65\u4e00\u6b65\u7684\u505a\u4e0b\u53bb&#8230;<\/p>\n<p><span style=\"font-size:10pt\"><strong>\u6e96\u5099\u5de5\u4f5c\uff1a<\/strong><\/span><\/p>\n<ul>\n<li>\u4e00\u53f0\u904b\u4f5c macOS 10.13 \u4ee5\u4e0a\uff0c\u6216 Ubuntu 16.04 \u7684\u96fb\u8166\u3002\u5f37\u70c8\u63a8\u85a6 macOS 10.14\uff0c\u56e0\u70ba Turi Create \u5728 5 \u7248\u4ee5\u5f8c\uff0c\u5728 macOS 10.14 \u6703\u81ea\u52d5\u4ee5\u53ef\u7528\u7684 GPU \u52a0\u901f\u904b\u7b97\uff0c\u8a13\u7df4\u51fa\u4f86\u7684\u6a21\u578b\u4e5f\u80fd\u76f4\u63a5\u7528 iOS App \u6e2c\u8a66\uff0c\u672c\u6587\u4ee5 macOS 10.14 \u70ba\u4f8b\u3002<\/li>\n<li>\u5b89\u88dd Xcode 10 (beta) \u3002<\/li>\n<\/ul>\n<p>\u9019\u5169\u500b\u689d\u4ef6\u548c<a href=\"http:\/\/benjenq.pixnet.net\/blog\/post\/45974352\" target=\"_blank\">\u524d\u4e00\u7bc7\u6587\u7ae0<\/a>\u5e7e\u4e4e\u4e00\u6a23\uff0c\u5982\u4f55\u5b89\u88dd macOS 10.14 Mojave \u8207 Xcode\uff0c\u8acb\u53c3\u95b1\u524d\u4e00\u7bc7\u6587\u7ae0\u300c<a href=\"http:\/\/benjenq.pixnet.net\/blog\/post\/45974352\" target=\"_blank\">\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\uff08Part 1\uff09 &#8211; \u7528\u9ed1\u860b\u679c\u96fb\u8166\u73a9\u8f49\u6700\u592f\u7684\u6a5f\u68b0\u5b78\u7fd2<\/a>\u300d\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u5f37\u70c8\u63a8\u85a6\u5b89\u88dd\u4e00\u5f35 macOS \u539f\u751f\u652f\u63f4\u7684\u7368\u7acb\u986f\u5361\uff0c\u7d93\u5be6\u6e2c\u904b\u884c Object Detect \u6a21\u578b\u6240\u6d88\u8017\u7684\u6642\u9593\u8207\u8cc7\u6e90\uff0c\u6bd4 Image Classification \u9084\u8981\u9ad8\u51fa\u8a31\u591a\uff0c\u82e5\u53ea\u7528 CPU \u904b\u7b97\uff0c\u771f\u7684\u6703\u8dd1\u5230\u5730\u8001\u5929\u8352\u3002<\/p>\n<p><span style=\"font-size:12pt\"><strong>\u5b89\u88dd Turi Create<\/strong><\/span><\/p>\n<p>Turi Create \u662f Python \u7684\u6a21\u7d44\uff0c\u6240\u4ee5\u53ea\u9700\u628a Python \u8ddf pip \u88dd\u8d77\u4f86\u4e4b\u5f8c\uff0c\u7528 pip \u4f86\u5b89\u88dd\u5373\u53ef\u3002<\/p>\n<p><strong><span style=\"font-size:10pt\">macOS \u5b89\u88dd Python\uff1a<\/span><\/strong><\/p>\n<p>\u96d6\u7136 macOS \u5df2\u7d93\u5167\u5efa Python\uff0c\u4f46\u5167\u5efa\u7684\u662f\u7d66 macOS \u7cfb\u7d71\u7528\u7684\uff0c\u4e5f\u4e0d\u80fd\u4efb\u610f\u66f4\u52d5\uff0c\u5426\u5247 macOS \u7cfb\u7d71\u6703\u51fa\u73fe\u4e00\u5806\u4e0d\u80fd\u57f7\u884c\u7684\u5167\u5efa\u7a0b\u5f0f\u3002\u7528\u6236\u4f7f\u7528\u7684 Python \u901a\u5e38\u6703\u53e6\u5916\u5b89\u88dd\uff0c\u5b89\u88dd\u65b9\u5f0f\u6709\u5169\u7a2e\uff1aPython \u5b98\u7db2\u8207 HomeBrew \u5b89\u88dd\uff0c\u64c7\u4e00\u5373\u53ef\uff0c\u6211\u7528\u7684\u662f\u5b98\u7db2\u5b89\u88dd\u65b9\u5f0f\u3002<\/p>\n<p><a href=\"https:\/\/www.python.org\/downloads\/\" target=\"_blank\">Python Download<\/a><\/p>\n<p>\u5b89\u88dd\u65b9\u5f0f\u5f88\u7c21\u55ae\uff0c\u4e0b\u8f09\u5f8c\u57f7\u884c\u5b83\u7684 .pkg \u4f9d\u6307\u793a\u4e0b\u4e00\u6b65\u5c31\u884c\u4e86\u3002\u5b89\u88dd 3.6.x \u6216 2.7 \u7686\u53ef\uff0c\u4e5f\u53ef\u5169\u7a2e\u7248\u672c\u90fd\u5b89\u88dd\u3002\u4e0d\u8981\u5b89\u88dd 3.7 \u7248\uff0c\u56e0\u70ba\u76ee\u524d Turi Create \u5c1a\u672a\u652f\u63f4\u3002<\/p>\n<p>\u5b89\u88dd\u5b98\u7db2\u7248\u4e4b\u5f8c\uff0c\u9700\u518d\u624b\u52d5\u57f7\u884c Python \u5b89\u88dd\u76ee\u9304\u4e0b\u7684\u5169\u500b Command \uff0c\u514d\u5f97\u5f8c\u9762\u4e00\u5806\u554f\u984c\u3002<\/p>\n<p><img decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0a\u534811.04.52\" border=\"0\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532228711-1008245756.png\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0a\u534811.04.52\"><\/p>\n<p><strong>pip \u5b89\u88dd Turi Create<\/strong><\/p>\n<p>\u7d42\u7aef\u6a5f\u8996\u7a97\uff0c\u4e00\u884c\u5c31\u641e\u5b9a\uff1a<\/p>\n<p>$ pip install turicreate<\/p>\n<p>\u4e0d\u904e\u76ee\u524d\u9019\u884c\u6307\u4ee4\u4e0b\u8f09\u7684\u662f 4 \u7248\uff0c\u4e26\u4e0d\u652f\u63f4 macOS 10.14 \u74b0\u5883\u4e0b\u7684 GPU \u52a0\u901f\u904b\u7b97\uff0c\u6240\u4ee5\u5efa\u8b70\u5b89\u88dd 5.0 beta \u7248\uff1a<\/p>\n<p>$ pip install &#8220;turicreate==5.0b2&#8221;<\/p>\n<p>\u7b2c\u4e00\u6b21\u5927\u6982\u8dd1\u500b\u5e7e\u5206\u9418\u4e4b\u5f8c\uff0cTuriCreate \u5c31\u5b89\u88dd\u5b8c\u6210\u4e86\u3002\u82e5\u662f\u4f7f\u7528 Python 3.6 \u7684\u8a71\uff0c\u8981\u7528 pip3 \u6307\u4ee4\uff1a<\/p>\n<p>$ pip3 install &#8220;turicreate==5.0b2&#8221;<\/p>\n<p>\u9019\u6a23\u5c31\u5b8c\u6210\u4e86\u5b89\u88dd\uff0c\u7c21\u55ae\u57f7\u884c\u4e00\u4e0b\u770b\u6709\u6c92\u6709\u5b89\u88dd\u5b8c\u6210\uff1a<\/p>\n<p><img decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0a\u534811.15.46\" border=\"0\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532229365-659439415.png?v=1532229366\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0a\u534811.15.46\"><\/p>\n<p>\u6c92\u4ec0\u9ebc\u554f\u984c\u4e4b\u5f8c\uff0c\u9806\u8457\u300c<a href=\"https:\/\/apple.github.io\/turicreate\/docs\/userguide\/object_detection\/\" target=\"_blank\">Object Detection<\/a>\u300d\u7ae0\u7bc0\u7684\u6559\u5b78\u7bc4\u4f8b\u64cd\u4f5c\u4e00\u6b21\u3002<\/p>\n<p><span style=\"font-size:12pt\"><strong>\u4f7f\u7528 Turi Create \u9032\u884c \u7269\u9ad4\u8b58\u5225\uff08Object Detection\uff09\u9805\u76ee<\/strong><\/span><\/p>\n<p>(1) \u9996\u5148\uff0c\u7576\u7136\u662f\u4e0b\u8f09\u8a13\u7df4\u6a5f\u5668\u7684\u7bc4\u4f8b\u8cc7\u6599\u3002\u4f9d\u7167 <a href=\"https:\/\/apple.github.io\/turicreate\/docs\/userguide\/object_detection\/data-preparation.html\" target=\"_blank\">Object Detect \u6559\u5b78\u6587\u4ef6\uff08\u7db2\u5740\uff09<\/a>\u4e2d\u300cData Prepare\u300d\u9019\u7bc0\u5167\u5bb9\u7684\u6307\u793a\uff0c<a href=\"https:\/\/lear.inrialpes.fr\/people\/marszalek\/data\/ig02\/\" target=\"_blank\">\u4e0b\u8f09\u7bc4\u4f8b\u6a94<\/a>\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0a\u534811.23.13\" border=\"0\" height=\"167\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532229817-3709245110.png\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0a\u534811.23.13\" width=\"566\"><\/p>\n<p>\u6559\u5b78\u6587\u4ef6\u4e2d\u8981\u6211\u5011\u9078\u64c7 ig02-v1.0-bikes.zip \u548c ig02-v1.0-cars \u5169\u500b\u5c31\u884c\u4e86\uff0c\u76ee\u7684\u5f88\u660e\u986f\u7684\u662f\u8981\u8a13\u7df4\u51fa\u80fd\u8b58\u5225\u300c\u8173\u8e0f\u8eca\uff08bikes\uff09\u300d\u548c\u300c\u6c7d\u8eca(cars)\u300d\u4e3b\u9ad4\u7684\u6a21\u578b\u3002\u4e0b\u8f09\u5f8c\u89e3\u58d3\u7e2e\uff0c\u5efa\u4e00\u500b\u76ee\u9304 ig02 \u5f8c\uff0c\u628a\u4e0b\u8f09\u6a94\u6848\u9023\u540c\u76ee\u9304\u653e\u9032\u53bb\uff0c\u6574\u7406\u5982\u4e0b\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0a\u534811.28.32\" border=\"0\" height=\"121\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532230129-1889867720.png\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0a\u534811.28.32\" width=\"234\"><\/p>\n<p>(2) \u7522\u751f\u8a13\u7df4\u6a21\u578b<\/p>\n<p>\u958b\u555f\u4e00\u7d42\u7aef\u6a5f\u8996\u7a97\uff0c\u5148\u79fb\u5230\u8207 ig02 \u540c\u4e00\u5c64\u7684\u76ee\u9304\u4e0b\uff0c\u518d\u57f7\u884c python\uff1a<\/p>\n<p><img decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0a\u534811.48.51\" border=\"0\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532231363-593685888.png\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0a\u534811.48.51\"><\/p>\n<p>\u63a5\u8457\u5c31\u4f9d\u7167\u6559\u5b78\u6587\u4ef6\u4e2d\u7684\u6307\u4ee4\u7167 Key \u5c31\u884c\u4e86\u3002\u8981\u7279\u5225\u6ce8\u610f\u6bcf\u4e00\u884c\u524d\u9762\u662f\u5426\u6709\u7a7a\u683c\uff0c\u9019\u500b\u662f\u64b0\u5beb python \u7684\u7279\u4f8b\uff0c\u7a7a\u683c\u4ee3\u8868\u7a0b\u5f0f\u53ef\u57f7\u884c\u7684\u5340\u6bb5\uff0c\u7a7a\u683c\u6c92\u5c0d\u9f4a\uff0c\u5f8c\u7e8c\u7a0b\u5f0f\u5c31\u6703\u51fa\u554f\u984c\u3002<\/p>\n<pre style=\"box-sizing: border-box; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 16px; white-space: pre-wrap; break-inside: avoid; direction: ltr; margin: 0px 0px 1.275em; padding: 0.85em 1em; border: none; color: #333333; overflow: auto; word-wrap: normal; background: #f7f7f7; letter-spacing: 0.2px;\"><code class=\"lang-python\" style=\"box-sizing: border-box; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 0.85em; break-inside: avoid; direction: ltr; margin: 0px; padding: 0px; border: none; color: inherit; background: 0px 0px; display: inline; max-width: initial; overflow: initial; line-height: inherit; white-space: pre;\"><span class=\"hljs-keyword\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8959a8; font-size:inherit; text-size-adjust:none\">import<\/span> turicreate <span class=\"hljs-keyword\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8959a8; font-size:inherit; text-size-adjust:none\">as<\/span> tc\n<span class=\"hljs-keyword\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8959a8; font-size:inherit; text-size-adjust:none\">import<\/span> os\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Change if applicable<\/span>\nig02_path = <span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'~\/Desktop\/ig02'<\/span>\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Load all images in random order<\/span>\nraw_sf = tc.image_analysis.load_images(ig02_path, recursive=<span class=\"hljs-keyword\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8959a8; font-size:inherit; text-size-adjust:none\">True<\/span>,\nrandom_order=<span class=\"hljs-keyword\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8959a8; font-size:inherit; text-size-adjust:none\">True<\/span>)\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Split file names so that we can determine what kind of image each row is<\/span>\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># E.g. bike_005.mask.0.png -&gt; ['bike_005', 'mask']<\/span>\ninfo = raw_sf[<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'path'<\/span>].apply(<span class=\"hljs-keyword\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8959a8; font-size:inherit; text-size-adjust:none\">lambda<\/span> path: os.path.basename(path).split(<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'.'<\/span>)[:<span class=\"hljs-number\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#f5871f; font-size:inherit; text-size-adjust:none\">2<\/span>])\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Rename columns to 'name' and 'type'<\/span>\ninfo = info.unpack().rename({<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'X.0'<\/span>: <span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'name'<\/span>, <span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'X.1'<\/span>: <span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'type'<\/span>})\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Add to our main SFrame<\/span>\nraw_sf = raw_sf.add_columns(info)\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Extract label (e.g. 'bike') from name (e.g. 'bike_003')<\/span>\nraw_sf[<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'label'<\/span>] = raw_sf[<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'name'<\/span>].apply(<span class=\"hljs-keyword\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8959a8; font-size:inherit; text-size-adjust:none\">lambda<\/span> name: name.split(<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'_'<\/span>)[<span class=\"hljs-number\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#f5871f; font-size:inherit; text-size-adjust:none\">0<\/span>])\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Original path no longer needed<\/span>\n<span class=\"hljs-keyword\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8959a8; font-size:inherit; text-size-adjust:none\">del<\/span> raw_sf[<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'path'<\/span>]\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Split into images and masks<\/span>\nsf_images = raw_sf[raw_sf[<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'type'<\/span>] == <span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'image'<\/span>]\nsf_masks = raw_sf[raw_sf[<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'type'<\/span>] == <span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'mask'<\/span>]\n<span class=\"hljs-function\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#4271ae; font-size:inherit; text-size-adjust:none\"><span class=\"hljs-keyword\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8959a8; font-size:inherit; text-size-adjust:none\">def<\/span> <span class=\"hljs-title\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\">mask_to_bbox_coordinates<\/span><span class=\"hljs-params\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#f5871f; font-size:inherit; text-size-adjust:none\">(img)<\/span>:<\/span>\n<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">\"\"\"\nTakes a tc.Image of a mask and returns a dictionary representing bounding\nbox coordinates: e.g. {'x': 100, 'y': 120, 'width': 80, 'height': 120}\n\"\"\"<\/span>\n<span class=\"hljs-keyword\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8959a8; font-size:inherit; text-size-adjust:none\">import<\/span> numpy <span class=\"hljs-keyword\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8959a8; font-size:inherit; text-size-adjust:none\">as<\/span> np\nmask = img.pixel_data\n<span class=\"hljs-keyword\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8959a8; font-size:inherit; text-size-adjust:none\">if<\/span> mask.max() == <span class=\"hljs-number\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#f5871f; font-size:inherit; text-size-adjust:none\">0<\/span>:\n<span class=\"hljs-keyword\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8959a8; font-size:inherit; text-size-adjust:none\">return<\/span> <span class=\"hljs-keyword\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8959a8; font-size:inherit; text-size-adjust:none\">None<\/span>\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Take max along both x and y axis, and find first and last non-zero value<\/span>\nx0, x1 = np.where(mask.max(<span class=\"hljs-number\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#f5871f; font-size:inherit; text-size-adjust:none\">0<\/span>))[<span class=\"hljs-number\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#f5871f; font-size:inherit; text-size-adjust:none\">0<\/span>][[<span class=\"hljs-number\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#f5871f; font-size:inherit; text-size-adjust:none\">0<\/span>, <span class=\"hljs-number\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#f5871f; font-size:inherit; text-size-adjust:none\">-1<\/span>]]\ny0, y1 = np.where(mask.max(<span class=\"hljs-number\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#f5871f; font-size:inherit; text-size-adjust:none\">1<\/span>))[<span class=\"hljs-number\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#f5871f; font-size:inherit; text-size-adjust:none\">0<\/span>][[<span class=\"hljs-number\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#f5871f; font-size:inherit; text-size-adjust:none\">0<\/span>, <span class=\"hljs-number\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#f5871f; font-size:inherit; text-size-adjust:none\">-1<\/span>]]\n<span class=\"hljs-keyword\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8959a8; font-size:inherit; text-size-adjust:none\">return<\/span> {<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'x'<\/span>: (x0 + x1) \/ <span class=\"hljs-number\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#f5871f; font-size:inherit; text-size-adjust:none\">2<\/span>, <span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'width'<\/span>: (x1 - x0),\n<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'y'<\/span>: (y0 + y1) \/ <span class=\"hljs-number\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#f5871f; font-size:inherit; text-size-adjust:none\">2<\/span>, <span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'height'<\/span>: (y1 - y0)}\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Convert masks to bounding boxes (drop masks that did not contain bounding box)<\/span>\nsf_masks[<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'coordinates'<\/span>] = sf_masks[<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'image'<\/span>].apply(mask_to_bbox_coordinates)\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># There can be empty masks (which returns None), so let's get rid of those<\/span>\nsf_masks = sf_masks.dropna(<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'coordinates'<\/span>)\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Combine label and coordinates into a bounding box dictionary<\/span>\nsf_masks = sf_masks.pack_columns([<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'label'<\/span>, <span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'coordinates'<\/span>],\nnew_column_name=<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'bbox'<\/span>, dtype=dict)\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Combine bounding boxes of the same 'name' into lists<\/span>\nsf_annotations = sf_masks.groupby(<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'name'<\/span>,\n{<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'annotations'<\/span>: tc.aggregate.CONCAT(<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'bbox'<\/span>)})\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Join annotations with the images. Note, some images do not have annotations,<\/span>\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># but we still want to keep them in the dataset. This is why it is important to<\/span>\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># a LEFT join.<\/span>\nsf = sf_images.join(sf_annotations, on=<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'name'<\/span>, how=<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'left'<\/span>)\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># The LEFT join fills missing matches with None, so we replace these with empty<\/span>\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># lists instead using fillna.<\/span>\nsf[<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'annotations'<\/span>] = sf[<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'annotations'<\/span>].fillna([])\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Remove unnecessary columns<\/span>\n<span class=\"hljs-keyword\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8959a8; font-size:inherit; text-size-adjust:none\">del<\/span> sf[<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'type'<\/span>]\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Save SFrame<\/span>\nsf.save(<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'ig02.sframe'<\/span>)<\/code><\/pre>\n<p>\u7136\u5f8c\u53e6\u5916\u958b\u4e00\u500b\u7d42\u7aef\u6a5f\u8996\u7a97\uff0c\u4e00\u6a23\u662f\u79fb\u5230\u8207 ig02 \u540c\u4e00\u5c64\u7684\u76ee\u9304\uff0c\u57f7\u884c python\uff1a<\/p>\n<p><img decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0a\u534811.48.51\" border=\"0\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532231363-593685888.png\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0a\u534811.48.51\"><\/p>\n<p>\u958b\u59cb\u8a13\u7df4\u6a21\u578b\uff1a<\/p>\n<pre style=\"box-sizing: border-box; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 16px; white-space: pre-wrap; break-inside: avoid; direction: ltr; margin: 0px 0px 1.275em; padding: 0.85em 1em; border: none; color: #333333; overflow: auto; word-wrap: normal; background: #f7f7f7; letter-spacing: 0.2px;\"><code class=\"lang-python\" style=\"box-sizing: border-box; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 0.85em; break-inside: avoid; direction: ltr; margin: 0px; padding: 0px; border: none; color: inherit; background: 0px 0px; display: inline; max-width: initial; overflow: initial; line-height: inherit; white-space: pre;\"><span class=\"hljs-keyword\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8959a8; font-size:inherit; text-size-adjust:none\">import<\/span> turicreate <span class=\"hljs-keyword\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8959a8; font-size:inherit; text-size-adjust:none\">as<\/span> tc\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Load the data<\/span>\ndata =  tc.SFrame(<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'ig02.sframe'<\/span>)\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Make a train-test split<\/span>\ntrain_data, test_data = data.random_split(<span class=\"hljs-number\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#f5871f; font-size:inherit; text-size-adjust:none\">0.8<\/span>)\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Create a model, \u9019\u88e1\u52a0\u4e0a max_iterations = 500 \u7e2e\u77ed\u8a13\u7df4\u6642\u9593\uff0c\u5148\u628a\u6d41\u7a0b\u8dd1\u5b8c\n# \u52a0\u4e0a _advanced_parameters={'batch_size':24} \u5247\u662f\u89e3\u6c7a GPU \u8a18\u61b6\u9ad4 &lt; 4GB \u5c0e\u81f4 Loss \u51fa\u73fe nan \u7684\u554f\u984c\n<\/span>\nmodel = tc.object_detector.create(train_data,max_iterations = 500, _advanced_parameters={'batch_size':24})\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Save predictions to an SArray<\/span>\npredictions = model.predict(test_data)\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Evaluate the model and save the results into a dictionary<\/span>\nmetrics = model.evaluate(test_data)\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Save the model for later use in Turi Create<\/span>\nmodel.save(<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'mymodel.model'<\/span>)\n<span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># Export for use in Core ML<\/span>\nmodel.export_coreml(<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'MyCustomObjectDetector.mlmodel'<\/span>)<\/code><\/pre>\n<p>\u9019\u6642\u5019\u53ef\u807d\u5230\u986f\u793a\u5361\u98a8\u6247\u8d77\u98db\u7684\u8072\u97f3\uff0cR9-280X \u7684\u6eab\u5ea6\u5927\u7d04\u5728 79~81 \u5ea6\u3002\u5982\u679c\u518d\u8dd1\u4e45\u4e00\u9ede\uff08max_iterations \u6578\u5b57\u52a0\u5927\uff09\uff0c\u9084\u53ef\u4ee5\u96b1\u7d04\u805e\u5230\u623f\u9593\u7a7a\u6c23\u4e2d\u4e00\u80a1\u6e05\u6de1\u7684\u5851\u81a0\u5473&#8230;<\/p>\n<p><img decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53484.35.43\" border=\"0\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532248613-2803860502.png?v=1532248615\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53484.35.43\"><\/p>\n<p>\u82e5 Loss \u7684\u503c\u96a8\u8457 Iteration \u9032\u5ea6\u800c\u8d8a\u4f86\u8d8a\u5c0f\uff0c\u8868\u793a\u8a13\u7df4\u6709\u6b63\u5e38\u9032\u884c\u3002\u82e5 Loss \u503c\u8d8a\u4f86\u8d8a\u5927\uff0c\u6216\u662f\u51fa\u73fe nan \u503c\uff0c\u5247\u8868\u793a\u8a13\u7df4\u5931\u6557\uff0c\u6709\u5f88\u591a\u7a2e\u53ef\u80fd\uff0c\u5f97\u4e0a\u7db2\u67e5\u4e00\u4e0b\u539f\u56e0\u3002\u9019\u6b21\u8a13\u7df4\u5728 Iterations = 500 \u7684\u53c3\u6578\u4e0b\uff0c\u8017\u6642\u5927\u7d04\u516d\u5206\u9418\uff08\u5982\u679c\u662f CPU \u5927\u6982\u8981 1~2 \u500b\u5c0f\u6642\uff0c\u4f60\u4e0d\u6703\u60f3\u7b49\u7684\uff09\uff0c\u6700\u5f8c\u6211\u5011\u5f97\u5230\u4e00\u500b\u300cMyCustomObjectDetector.mlmodel\u300d\u7684 Core ML \u6a21\u578b\u3002\u53ef\u4ee5\u5c07 python \u547d\u4ee4\u4e2d\u7684\u300cpredictions\u300d\u8207\u300cmetrics\u300d\u7684\u5167\u5bb9\u5370\u51fa\u4f86\u770b\u770b\uff0c\u8a55\u4f30\u9019\u7d44\u6a21\u578b\u7684\u53ef\u4fe1\u5ea6\u5982\u4f55\u3002<\/p>\n<p>\u5982\u679c\u628a\u986f\u5361\u63db\u6210 GTX-780 \u9032\u884c\u8a13\u7df4\uff0c&nbsp;\u5f97\u5230\u5dee\u7570\u5f88\u5927\u7684\u7d50\u679c\uff1a<\/p>\n<p>batch_size = 24<\/p>\n<p><img decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-27 \u4e0b\u534811.58.53\" border=\"0\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532707221-595119497_l.png?v=1532707223\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-27 \u4e0b\u534811.58.53\"><\/p>\n<p>batch_size = 16<\/p>\n<p><img decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-28 \u4e0a\u534812.17.07\" border=\"0\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532708289-4103361024_l.png\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-28 \u4e0a\u534812.17.07\"><\/p>\n<p>\u76f8\u540c\u8a13\u7df4\u8cc7\u6599\u8207\u53c3\u6578\u4e0b\uff08batch_size = 24, max_iterations = 500\uff09\uff0cGTX-780 \u4f7f\u7528\u4e86\u6bd4 R9-280X \u66f4\u591a\u7684\u6642\u9593\uff08557 \u79d2 vs 342 \u79d2\uff09\uff0c\u6a21\u578b\u4fe1\u4efb\u5ea6\u4e5f\u6bd4\u8f03\u4f4e\u3002\u5c07 batch_size \u4e0b\u4fee\u5230 16 \u6642\u8a13\u7df4\u6642\u9593\u6709\u52a0\u5feb\uff0c\u4f46\u8a13\u7df4\u51fa\u4f86\u7684\u4fe1\u4efb\u5ea6\u66f4\u4f4e\uff0c\u6a21\u578b\u53ef\u7528\u6027\u5c31\u5475\u5475\u4e86\u3002<\/p>\n<p>\u5728 Turi Create &#8211; Object Detector \u7684\u6848\u4f8b\u4e2d\uff0cR9-280X \u986f\u5361\u6bd4 GTX-780 \u66f4\u9069\u5408\u62ff\u4f86\u8a13\u7df4\uff0c\u8207\u524d\u4e00\u7bc7 Xcode 10 \u7684\u5f71\u50cf\u8fa8\u8b58\u662f\u5b8c\u5168\u76f8\u53cd\u7684\u7d50\u679c\u3002\u81f3\u65bc\u7d14 CPU \u8a13\u7df4\u6240\u82b1\u7684\u6642\u9593\uff0c\u521d\u4f30\u7d04 R9-280X \u7684 9 ~ 10 \u500d\uff0c\u6c92\u6709\u7b49\u5b83\u8dd1\u5b8c\uff0c\u56e0\u70ba\u5be6\u5728\u592a\u4e45\u4e86\uff0c\u76f8\u540c\u7684\u8a13\u7df4\u53c3\u6578\u4e0b\u9810\u4f30\u8981\u4e00\u500b\u591a\u5c0f\u6642\u3002<\/p>\n<p><strong><span style=\"color:#FF0000\">2019-01-26 \u88dc\u5145<\/span>\uff1aRadeon Vega 56 8G HMB2 \u7684\u8a13\u7df4\u6210\u7e3e<\/strong><\/p>\n<p>\u53bb\u5e74\u5f9e\u8766\u76ae\u8cfc\u5165\u4e00\u5f35 Radeon Vega 56 \u7926\u5361\u5f8c\uff0c\u6eff\u5fc3\u671f\u5f85\u5b83\u7684\u8a13\u7df4\u8868\u73fe\uff0c\u6c92\u60f3\u5230 macOS Mojave 10.14 \u7cfb\u7d71<a href=\"https:\/\/github.com\/apple\/turicreate\/issues\/1236\" target=\"_blank\">\u7adf\u7136\u6709 BUG<\/a> \u5c0e\u81f4\u8a13\u7df4\u5931\u6557\uff0c\u76f4\u5230\u9019\u5169\u5929 10.14.4 Beta \u91cb\u51fa\u5f8c\u624d\u89e3\u6c7a\u9019\u500b\u554f\u984c\u3002Radeon Vega 56 \u8a13\u7df4\u7d50\u679c\u5982\u4e0b\uff1a<\/p>\n<p>batch_size = 24<\/p>\n<p><img decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2019-01-26 \u4e0b\u53486.19.26.png\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1548498301-1790764359.png\" title=\"\u87a2\u5e55\u5feb\u7167 2019-01-26 \u4e0b\u53486.19.26.png\"><\/p>\n<p>\u76f8\u540c\u7684\u8a13\u7df4\u96c6\u548c\u53c3\u6578\uff0cRadeon Vega 56 \u53ea\u82b1\u4e86 261 \u79d2\u89e3\u6c7a\uff0c\u6bd4 Radeon R9-280X \u5feb\u4e86\u7d04 30%\u3002\u6eab\u5ea6\u7684\u90e8\u5206\u5927\u7d04\u5728 68~78 \u5ea6\u4e4b\u9593\u5f98\u5f8a\u3002<\/p>\n<p>\u6709\u95dc BUG \u8a73\u60c5\u8acb\u95b1\u8b80\u300c<a href=\"http:\/\/benjenq.pixnet.net\/blog\/post\/46433256\" target=\"_blank\">\u9ed1\u860b\u679c\u5b89\u88dd AMD Radeon RX Vega 56<\/a>\u300d\u6587\u7ae0\u3002<\/p>\n<p><strong><span style=\"font-size:10pt\">\u767c\u4f48\u81f3 iOS App<\/span><\/strong><\/p>\n<p>\u63a5\u8457\u7528 iOS \u7a0b\u5f0f\u53bb\u5be6\u969b\u9a57\u8b49\u6a21\u578b\u7684\u4f7f\u7528\u65b9\u5f0f\u548c\u300c\u4fe1\u4efb\u5ea6\u300d\uff08confidence\uff09\u3002<\/p>\n<p>\u6559\u5b78\u6587\u4ef6\u4e5f\u63d0\u4f9b\u4e86 <a href=\"https:\/\/apple.github.io\/turicreate\/docs\/userguide\/object_detection\/export-coreml.html#deployment-for-ios-12-and-macos-1014-turi-create-5\" target=\"_blank\">swift \u7248\u7684 iOS \u7a0b\u5f0f\u7bc4\u4f8b<\/a>\uff0c\u6240\u5e78\u5c0d\u61c9 iOS 12 \u7684\u7a0b\u5f0f\u4e0d\u8907\u96dc\uff0c\u53ef\u4ee5\u5f88\u5feb\u7684\u6539\u5beb\u6210\u719f\u6089\u7684 Object-C \u7a0b\u5f0f\u3002\u53d6\u5f97\u7684\u7d50\u679c\u4e2d\uff0c\u5ea7\u6a19\u7cfb\u7d71\u4e2d\u7684 Y \u8ef8\u5fc5\u9808\u7d93\u904e\u8f49\u63db\uff0c\u7a0b\u5f0f\u7d30\u7bc0\u4e0d\u591a\u8ac7\uff0c\u7a0b\u5f0f\u7684\u91cd\u9ede\u5982\u4e0b\uff1a<span class=\"Apple-converted-space\">&nbsp;<\/span><\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; <\/span><span class=\"s1\">MyDetector<\/span> *mlmodel = [[<span class=\"s1\">MyDetector<\/span> <span class=\"s2\">alloc<\/span>] <span class=\"s2\">init<\/span>];<\/p>\n<p class=\"p2\">&nbsp; &nbsp; \/\/&nbsp;<span style=\"background-color:#1f1f24; color:#ffffff; font-family:menlo\">featureImage \u662f\u88ab\u5075\u6e2c\u7684\u5716\u7247\uff0cUIImage \u7269\u4ef6<\/span><\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; <\/span><span class=\"s4\">CGSize<\/span> featureImageSize = featureImage.<span class=\"s4\">size<\/span>;<\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; <\/span><span class=\"s4\">VNCoreMLModel<\/span> *visionModel = [<span class=\"s4\">VNCoreMLModel<\/span> <span class=\"s2\">modelForMLModel<\/span>:mlmodel.<span class=\"s1\">model<\/span> <span class=\"s2\">error<\/span>:<span class=\"s6\"><strong>nil<\/strong><\/span>];<\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; <\/span><span class=\"s4\">VNCoreMLRequest<\/span> *objectRecognition = [[<span class=\"s4\">VNCoreMLRequest<\/span> <span class=\"s2\">alloc<\/span>] <span class=\"s2\">initWithModel<\/span>:visionModel <span class=\"s2\">completionHandler<\/span>:^(<span class=\"s4\">VNRequest<\/span> * <span class=\"s6\"><strong>_Nonnull<\/strong><\/span> request, <span class=\"s4\">NSError<\/span> * <span class=\"s6\"><strong>_Nullable<\/strong><\/span> error) {<\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span><span class=\"s6\"><strong>if<\/strong><\/span> (request.<span class=\"s4\">results<\/span> == <span class=\"s6\"><strong>nil<\/strong><\/span>) {<\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <strong style=\"background-color:#1f1f24; color:#fc5fa3; font-family:menlo\">return<\/strong><\/span>;<\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>}<\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span><span class=\"s6\"><strong>if<\/strong><\/span> (request.<span class=\"s4\">results<\/span>.<span class=\"s4\">count<\/span> &lt;= <span class=\"s7\">0<\/span> ) {<\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span><strong style=\"background-color:#1f1f24; color:#fc5fa3; font-family:menlo\">return<\/strong>;<\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>}<\/p>\n<p class=\"p6\"><span class=\"s3\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span><span class=\"s6\"><strong>for<\/strong><\/span><span class=\"s3\"> (<\/span>VNRecognizedObjectObservation<span class=\"s3\"> *foundObject <\/span><span class=\"s6\"><strong>in<\/strong><\/span><span class=\"s3\"> request.<\/span>results<span class=\"s3\">) {<\/span><\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span><span class=\"s4\">VNClassificationObservation<\/span> *bestLabel = [foundObject.<span class=\"s4\">labels<\/span> <span class=\"s2\">firstObject<\/span>];<\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span><span class=\"s4\">CGRect<\/span> objectBounds = foundObject.<span class=\"s4\">boundingBox<\/span>;<\/p>\n<p class=\"p4\"><span class=\"s3\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span><em>\/\/\u767c\u73fe Y \u8ef8\u602a\u602a\u7684\uff0c\u505a\u4fee\u6b63<\/em><\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span><span class=\"s4\">CGRect<\/span> fixBouns = <span class=\"s2\">CGRectMake<\/span>(objectBounds.<span class=\"s4\">origin<\/span>.<span class=\"s4\">x<\/span>,<\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span><span class=\"s7\">1.0f<\/span> &#8211; (objectBounds.<span class=\"s4\">origin<\/span>.<span class=\"s4\">y<\/span> + objectBounds.<span class=\"s4\">size<\/span>.<span class=\"s4\">height<\/span>),<\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>objectBounds.<span class=\"s4\">size<\/span>.<span class=\"s4\">width<\/span>, objectBounds.<span class=\"s4\">size<\/span>.<span class=\"s4\">height<\/span>);<\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span><span class=\"s4\">CGRect<\/span> rect = <span class=\"s2\">CGRectMake<\/span>(fixBouns.<span class=\"s4\">origin<\/span>.<span class=\"s4\">x<\/span> * featureImageSize.<span class=\"s4\">width<\/span>,<\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>fixBouns.<span class=\"s4\">origin<\/span>.<span class=\"s4\">y<\/span> * featureImageSize.<span class=\"s4\">height<\/span>,<\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>fixBouns.<span class=\"s4\">size<\/span>.<span class=\"s4\">width<\/span> * featureImageSize.<span class=\"s4\">width<\/span>,<\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span>fixBouns.<span class=\"s4\">size<\/span>.<span class=\"s4\">height<\/span> * featureImageSize.<span class=\"s4\">height<\/span>);<\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/span><span class=\"s2\">NSLog<\/span>(<span class=\"s5\">@&#8221;%@ (%.2f %%) ==&gt; %f,%f,%f,%f&#8221;<\/span>,bestLabel.<span class=\"s4\">identifier<\/span>, bestLabel.<span class=\"s4\">confidence<\/span> * <span class=\"s7\">100<\/span> , rect.<span class=\"s4\">origin<\/span>.<span class=\"s4\">x<\/span>, rect.<span class=\"s4\">origin<\/span>.<span class=\"s4\">y<\/span>, rect.<span class=\"s4\">size<\/span>.<span class=\"s4\">width<\/span>, rect.<span class=\"s4\">size<\/span>.<span class=\"s4\">height<\/span>);<\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span>}<\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; <\/span>}];<\/p>\n<p class=\"p5\"><span class=\"s3\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; <\/span>objectRecognition.<\/span><span class=\"s4\">imageCropAndScaleOption<\/span><span class=\"s3\"> = <\/span>VNImageCropAndScaleOptionScaleFill<span class=\"s3\">;<\/span><\/p>\n<p class=\"p6\"><span class=\"s3\">&nbsp; &nbsp; <\/span>VNImageRequestHandler<span class=\"s3\"> *requestHandler = [[<\/span>VNImageRequestHandler<span class=\"s2\">alloc<\/span><span class=\"s3\">] <\/span><span class=\"s2\">initWithCGImage<\/span><span class=\"s3\">:featureImage.<\/span>CGImage<span class=\"s2\">options<\/span><span class=\"s3\">:<\/span><span class=\"s7\">@{}<\/span><span class=\"s3\">];<\/span><\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; <\/span><span class=\"s4\">NSError<\/span> *error = <span class=\"s6\"><strong>nil<\/strong><\/span>;<\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; <\/span>[requestHandler <span class=\"s2\">performRequests<\/span>:<span class=\"s7\">@[<\/span>objectRecognition<span class=\"s7\">]<\/span> <span class=\"s2\">error<\/span>:&amp;error];<\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; <\/span><span class=\"s6\"><strong>if<\/strong><\/span> (error) {<\/p>\n<p class=\"p3\"><span class=\"s3\">&nbsp; &nbsp; &nbsp; &nbsp; <\/span><span class=\"s2\">NSLog<\/span><span class=\"s3\">(<\/span>@&#8221;VNImageRequestHandler:performRequests Error: %@&#8221;<span class=\"s3\">,error.<\/span><span class=\"s4\">localizedDescription<\/span><span class=\"s3\">);<\/span><\/p>\n<p class=\"p2\"><span class=\"Apple-converted-space\">&nbsp; &nbsp; <\/span>}<\/p>\n<p class=\"p1\"><span class=\"Apple-converted-space\">&nbsp;<\/span>\u5982\u679c\u7522\u751f\u7684\u6a21\u578b\u8981\u7d66 iOS 11 \u4f7f\u7528\u7684\u8a71\uff0c<code class=\"lang-python\" style=\"box-sizing: border-box; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 0.85em; break-inside: avoid; direction: ltr; margin: 0px; padding: 0px; border: none; color: inherit; background: 0px 0px; display: inline; max-width: initial; overflow: initial; line-height: inherit; white-space: pre;\">model.export_coreml \u9700\u52a0\u4e0a <\/code><code class=\"lang-python\" style=\"box-sizing: border-box; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 0.85em; break-inside: avoid; direction: ltr; margin: 0px; padding: 0px; border: none; color: inherit; background: 0px 0px; display: inline; max-width: initial; overflow: initial; line-height: inherit; white-space: pre;\">include_non_maximum_suppression = <span class=\"hljs-keyword\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8959a8; font-size:inherit; text-size-adjust:none\">False <\/span><\/code><code class=\"lang-python\" style=\"box-sizing: border-box; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 0.85em; break-inside: avoid; direction: ltr; margin: 0px; padding: 0px; border: none; color: inherit; background: 0px 0px; display: inline; max-width: initial; overflow: initial; line-height: inherit; white-space: pre;\">\u53c3\u6578\uff1a<\/code><\/p>\n<pre style=\"color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 16px; margin: 0px 0px 1.275em; box-sizing: border-box; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; white-space: pre-wrap; break-inside: avoid; direction: ltr; padding: 0.85em 1em; border: none; overflow: auto; word-wrap: normal; background: #f7f7f7; letter-spacing: 0.2px;\"><code class=\"lang-python\" style=\"box-sizing: border-box; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 0.85em; break-inside: avoid; direction: ltr; margin: 0px; padding: 0px; border: none; color: inherit; background: 0px 0px; display: inline; max-width: initial; overflow: initial; line-height: inherit; white-space: pre;\">model.export_coreml(<span class=\"hljs-string\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#718c00; font-size:inherit; text-size-adjust:none\">'MyCustomObjectDetector.mlmodel'<\/span>, include_non_maximum_suppression=<span class=\"hljs-keyword\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8959a8; font-size:inherit; text-size-adjust:none\">False<\/span>)<\/code><\/pre>\n<p>\u4e0d\u904e\u5c0d\u61c9 iOS11 \u7684\u7a0b\u5f0f\u6703\u6709\u500b\u9ebb\u7169\u3002\u5fc5\u9808\u7d93\u904e\u4e00\u5806\u95d5\u503c\u904e\u6ffe\u3001\u6291\u5236\u904e\u6ffe\u3001\u77e9\u9663\u8655\u7406\u8207\u8f49\u63db\uff0c\u9019\u500b\u90e8\u5206\u6559\u5b78\u6307\u5357\u4ecd\u7136\u662f swift \u7248\u7684\u7bc4\u4f8b\uff0c\u88e1\u9762\u6709\u4e00\u6bb5\u77e9\u9663\u7684\u5beb\u6cd5\u5be6\u5728\u662f\u770b\u4e0d\u592a\u61c2\u3002\u9084\u597d\u6709\u500b\u5c0d\u5cb8\u7684\u540c\u80de\u5beb\u51fa<a href=\"https:\/\/www.jianshu.com\/p\/b7993fc032da\" target=\"_blank\">\u5c0d\u61c9 Object-C<\/a> \u7684\u7a0b\u5f0f\uff0c\u5169\u76f8\u5c0d\u7167\u4e4b\u4e0b\u4e5f\u5f04\u61c2\u4e86\u3002\u800c\u5c0d\u61c9 iOS11 \u7684 Core ML \u6a21\u578b\uff0c\u8f38\u51fa\u7684\u5ea7\u6a19 Y \u8ef8\u4e26\u4e0d\u9700\u8981\u8f49\u63db\uff0c\u6aa2\u6e2c\u7684\u4fe1\u4efb\u5ea6\u503c\u4e5f\u6bd4\u8f03\u4f4e\u3002<\/p>\n<p>\u525b\u597d\u641c\u5c0b\u5230\u4e00\u5f35\u8eca\u5b50\u8f09\u8457\u8173\u8e0f\u8eca\u7684\u5716\u7247\uff0c\u7d50\u679c\uff1a<\/p>\n<p><img decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53485.26.00\" border=\"0\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532251571-4073196743.png?v=1532251572\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53485.26.00\"><\/p>\n<p>\u9019\u5f35\u660e\u78ba\u6a19\u793a\u51fa\u6c7d\u8eca\u8207\u55ae\u8eca\u3002<\/p>\n<p><img decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53485.24.49\" border=\"0\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532251514-457840602.png?v=1532251515\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53485.24.49\"><\/p>\n<p>\u9019\u5f35\u53ea\u6a19\u793a\u51fa\u55ae\u8eca\uff0c\u6c7d\u8eca\u7684\u6a19\u793a\u61c9\u8a72\u662f\u88ab\u6291\u5236\u6389\u4e86\u3002<\/p>\n<p>\u96a8\u6a5f\u4e0a\u7db2\u641c\u5c0b\u8173\u8e0f\u8eca\u6216\u6c7d\u8eca\u7684\u5716\u7247\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u534812.31.23\" border=\"0\" height=\"628\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532234128-3086117722.png\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u534812.31.23\" width=\"481\"><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u534812.35.00\" border=\"0\" height=\"501\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532234128-3330052735.png\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u534812.35.00\" width=\"482\"><\/p>\n<p>\u8fa8\u8b58\u5ea6\u76f8\u7576\u7684\u4e0d\u932f\uff0c\u4e0d\u904e\u5c0d\u6578\u91cf\u7684\u5224\u5b9a\u6709\u6642\u6703\u6709\u8aa4\u5dee\uff0c\u6703\u628a\u4e00\u500b\u7269\u9ad4\u6a19\u793a\u6210\u5169\u500b\u4ee5\u4e0a\u3002 iOS 12 \u7684\u7a0b\u5f0f\u9084\u6c92\u7814\u7a76\u5982\u4f55\u624b\u52d5\u8abf\u6574\u300c\u6291\u5236\u5ea6\u300d\uff0c\u5b83\u662f\u6839\u64da\u6a21\u578b\u5167\u7684 Metadata \u81ea\u52d5\u8a2d\u7f6e\uff08\u9810\u8a2d\u503c\u70ba 0.45\uff0c\u4e5f\u5c31\u662f\u5169\u584a\u5340\u57df\u4ea4\u758a\u8d85\u904e 45% \u6642\u6703\u6291\u5236\u5176\u4e2d\u4e00\u584a\u4e0d\u986f\u793a\uff09\u3002<\/p>\n<p>\u5f9e\u7d50\u679c\u770b\u4f86\uff0c\u7bc4\u4f8b\u7684\u64cd\u4f5c\u8207\u8a13\u7df4\u662f\u6210\u529f\u7684\uff0c\u4e0d\u904e\u8a13\u7df4\u6a21\u578b\u7684\u8cc7\u6599\u662f\u7d93\u904e\u4eba\u70ba\u4ecb\u5165\u6316\u6398\u5f59\u6574\uff0c\u4e26\u7d93\u6b77\u5404\u7a2e AI \u6f14\u7b97\u6cd5\u7684\u5343\u9318\u767e\u934a\u4e4b\u5f8c\uff0c\u624d\u6210\u70ba\u6559\u5b78\u7bc4\u4f8b\u3002\u7136\u800c\u5982\u540c\u4e0a\u4e00\u7bc7\u6587\u7ae0\u4e2d\u6240\u8a00\uff0c\u6a5f\u68b0\u5b78\u7fd2\u771f\u6b63\u7684\u50f9\u503c\uff0c\u5728\u65bc\u5982\u4f55\u91dd\u5c0d\u7279\u5b9a\u9700\u6c42\uff0c\u53bb\u6536\u96c6\u3001\u6316\u6398\u51fa\u53ef\u7528\u7684\u8a13\u7df4\u8cc7\u6599\uff0c\u5426\u5247\u5373\u4f7f\u6703\u5beb\u6f14\u7b97\u3001\u7cbe\u901a\u7a0b\u5f0f\uff0c\u537b\u6316\u6398\u4e0d\u5230\u53ef\u7528\u7684\u8a13\u7df4\u8cc7\u6599\uff0c\u4e00\u5207\u4e5f\u90fd\u662f\u6789\u7136\u3002<\/p>\n<p>\u6240\u4ee5\u518d\u6b21\u7528\u4e0a\u6b21\u4e0d\u7b97\u6210\u529f\u7684\u300c\u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\u300d\u70ba\u4f8b\uff0c\u85c9\u7531\u9019\u6b21\u5b78\u5230\u7684\u65b0\u8a13\u7df4\u65b9\u5f0f\uff0c\u5617\u8a66\u770b\u770b\u7d50\u679c\u5982\u4f55\u3002<\/p>\n<p><span style=\"font-size:12pt\"><strong>\u518d\u4e00\u6b21\u6a21\u64ec\u60c5\u5883\uff1a\u8a13\u7df4\u8fa8\u8b58\u65b0\u7684\u4e8b\u7269 &#8211; \u300cGogoro \u63db\u96fb\u7ad9\u300d<\/strong><\/span><\/p>\n<p>\u521d\u59cb\u8cc7\u6599\u6536\u96c6\u5c31\u5982\u540c\u4e0a\u6b21\u63d0\u5230\u7684\uff0c\u5f9e\u5b98\u7db2\u7684\u7db2\u9801\u4e2d\uff0c\u6488\u53d6\u6240\u6709\u7684\u63db\u96fb\u7ad9\u8cc7\u6599\u3002\u9019\u6bb5\u6642\u9593\u53c8\u6709\u5e7e\u500b\u65b0\u958b\u7684\u7ad9\u9ede\uff0c\u6240\u4ee5\u6488\u5230\u7684\u63db\u96fb\u7ad9\u5716\u7247\u4f86\u5230 955 \u5f35\u3002\u7136\u800c\u7576\u6211\u518d\u56de\u5230\u300ccars &amp; bikes\u300d\u7bc4\u4f8b\u8cc7\u6599\uff0c\u8a66\u8457\u5f9e\u88e1\u9762\u627e\u51fa\u5f59\u6574\u7684\u908f\u8f2f\uff0c\u76ee\u7779\u7684\u9019\u4e00\u5e55\uff0c\u8b93\u5168\u570b\u5169\u5343\u4e09\u767e\u842c\u4eba\u90fd\u9a5a\u5446\u4e86&#8230;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53485.54.18\" border=\"0\" height=\"561\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532253279-3155803514.png\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53485.54.18\" width=\"535\"><\/p>\n<p>\u7bc4\u4f8b\u4f7f\u7528\u7684\u8cc7\u6599\u96c6\uff0c\u662f\u5c07\u8a13\u7df4\u8cc7\u6599\u6a19\u8a3b\u70ba\u300cimage\u300d\u8207\u300cmask\u300d\u5169\u7a2e\u985e\u578b\uff0c\u63db\u8a00\u4e4b\uff0c\u6bcf\u4e00\u5f35\u62ff\u4f86\u8a13\u7df4\u7684 image \u539f\u59cb\u8cc7\u6599\uff0c\u90fd\u5f97\u5c0d\u61c9\u4e00\u5f35\u4ee5\u4e0a\u7684 mask.(x) \u5716\u7247\u3002 \u5f9e\u8a13\u7df4\u8cc7\u6599\u7db2\u7ad9\u4e0a\u7684\u9019\u6bb5\u8aaa\u660e\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53486.03.25\" border=\"0\" height=\"408\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532253828-1957877505.png?v=1532253830\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53486.03.25\" width=\"537\"><\/p>\n<h2 style=\"padding-top: 8px; font-family: verdana, sans-serif;\">Details<\/h2>\n<p style=\"text-align: justify; font-family: verdana, sans-serif; font-size: medium;\">Our team re-annotated&nbsp;<em>cars<\/em>,&nbsp;<em>bicycles<\/em>&nbsp;and&nbsp;<em>people<\/em>&nbsp;on the original set of images. Only some&#8230;<\/p>\n<p>\u6a19\u8a3b\u8cc7\u6599\u7684\u5de5\u4f5c\u662f\u4e00\u6574\u500b\u5718\u968a\u5728\u57f7\u884c\uff0c\u4e26\u975e\u53ea\u6709\u4e00\u4eba\uff0c\u6bcf\u4e00\u5f35\u7684 mask \u90fd\u662f\u7d93\u904e\u4eba\u70ba\u6a19\u8a3b\u8207\u6aa2\u9a57\uff0c\u4ed4\u7d30\u7684\u628a\u6bcf\u4e00\u5f35\u8a13\u7df4\u5716\u7247\uff0c\u5c07\u7269\u9ad4\u7684\u8f2a\u5ed3\u5340\u57df\uff08\u7d05\u8272\uff09\u548c\u88ab\u906e\u853d\u5340\uff08\u7da0\u8272\uff09\u756b\u51fa\u4f86\u3002<\/p>\n<p>\u770b\u5230\u9019\u500b\u60c5\u6cc1\uff0c\u518d\u770b\u5230\u6293\u53d6\u7684 955 \u5f35 Gogoro \u63db\u96fb\u7ad9\u7684\u539f\u59cb\u5716\u7247\uff0c\u6211\u7684\u773c\u7736\u6fd5\u4e86\uff0c\u5169\u884c\u6e05\u6dda\u4e0d\u7981\u6f78\u7136\u843d\u4e0b&#8230;.<\/p>\n<p>\u5982\u679c\u4f9d\u7167\u4e0a\u9762\u7684\u6210\u529f\u7bc4\u4f8b\uff0c\u90a3\u6211\u5f97\u9010\u4e00\u6a19\u8a3b\u51fa\u6bcf\u5f35\u7165\u96fb\u7ad9\u7684 mask \u5716\u7247\uff0c\u5c0d\u500b\u4eba\u4f86\u8aaa\uff0c\u9019\u7c21\u76f4\u662f\u9245\u5927\u7684\u5de5\u7a0b\u3002\u96e3\u9053\u6211&#8230;\u53c8\u518d\u5ea6\u5361\u95dc\u4e86\u55ce\uff1f\u63a5\u4e0b\u4f86\u7684\u5e7e\u5929\uff0c\u518d\u5ea6\u9677\u5165\u4e00\u9023\u4e32\u7684\u82e6\u601d\uff1a<\/p>\n<p>\u300c\u4eba\u70ba\u4f5c\u696d\u4e0b\uff0c\u5982\u4f55\u7528\u6700\u5feb\u901f\u3001\u6700\u9593\u55ae\u7684\u65b9\u6cd5\uff0c\u6b63\u78ba\u7684\u6a19\u8a3b\u8a13\u7df4\u8cc7\u6599\uff1f\u300d<\/p>\n<p>\u70ba\u4e86\u5c0b\u627e\u554f\u984c\u7684\u7b54\u6848\uff0c\u7dda\u7d22\u518d\u56de\u5230\u7df4\u7fd2\u7684\u7b2c\u4e00\u6bb5 Python \u7a0b\u5f0f\uff0c\u53bb\u7814\u8b80\u6bcf\u4e00\u6bb5 Python \u5230\u5e95\u5728\u505a\u4ec0\u9ebc\u4e8b\u60c5\uff0c\u662f\u5982\u4f55\u5f59\u6574 cars \u548c bikes \u7576\u4e2d\u500b\u5225\u6a19\u793a\u70ba image \u8207 mask \u8cc7\u6599\uff0c\u6700\u5f8c\u53c8\u50b3\u4e86\u54ea\u4e9b\u8cc7\u6599\u7d66\u6a5f\u68b0\u53bb\u5b78\u7fd2\u3002\u7d93\u904e\u5f88\u591a\u5929\u7684\u6478\u7d22\uff0c\u7814\u8b80 <a href=\"https:\/\/apple.github.io\/turicreate\/docs\/api\/index.html#\" target=\"_blank\">Turi Create API<\/a> \u6587\u4ef6\u5f8c\uff0c\u7b54\u6848\u5c31\u5728 python \u7a0b\u5f0f\u7684\u6700\u5f8c\uff0c\u6211\u52a0\u4e0a\u4e00\u884c\u6307\u4ee4\uff1a<\/p>\n<pre style=\"color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 16px; margin: 0px 0px 1.275em; box-sizing: border-box; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; white-space: pre-wrap; break-inside: avoid; direction: ltr; padding: 0.85em 1em; border: none; overflow: auto; word-wrap: normal; background: #f7f7f7; letter-spacing: 0.2px;\"><code class=\"lang-python\" style=\"box-sizing: border-box; -webkit-tap-highlight-color: transparent; text-size-adjust: none; -webkit-font-smoothing: antialiased; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 0.85em; break-inside: avoid; direction: ltr; margin: 0px; padding: 0px; border: none; color: inherit; background: 0px 0px; display: inline; max-width: initial; overflow: initial; line-height: inherit; white-space: pre;\"><span class=\"hljs-comment\" style=\"-webkit-font-smoothing:antialiased; -webkit-tap-highlight-color:transparent; box-sizing:border-box; color:#8e908c; font-size:inherit; text-size-adjust:none\"># \u700f\u89bd\u8a13\u7df4\u8cc7\u6599\u96c6\u5167\u5bb9<\/span>\nsf.explore()<\/code><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53486.30.03\" border=\"0\" height=\"569\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532255430-2932296723.png\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53486.30.03\" width=\"534\"><\/p>\n<p>\u7d42\u65bc\u53c8\u5f04\u61c2\u4e86\uff0c\u7b2c\u4e00\u6bb5 python \u7a0b\u5f0f\u4e2d\uff0cmark \u5716\u7247\u7d93\u904e\u4e00\u9023\u4e32\u9ad8\u6df1\u83ab\u6e2c\u7684 python \u7a0b\u5e8f\u5f8c\uff0c\u6700\u7d42\u4e5f\u53ea\u662f\u7522\u751f annonation \u6a19\u8a3b\u3002\u6bcf\u4e00\u500b\u6a19\u8a3b\u5340\u57df\uff0c\u4e5f\u53ea\u662f\u63cf\u8ff0\u7269\u9ad4\u6700\u5927\u8f2a\u5ed3\u7684\u77e9\u5f62\u7bc4\u570d\u548c\u4e2d\u5fc3\u9ede\u5ea7\u6a19\u7f77\u4e86\u3002\u5927\u6982\u50cf\u4e0b\u5716\u9019\u6a23\uff1a<\/p>\n<p><img decoding=\"async\" alt=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" border=\"0\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532277497-833375747.png\" title=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\"><\/p>\n<p>\u63db\u8a00\u4e4b\uff0c\u53ea\u8981\u627e\u51fa\u4e00\u500b\u5feb\u901f\u6a19\u8a3b\u5716\u7247\u7684\u65b9\u6cd5\uff0c\u7522\u751f\u5c0d\u61c9\u4e14\u6b63\u78ba\u7684 annonations \u6587\u5b57\u8cc7\u6599\u5c31\u884c\u4e86\uff0c\u4e26\u4e0d\u9700\u8981\u6bcf\u5f35\u8a13\u7df4\u5716\u7247\u90fd\u5f97\u5f04\u4e00\u5f35\u6a19\u8a3b\u7269\u9ad4\u5b8c\u6574\u8f2a\u5ed3\u908a\u7de3\u7684 mask \u5716\u7247\uff0c\u7562\u7adf\u90a3\u662f\u5f88\u9f90\u5927\u7684\u5de5\u7a0b\u3002<\/p>\n<p>\u6240\u4ee5\uff0c\u8207\u5176\u8981\u4e00\u5f35\u4e00\u5f35\u6a19\u51fa mask \u6d88\u8017\u5927\u91cf\u6642\u9593\u7684\u5de5\u4f5c\uff0c\u4e0d\u5982\u518d\u82b1\u500b\u5e7e\u5929\u6642\u9593\uff0c\u81ea\u884c\u958b\u767c\u51fa\u4e00\b\u652f\u53ef\u76f4\u89ba\u3001\u5feb\u901f\u6a19\u8a3b\u8a13\u7df4\u5716\u5eab\u7684\u5de5\u5177\u7a0b\u5f0f\uff0c\u5c0d\u6211\u53cd\u800c\u9084\u66f4\u5bb9\u6613\u4e9b\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" height=\"388\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1549351536-1539837989.png\" title=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" width=\"534\"><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" height=\"341\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1549351665-3731310573.png\" title=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" width=\"534\"><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" height=\"416\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1549351776-3652113425.png\" title=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" width=\"534\"><\/p>\n<p>\u9019\u652f\u7a0b\u5f0f\u7d93\u904e\u4e0d\u65b7\u7684\u512a\u5316\u64cd\u4f5c\u4ecb\u9762\u4e4b\u5f8c\uff0c\u6a19\u8a3b\u4e00\u5f35\u63db\u96fb\u7ad9\u7167\u7247\u7684\u6642\u9593\uff0c\u7e2e\u77ed\u5230 10 ~ 20 \u79d2\u3002\u6a19\u8a3b\u5b8c\u6210\u5f8c\u81ea\u52d5\u751f\u6210 Python \u7a0b\u5f0f\u78bc\uff0c\u5167\u5bb9\u5305\u542b\u8a13\u7df4\u8207\u7522\u751f .mlmodel \u6a21\u578b\u7684\u6307\u4ee4\uff0c\u4ee5\u53ca\u300c\u4e00\u9375\u57f7\u884c\u8a13\u7df4\uff08Run Command\uff09\u300d\u529f\u80fd\u3002\u4ee5\u5f8c\u6bcf\u6b21\u7684\u8a13\u7df4\u6642\uff0c\u4e0d\u9700\u518d\u5beb\u4efb\u4f55 Python \u7a0b\u5f0f\u4e86\u3002<\/p>\n<p><span style=\"font-size:10pt\"><strong>\u9a57\u8b49\u6a21\u578b<\/strong><\/span><\/p>\n<p>\u5f9e 955 \u5f35 Gogoro \u63db\u96fb\u7ad9\u5716\u7247\u4e2d\u5feb\u901f\u6311\u4e86\u7d04 30 \u5f35\uff0c\u5927\u7d04\u53ea\u82b1\u4e86\u5341\u5206\u9418\u6a19\u8a3b\u5b8c\u6210\uff0c\u52a0\u4e0a R9-280X \u986f\u5361\uff0c\u53ea\u9700\u4e94\u5206\u9418\u7684\u8a13\u7df4\u6642\u9593\u3002<\/p>\n<p><img decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53487.21.15\" border=\"0\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532258526-1795332412.png\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53487.21.15\"><\/p>\n<p><strong><span style=\"color:#FF0000\">2019-01-26 \u88dc\u5145<\/span>\uff1aRadeon Vega 56 \u8a13\u7df4\u81ea\u88fd Gogoro \u63db\u96fb\u7ad9\u8cc7\u6599\u96c6\u7684\u6210\u7e3e\uff1a<\/strong><\/p>\n<p>batch_size = 24<\/p>\n<p><img decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2019-01-26 \u4e0b\u53486.54.33.png\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1548500248-2784115459.png\" title=\"\u87a2\u5e55\u5feb\u7167 2019-01-26 \u4e0b\u53486.54.33.png\"><\/p>\n<p>batch_size = 32<\/p>\n<p><img decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2019-01-26 \u4e0b\u53486.50.09.png\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1548500297-602710624.png\" title=\"\u87a2\u5e55\u5feb\u7167 2019-01-26 \u4e0b\u53486.50.09.png\"><\/p>\n<p>\u901f\u5ea6\u6bd4 Radeon R9-280X \u5feb\u4e86\u7d04 34 ~ 80%\u3002<\/p>\n<p>&lt;\u88dc\u5145\u7d50\u675f&gt;<\/p>\n<p>\u63a5\u4e0b\u4f86\u662f\u9a57\u6536\u6210\u679c\u7684\u6642\u5019\u4e86\u3002<\/p>\n<p><img decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53487.24.18\" border=\"0\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532258679-1592434556.png\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53487.24.18\"><\/p>\n<p><img decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53487.25.51\" border=\"0\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532258766-1527921580.png?v=1532258767\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53487.25.51\"><\/p>\n<p>\u5e95\u4e0b\u9019\u5f35\u4e5f\u80fd\u8fa8\u8b58\u6210\u529f\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-24 \u4e0a\u534812.46.45\" border=\"0\" height=\"579\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532364499-3483225121.png?v=1532364501\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-24 \u4e0a\u534812.46.45\" width=\"534\"><\/p>\n<p><img decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53487.27.10\" border=\"0\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532258846-3141835121.png?v=1532258847\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53487.27.10\"><\/p>\n<p><img decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53487.29.38\" border=\"0\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532258993-1614876532.png\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53487.29.38\"><\/p>\n<p><img decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53487.31.12\" border=\"0\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532259090-3579899498.png\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53487.31.12\"><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" border=\"0\" height=\"541\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532449085-2555668436.png?v=1532449087\" title=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" width=\"533\"><\/p>\n<p>\u7576\u7136\u4e5f\u627e\u4f86\u7af6\u722d\u5c0d\u624b\u7684\u5047\u63db\u96fb\u7ad9\uff0c\u6a21\u578b\u6c92\u6709\u88ab\u9a19\u5012\u3002<\/p>\n<p><img decoding=\"async\" alt=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53487.32.50\" border=\"0\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1532259186-133572986.png\" title=\"\u87a2\u5e55\u5feb\u7167 2018-07-22 \u4e0b\u53487.32.50\"><\/p>\n<p>\u9019\u500b\u6a21\u578b\u7684\u4fe1\u4efb\u5ea6\uff0c\u9054\u5230\u4e86\u9810\u671f\u7684\u76ee\u6a19\u3002\u9019\u9084\u662f\u53ea\u6709 30 \u5f35\u5716\u7684\u8a13\u7df4\u6210\u7e3e\uff0c\u82e5\u80fd\u7e7c\u7e8c\u52a0\u5165\u66f4\u591a\u7a2e\u63db\u96fb\u7ad9\u5916\u89c0\uff0c\u4ee5\u53ca\u5404\u7a2e\u60c5\u6cc1\u4e0b\u62cd\u651d\u7684\u8a13\u7df4\u7d20\u6750\uff0c\u76f8\u4fe1\u6703\u66f4\u52a0\u6e96\u78ba\u3002<\/p>\n<p><span style=\"font-size:14px\"><strong>2019-10-24 \u88dc\u5145\uff1a\u4f7f\u7528 Create ML \u5be6\u65bd Object Detector<\/strong><\/span><\/p>\n<p>\u5f9e Xcode 11 \u8d77\uff0cCreate ML \u7d42\u65bc\u6709\u81ea\u5df1\u5c08\u5c6c\u7684\u5168\u65b0\u9762\u8c8c\uff0c\u4e0d\u518d\u9700\u8981\u900f\u904e Playground \u4e0b\u6307\u4ee4\u555f\u52d5\u4e86\u3002\u53ef\u4ee5\u5728 Xcode 11 \u529f\u80fd\u9078\u55ae&nbsp;Developer Tools \u9805\u76ee\u627e\u5230 Create ML\uff0c\u88e1\u9762\u6709 8 \u7a2e\u6a21\u578b\u8a13\u7df4\uff0c\u5176\u4e2d\u4e5f\u5305\u542b\u4e86 Object Detector \u8a13\u7df4\u3002<\/p>\n<p>\u64cd\u4f5c\u5f88\u7c21\u55ae\uff0c\u5feb\u901f\u8aaa\u660e\u4e00\u4e0b\u3002\u8a73\u7d30\u7684\u8aaa\u660e\u53ef\u53c3\u8003&nbsp;<a href=\"https:\/\/developer.apple.com\/videos\/play\/wwdc2019\/424\/\" target=\"_blank\">WWDC2019<\/a>\u3002<\/p>\n<p>1. \u5c07\u8a13\u7df4\u7d20\u6750\uff08\u5716\u7247\uff09\u8207\u6a19\u8a3b\u8cc7\u6599\uff08 .json\uff09\u653e\u5728\u540c\u4e00\u500b\u76ee\u9304\u3002<\/p>\n<p><img decoding=\"async\" alt=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1571935894-2497299665.png\" title=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\"><\/p>\n<p>\u8a72\u76ee\u9304\u5305\u542b\u591a\u5f35\u5716\u6a94\u8207\u4e00\u500b json \u683c\u5f0f\u7684\u6a19\u8a3b\u6a94\u3002\u6839\u64da\u860b\u679c\u7684\u8aaa\u660e\uff0c json \u7684\u5167\u5bb9\u5927\u6982\u9577\u5f97\u50cf\u9019\u6a23\uff1a<\/p>\n<p><img decoding=\"async\" alt=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1571974717-986825592.png\" title=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\"><\/p>\n<p>2. \u958b\u555f Xcode\uff0c\u529f\u80fd\u8868 Xcode -&gt;&nbsp;Open Developer Tool -&gt; Create ML\u3002<\/p>\n<p>3. \u9078\u64c7 Object Detector\uff0c<\/p>\n<p><img decoding=\"async\" alt=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1571936036-2973735559.png\" title=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\"><\/p>\n<p>4. \u586b\u5beb\u8cc7\u8a0a<\/p>\n<p><img decoding=\"async\" alt=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1571936167-3275202148.png\" title=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\"><\/p>\n<p>5. \u9078\u64c7 1)\u8a13\u7df4\u7d20\u6750\u76ee\u9304 2)\u958b\u59cb\u8a13\u7df4\u3002\u6309\u7167\u860b\u679c\u7684\u8aaa\u6cd5\uff0c\u5b83\u6703\u81ea\u52d5\u512a\u5148\u4f7f\u7528 Mac \u96fb\u8166\u4e0a\u7368\u7acb\u986f\u5361 GPU \u4f86\u9032\u884c\u8a13\u7df4\uff0c\u82e5\u6c92\u6709 GPU \u7684\u8a71\u5247\u4f7f\u7528 CPU\u3002\u8a13\u7df4\u901f\u5ea6 GPU \u6bd4 CPU \u5feb 9~13 \u500d\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" height=\"389\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1571936644-3805284822.png\" title=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" width=\"589\"><\/p>\n<p>\u4f7f\u7528\u4e00\u6a23\u7684 Gogoro \u63db\u96fb\u7ad9\u8a13\u7df4\u5716\u5eab\uff0cIterations \u4e00\u6a23\u8a2d\u5b9a\u5728 500\uff0cRadeon VEGA 56 \u53ea\u82b1\u4e86 1 \u5206 56 \u79d2\uff08116 \u79d2\uff09\u5c31\u5b8c\u6210\u4e86\uff0c\u6bd4\u4e4b\u524d\u4f7f\u7528&nbsp;Turi Create \u7684 250 \u79d2\u8db3\u8db3\u5feb\u4e0a\u4e00\u500d\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" height=\"558\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1571936938-1182231661.png\" title=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" width=\"608\"><\/p>\n<p>\u8a13\u7df4\u5b8c\u6210\u4e4b\u5f8c\uff0c\u5728 Output \u6309\u9215\u4f4d\u7f6e\u6703\u751f\u6210\u4e00\u500b\u6a94\u6848\u5716\u793a\u3002\u7528\u6ed1\u5c6c\u62d6\u66f3\u6a94\u6848\u5716\u793a\uff0c\u5c31\u80fd\u628a\u8a13\u7df4\u597d\u7684\u6a21\u578b\u64f7\u53d6\u51fa\u4f86\u3002Output \u9019\u9801\u9084\u63d0\u4f9b\u7c21\u6613\u7684\u6e2c\u8a66\uff0c\u76f4\u63a5\u628a\u5716\u7247\u62c9\u9032\u53bb\u5c31\u80fd\u770b\u7d50\u679c\u3002<\/p>\n<p><img decoding=\"async\" alt=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1571937206-2106998942.png\" title=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\"><\/p>\n<p>\u4e0a\u9762\u9019\u5f35\u662f\u7db2\u8def\u641c\u5c0b\u7684\u5716\u7247\uff0c\u53ef\u4fe1\u5ea6 100%\u3002<\/p>\n<p><img decoding=\"async\" alt=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\" src=\"https:\/\/pic.pimg.tw\/benjenq\/1571937215-1858912703.png\" title=\"\u3010\u6a5f\u68b0\u5b78\u7fd2\u3011\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\"><\/p>\n<p>\u4ed6\u5ee0\u7684(\u5047)\u63db\u96fb\u7ad9\uff0c\u4f9d\u7136\u9003\u4e0d\u904e\u6cd5\u773c\uff0c\u6c92\u6709\u88ab\u9a19\u5012\u3002<\/p>\n<p>Create ML \u7684 Object Detector \u5de5\u5177\u53ef\u7bc0\u7701\u64b0\u5beb Python \u7a0b\u5f0f\u78bc\u7684\u5de5\u4f5c\uff0c\u4e26\u63d0\u4f9b\u6e2c\u8a66\u4ecb\u9762\uff0c\u4f7f\u7528\u4e0a\u5f88\u65b9\u4fbf\u3002\u53ef\u60dc\u7684\u662f\uff0c\u6a19\u8a3b\u5de5\u4f5c\u4ecd\u7136\u5f97\u81ea\u884c\u5b8c\u6210\uff0c\u6240\u4ee5\u4f7f\u7528\u984d\u5916\u7684\u6a19\u8a3b\u5de5\u5177\u662f\u5fc5\u8981\u7684\uff0c\u5148\u524d\u70ba\u81ea\u884c\u958b\u767c\u7684\u5feb\u901f\u6a19\u8a3b\u5de5\u5177\uff0c\u4f9d\u7136\u6d3e\u5f97\u4e0a\u7528\u5834\u3002<\/p>\n<p><strong><span style=\"font-size:10pt\">\u5fc3\u5f97\u5f8c\u8a18 \uff06 \u9ed1\u860b\u679c\u7528\u65bc\u6a5f\u68b0\u5b78\u7fd2\uff1a<\/span><\/strong><\/p>\n<p>\u56de\u60f3\u8d77\u9019\u8d9f Machine Learning \u81ea\u5b78\u4e4b\u8def\u8d70\u5f97\u8dcc\u8dcc\u649e\u649e\uff0c\u524d\u524d\u5f8c\u5f8c\u4e5f\u82b1\u8cbb\u9245\u5927\u7684\u5b78\u7fd2\u6642\u9593\uff0c\u4e5f\u591a\u8667\u6709\u860b\u679c\u53e6\u5916\u63d0\u4f9b\u7684\u6a5f\u68b0\u5b78\u7fd2\u5de5\u5177 Turi Create\uff0c\u5927\u5e45\u964d\u4f4e\u4e86\u9580\u6abb\uff0c\u5982\u4eca\u7e3d\u7b97\u662f\u9054\u6a19\u4e86\uff0c\u4e5f\u5b78\u5230\u4e86\u5982\u4f55\u5feb\u901f\u7684\u6316\u6398\u8207\u6a19\u8a3b\u8cc7\u6599\u3002\u5f9e\u6a19\u8a3b Gogoro \u63db\u96fb\u7ad9\u5716\u7247\u958b\u59cb\uff0c\u5230\u6a21\u578b\u7684\u7522\u51fa\uff0c\u524d\u5f8c\u53ea\u82b1\u4e86\u534a\u500b\u5c0f\u6642\u5c31\u6709\u6eff\u610f\u7684\u7d50\u679c\uff0c\u5c0d\u65bc\u4e0d\u9700\u7279\u5225\u56b4\u8b39\u7684\u61c9\u7528\uff0c\u5df2\u7d93\u662f\u8db3\u5920\u4e86\u3002\u80cc\u5f8c\u6240\u4ee3\u8868\u7684\u4e00\u80a1\u8166\u50bb\u52c1\u8207\u5fc3\u529b\u4ed8\u51fa\uff0c\u548c\u5b78\u7fd2\u904e\u7a0b\u4e2d\u4e0d\u65b7\u7684\u81ea\u6211\u53cd\u7701\uff0c\u53ef\u8aaa\u662f\u7372\u5f97\u96e3\u80fd\u5bf6\u8cb4\u7684\u4e00\u8ab2\u3002<\/p>\n<p>\u300c\u9ed1\u860b\u679c\u300d\u5728 Core ML \u9818\u57df\u6709\u7d55\u5c0d\u7684\u512a\u52e2\u3002\u642d\u914d VEGA 10 GPU \u7684 iMac Pro \u50f9\u683c\u7adf\u9ad8\u9054 15 \u842c 9 \u5343 9 \u767e\u5143\uff0c\u642d\u914d\u7368\u7acb\u986f\u5361\u7684 MacBook Pro \u4e00\u53f0\u4e5f\u8981\u4e03\u842c\u591a\u4e14\u986f\u5361\u6027\u80fd\u4e2d\u4e0b\u3002\u800c\u642d\u914d\u9ad8\u6027\u80fd\u986f\u5361\u7684\u9ed1\u860b\u679c\u96fb\u8166\u5177\u5099\u66f4\u597d\u7684\u8a13\u7df4\u6548\u7387\u8207\u66f4\u4f4e\u5ec9\u7684\u63a1\u8cfc\u6210\u672c\uff0cTuri Create \u9069\u5408\u5728 macOS \u74b0\u5883\u4e2d\u904b\u884c\u7684\u7279\u6027\uff0c\u76ee\u524d\u53c8\u662f\u9580\u6abb\u6700\u4f4e\u7684\u6a5f\u68b0\u5b78\u7fd2\u5957\u4ef6\uff0c\u8b93\u5b89\u88dd\u9ed1\u860b\u679c\u7684\u7406\u7531\u53c8\u591a\u4e86\u9019\u4e00\u9805\u3002<\/p>\n<p>\u96a8\u8457 iOS 12 \u8207 macOS 10.14 Mojave \u6b63\u5f0f\u7248\u5373\u5c07\u65bc\u4e5d\u6708\u4e2d\u65ec\u91cb\u51fa\uff0c\u9664\u4e86\u66f4\u5b8c\u6574\u652f\u63f4 Core ML \u8a13\u7df4\u8207\u958b\u767c\u74b0\u5883\uff0c\u5c24\u5176\u662f iOS 12 \u865f\u7a31\u53ef\u5927\u5e45\u6539\u5584\u76ee\u524d\u6240\u4f7f\u7528\u7684\u624b\u6a5f iPhone 5s \u6548\u80fd\uff0c\u4f7f\u5f97\u4eca\u5e74\u7684\u4e5d\u6708\uff0c\u66f4\u52a0\u4ee4\u4eba\u671f\u5f85\u3002<\/p>\n<style type=\"text\/css\"><!--\np.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}\nspan.s1 {font-variant-ligatures: no-common-ligatures}\n-->\n<\/style>\n<style type=\"text\/css\"><!--\np.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #ffffff; background-color: #1f1f24; min-height: 14.0px}\np.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #ffffff; background-color: #1f1f24}\np.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #fc6a5d; background-color: #1f1f24}\np.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #6c7986; background-color: #1f1f24}\np.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #99e8d5; background-color: #1f1f24}\np.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #7ac8b6; background-color: #1f1f24}\nspan.s1 {color: #91d462}\nspan.s2 {color: #99e8d5}\nspan.s3 {color: #ffffff}\nspan.s4 {color: #7ac8b6}\nspan.s5 {color: #fc6a5d}\nspan.s6 {color: #fc5fa3}\nspan.s7 {color: #9686f5}\n-->\n<\/style>\n<p><script src=\"chrome-extension:\/\/hhojmcideegachlhfgfdhailpfhgknjm\/web_accessible_resources\/index.js\"><\/script><script src=\"chrome-extension:\/\/hhojmcideegachlhfgfdhailpfhgknjm\/web_accessible_resources\/index.js\"><\/script><script src=\"chrome-extension:\/\/hhojmcideegachlhfgfdhailpfhgknjm\/web_accessible_resources\/index.js\"><\/script><script src=\"chrome-extension:\/\/hhojmcideegachlhfgfdhailpfhgknjm\/web_accessible_resources\/index.js\"><\/script><script src=\"chrome-extension:\/\/hhojmcideegachlhfgfdhailpfhgknjm\/web_accessible_resources\/index.js\"><\/script><script src=\"chrome-extension:\/\/hhojmcideegachlhfgfdhailpfhgknjm\/web_accessible_resources\/index.js\"><\/script><script src=\"chrome-extension:\/\/hhojmcideegachlhfgfdhailpfhgknjm\/web_accessible_resources\/index.js\"><\/script><script src=\"chrome-extension:\/\/hhojmcideegachlhfgfdhailpfhgknjm\/web_accessible_resources\/index.js\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u60c5\u63d0\u8981\uff1a\u6559\u4f60\u7684 iPhone \u8a8d\u8b58 Gogoro \u63db\u96fb\u7ad9\uff08Part 1\uff09- \u7528\u9ed1\u860b\u679c\u96fb\u8166\u73a9\u8f49\u6700\u592f\u7684\u6a5f\u68b0\u5b78\u7fd2\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[56],"tags":[],"class_list":["post-3834","post","type-post","status-publish","format-standard","hentry","category-56"],"_links":{"self":[{"href":"http:\/\/benjenq.ddns.net\/blog\/wp-json\/wp\/v2\/posts\/3834","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/benjenq.ddns.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/benjenq.ddns.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/benjenq.ddns.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/benjenq.ddns.net\/blog\/wp-json\/wp\/v2\/comments?post=3834"}],"version-history":[{"count":0,"href":"http:\/\/benjenq.ddns.net\/blog\/wp-json\/wp\/v2\/posts\/3834\/revisions"}],"wp:attachment":[{"href":"http:\/\/benjenq.ddns.net\/blog\/wp-json\/wp\/v2\/media?parent=3834"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/benjenq.ddns.net\/blog\/wp-json\/wp\/v2\/categories?post=3834"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/benjenq.ddns.net\/blog\/wp-json\/wp\/v2\/tags?post=3834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}