{"id":22745,"date":"2024-10-25T10:27:12","date_gmt":"2024-10-25T02:27:12","guid":{"rendered":"https:\/\/aif.amtbbs.org\/?p=22745"},"modified":"2024-10-25T10:27:12","modified_gmt":"2024-10-25T02:27:12","slug":"%e5%9f%ba%e4%ba%8e%e8%87%aa%e5%ae%9a%e4%b9%89%e6%95%b0%e6%8d%ae%e9%9b%86%e7%9a%84yolov8%e6%a8%a1%e5%9e%8b%e5%ae%9e%e6%88%98","status":"publish","type":"post","link":"https:\/\/aif.amtbbs.org\/index.php\/2024\/10\/25\/22745\/","title":{"rendered":"\u57fa\u4e8e\u81ea\u5b9a\u4e49\u6570\u636e\u96c6\u7684YOLOv8\u6a21\u578b\u5b9e\u6218"},"content":{"rendered":"<p style=\"font-weight: 400;\">\u672c\u6587\u5c06\u901a\u8fc7\u4e00\u4e2a\u5b8c\u6574\u7684\u5b9e\u6218\u6848\u4f8b\u6765\u5c55\u793a\u4f7f\u7528Python\u3001\u547d\u4ee4\u884c\u6216Google Colab\u7b49\u65b9\u5f0f\u5728\u81ea\u5b9a\u4e49\u6570\u636e\u96c6\u4e0a\u8bad\u7ec3\u81ea\u5df1\u7684\u8ba1\u7b97\u673a\u89c6\u89c9\u6a21\u578b\u3002<\/p>\n<p><img data-dominant-color=\"0f4879\" data-has-transparency=\"false\" style=\"--dominant-color: #0f4879;\" loading=\"lazy\" decoding=\"async\" class=\"not-transparent alignnone size-full wp-image-22747\" src=\"https:\/\/aiforumimage.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2024\/10\/aa94bea1-a80a-4aef-99ba-e846dd42a2ba-300x167-1.png\" width=\"300\" height=\"167\" alt=\"\" srcset=\"https:\/\/aiforumimage.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2024\/10\/aa94bea1-a80a-4aef-99ba-e846dd42a2ba-300x167-1.png 300w, https:\/\/aiforumimage.oss-cn-shanghai.aliyuncs.com\/wp-content\/uploads\/2024\/10\/aa94bea1-a80a-4aef-99ba-e846dd42a2ba-300x167-1-150x84.png 150w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<h2>\u7b80\u4ecb<\/h2>\n<p>\u5f53\u524d\uff0cUltralytics\u516c\u53f8\u7814\u5236\u7684\u9ad8\u7ea7YOLOv8\u6a21\u578b\u6210\u4e3a\u89e3\u51b3\u8ba1\u7b97\u673a\u89c6\u89c9\u95ee\u9898\u7684\u6700\u4f73\u65b9\u6cd5\u4e4b\u4e00\uff0c\u540c\u65f6\u8be5\u6a21\u578b\u4e5f\u6700\u5927\u9650\u5ea6\u5730\u51cf\u5c11\u4e86\u6709\u5173\u5f00\u53d1\u8fc7\u7a0b\u906d\u9047\u7684\u9ebb\u70e6\u3002YOLOv8\u662fUltralytics YOLO\uff08You Only Look Once\uff09\u7cfb\u5217\u6a21\u578b\u7684\u7b2c8\u6b21\u4e5f\u662f\u6700\u65b0\u4e00\u6b21\u8fed\u4ee3\uff0c\u4e0e\u5176\u4ed6\u8fed\u4ee3\u4e00\u6837\uff0c\u5b83\u4f7f\u7528\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\uff08CNN\uff09\u6765\u9884\u6d4b\u5bf9\u8c61\u7c7b\u522b\u53ca\u5176\u8fb9\u754c\u6846\u3002YOLO\u7cfb\u5217\u5bf9\u8c61\u63a2\u6d4b\u5668\u4ee5\u51c6\u786e\u548c\u5feb\u901f\u800c\u95fb\u540d\uff0c\u5e76\u63d0\u4f9b\u4e86\u4e00\u4e2a\u57fa\u4e8ePyTorch\u6784\u5efa\u7684\u5e73\u53f0\uff0c\u4ece\u800c\u7b80\u5316\u4e86\u4eba\u4eec\u4ece\u5934\u5f00\u59cb\u521b\u5efa\u6a21\u578b\u7684\u5927\u90e8\u5206\u8fc7\u7a0b\u3002<\/p>\n<p>\u5c24\u5176\u91cd\u8981\u7684\u662f\uff0cYOLOv8\u4e5f\u662f\u4e00\u4e2a\u975e\u5e38\u7075\u6d3b\u7684\u6a21\u578b\u3002\u5b83\u53ef\u4ee5\u5728\u5404\u79cd\u5e73\u53f0\u4e0a\u4f7f\u7528\u4f60\u9009\u62e9\u7684\u4efb\u4f55\u6570\u636e\u96c6\u8fdb\u884c\u8bad\u7ec3\uff0c\u9884\u6d4b\u6a21\u578b\u53ef\u4ee5\u57fa\u4e8e\u8bb8\u591a\u6570\u636e\u6e90\u8fd0\u884c\u3002\u672c\u6587\u5c06\u4f5c\u4e3a\u4e00\u4e2a\u5168\u9762\u7684\u6559\u7a0b\uff0c\u6db5\u76d6\u8bad\u7ec3\u548c\u8fd0\u884cYOLOv8\u6a21\u578b\u7684\u8bb8\u591a\u4e0d\u540c\u65b9\u6cd5\uff0c\u5e76\u5c55\u793a\u6bcf\u79cd\u65b9\u6cd5\u7684\u4f18\u7f3a\u70b9\uff0c\u8fd9\u4e9b\u65b9\u6cd5\u5c06\u6839\u636e\u4f60\u7684\u786c\u4ef6\u548c\u6570\u636e\u96c6\u5e2e\u4f60\u9009\u62e9\u6700\u5408\u9002\u7684\u5f00\u53d1\u65b9\u6848\u3002<\/p>\n<p>\u3010\u6ce8\u610f\u3011\u672c\u6587\u4e2d\u521b\u5efa\u4e0a\u8ff0\u793a\u4f8b\u6570\u636e\u96c6\u65f6\u4f7f\u7528\u7684\u6240\u6709\u56fe\u50cf\u5747\u7531\u4f5c\u8005\u672c\u4eba\u62cd\u6444\u3002<\/p>\n<h2>\u5f00\u53d1\u73af\u5883\u642d\u5efa<\/h2>\n<p>\u8981\u5f00\u59cb\u8bad\u7ec3\u6211\u4eec\u7684YOLOv8\u6a21\u578b\uff0c\u7b2c\u4e00\u6b65\u662f\u51b3\u5b9a\u6211\u4eec\u60f3\u5728\u4ec0\u4e48\u6837\u7684\u73af\u5883\u4e2d\u8bad\u7ec3\u6211\u4eec\u7684\u6a21\u578b\uff08\u8bf7\u8bb0\u4f4f\uff0c\u8bad\u7ec3\u548c\u8fd0\u884c\u6a21\u578b\u662f\u5355\u72ec\u7684\u4efb\u52a1\uff09\u3002<\/p>\n<p>\u5f52\u7eb3\u6765\u770b\uff0c\u53ef\u4f9b\u6211\u4eec\u9009\u62e9\u7684\u73af\u5883\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u53ef\u4ee5\u5206\u4e3a\u4e24\u7c7b\uff1a\u57fa\u4e8e\u672c\u5730\u8fd0\u884c\u548c\u57fa\u4e8e\u4e91\u7aef\u65b9\u6848\u8fd0\u884c\u3002<\/p>\n<p>\u901a\u8fc7\u57fa\u4e8e\u672c\u5730\u7684\u8bad\u7ec3\uff0c\u6211\u4eec\u57fa\u672c\u4e0a\u662f\u4f7f\u7528\u8bbe\u5907\u7684\u7269\u7406\u786c\u4ef6\u76f4\u63a5\u5728\u6211\u4eec\u7684\u7cfb\u7edf\u4e0a\u8fd0\u884c\u8bad\u7ec3\u8fc7\u7a0b\u3002\u5728\u57fa\u4e8e\u672c\u5730\u7684\u8bad\u7ec3\u4e2d\uff0cYOLOv8\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e86\u4e24\u4e2a\u9009\u9879\uff1aPython API\u548cCLI\u3002\u8fd9\u4e24\u79cd\u9009\u62e9\u7684\u7ed3\u679c\u6216\u901f\u5ea6\u6ca1\u6709\u771f\u6b63\u7684\u533a\u522b\uff0c\u56e0\u4e3a\u540c\u6837\u7684\u8fc7\u7a0b\u662f\u5728\u5e55\u540e\u8fdb\u884c\u7684\uff1b\u552f\u4e00\u7684\u533a\u522b\u5728\u4e8e\u8bad\u7ec3\u7684\u8bbe\u7f6e\u548c\u8fd0\u884c\u65b9\u5f0f\u3002<\/p>\n<p>\u53e6\u4e00\u65b9\u9762\uff0c\u57fa\u4e8e\u4e91\u7aef\u7684\u8bad\u7ec3\u5141\u8bb8\u4f60\u5229\u7528\u4e91\u670d\u52a1\u5668\u7684\u786c\u4ef6\u3002\u901a\u8fc7\u4f7f\u7528\u4e92\u8054\u7f51\uff0c\u4f60\u53ef\u4ee5\u8fde\u63a5\u5230\u4e91\u8fd0\u884c\u65f6\u5e76\u6267\u884c\u4ee3\u7801\uff0c\u5c31\u50cf\u5728\u672c\u5730\u8ba1\u7b97\u673a\u4e0a\u4e00\u6837\uff0c\u53ea\u662f\u73b0\u5728\u5b83\u5728\u4e91\u786c\u4ef6\u4e0a\u8fd0\u884c\u3002<\/p>\n<p>\u5230\u76ee\u524d\u4e3a\u6b62\uff0c\u6700\u53d7\u6b22\u8fce\u7684\u673a\u5668\u5b66\u4e60\u4e91\u5e73\u53f0\u662f\u8c37\u6b4cColab\u3002\u5b83\u4f7f\u7528Jupyter\u7b14\u8bb0\u672c\u683c\u5f0f\uff0c\u5141\u8bb8\u7528\u6237\u521b\u5efa\u53ef\u4ee5\u7f16\u5199\u548c\u8fd0\u884c\u4ee3\u7801\u7247\u6bb5\u7684\u201c\u5355\u5143\u683c\u201d\uff0c\u5e76\u63d0\u4f9b\u4e0eGoogle Drive\u548cGithub\u7684\u5f3a\u5927\u96c6\u6210\u3002<\/p>\n<p>\u4f60\u51b3\u5b9a\u4f7f\u7528\u54ea\u79cd\u73af\u5883\u5728\u5f88\u5927\u7a0b\u5ea6\u4e0a\u53d6\u51b3\u4e8e\u4f60\u53ef\u7528\u7684\u786c\u4ef6\u3002\u5982\u679c\u4f60\u6709\u4e00\u4e2a\u914d\u5907\u9ad8\u7aefNVIDIA GPU\u7684\u5f3a\u5927\u7cfb\u7edf\uff0c\u57fa\u4e8e\u672c\u5730\u7684\u8bad\u7ec3\u53ef\u80fd\u4f1a\u5bf9\u4f60\u5f88\u6709\u6548\u3002\u5982\u679c\u4f60\u7684\u672c\u5730\u673a\u5668\u7684\u786c\u4ef6\u4e0d\u7b26\u5408\u673a\u5668\u5b66\u4e60\u7684\u914d\u7f6e\u5efa\u8bae\uff0c\u6216\u8005\u4f60\u53ea\u662f\u60f3\u8981\u6bd4\u672c\u5730\u66f4\u591a\u7684\u8ba1\u7b97\u80fd\u529b\uff0c\u8c37\u6b4cColab\u53ef\u80fd\u662f\u4f60\u66f4\u6070\u5f53\u7684\u9009\u62e9\u3002<\/p>\n<p>\u8c37\u6b4cColab\u6700\u5927\u7684\u597d\u5904\u4e4b\u4e00\u662f\u5b83\u514d\u8d39\u63d0\u4f9b\u4e86\u4e00\u4e9b\u8ba1\u7b97\u8d44\u6e90\uff0c\u4f46\u4e5f\u6709\u4e00\u4e2a\u7b80\u5355\u7684\u5347\u7ea7\u8def\u5f84\uff0c\u53ef\u4ee5\u8ba9\u4f60\u5229\u7528\u66f4\u5feb\u7684\u8ba1\u7b97\u786c\u4ef6\u3002\u5373\u4f7f\u4f60\u5df2\u7ecf\u6709\u4e86\u4e00\u4e2a\u5f3a\u5927\u7684\u7cfb\u7edf\uff0c\u5982\u679c\u8c37\u6b4cColab\u7684\u9ad8\u5c42\u8ba1\u5212\u4e2d\u63d0\u4f9b\u7684\u66f4\u5feb\u7684GPU\u6bd4\u4f60\u73b0\u6709\u7684\u786c\u4ef6\u6709\u663e\u8457\u7684\u6027\u80fd\u63d0\u5347\uff0c\u4f60\u4e5f\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u8c37\u6b4cColab\u3002\u4f7f\u7528\u514d\u8d39\u8ba1\u5212\uff0c\u4f60\u53ea\u80fd\u4f7f\u7528NVIDIA T4\uff0c\u5176\u6027\u80fd\u5927\u81f4\u76f8\u5f53\u4e8eRTX 2070\u3002\u5bf9\u4e8e\u66f4\u9ad8\u7ea7\u522b\u914d\u7f6e\u7684\u8ba1\u5212\uff0cL4\uff08\u6027\u80fd\u7ea6\u4e3a4090\uff09\u548cA100\uff08\u6027\u80fd\u7ea62 4090\uff09\u662f\u53ef\u7528\u7684\u3002\u5728\u6bd4\u8f83GPU\u65f6\uff0c\u8bf7\u8bb0\u4f4fVRAM\u7684\u6570\u91cf\u662f\u673a\u5668\u5b66\u4e60\u6027\u80fd\u7684\u4e3b\u8981\u51b3\u5b9a\u56e0\u7d20\u3002<\/p>\n<h2>\u6570\u636e\u96c6<\/h2>\n<p>\u4e3a\u4e86\u5f00\u59cb\u8bad\u7ec3\u6a21\u578b\uff0c\u4f60\u9700\u8981\u5927\u91cf\u6570\u636e\u6765\u8bad\u7ec3\u5b83\u3002\u5bf9\u8c61\u68c0\u6d4b\u6570\u636e\u96c6\u901a\u5e38\u7531\u5404\u79cd\u5bf9\u8c61\u7684\u56fe\u50cf\u96c6\u5408\u7ec4\u6210\uff0c\u6b64\u5916\u8fd8\u6709\u4e00\u4e2a\u56f4\u7ed5\u5bf9\u8c61\u7684\u201c\u8fb9\u754c\u6846\u201d\uff0c\u6307\u793a\u5176\u5728\u56fe\u50cf\u4e2d\u7684\u4f4d\u7f6e\u3002<\/p>\n<p>\u68c0\u6d4b\u5230\u7684\u5bf9\u8c61\u5468\u56f4\u7684\u8fb9\u754c\u6846\u793a\u4f8b<\/p>\n<p>YOLOv8\u517c\u5bb9\u7684\u6570\u636e\u96c6\u5177\u6709\u7279\u5b9a\u7684\u7ed3\u6784\u3002\u5b83\u4eec\u4e3b\u8981\u5206\u4e3a\u6709\u6548\u6587\u4ef6\u5939\u3001\u8bad\u7ec3\u6587\u4ef6\u5939\u548c\u6d4b\u8bd5\u6587\u4ef6\u5939\uff0c\u5206\u522b\u7528\u4e8e\u6a21\u578b\u7684\u9a8c\u8bc1\u3001\u8bad\u7ec3\u548c\u6d4b\u8bd5\uff08\u9a8c\u8bc1\u548c\u6d4b\u8bd5\u4e4b\u95f4\u7684\u533a\u522b\u5728\u4e8e\uff0c\u5728\u9a8c\u8bc1\u8fc7\u7a0b\u4e2d\uff0c\u7ed3\u679c\u7528\u4e8e\u8c03\u6574\u6a21\u578b\u4ee5\u63d0\u9ad8\u5176\u51c6\u786e\u6027\uff1b\u800c\u5728\u6d4b\u8bd5\u8fc7\u7a0b\u4e2d\uff0c\u7ed3\u679c\u4ec5\u7528\u4e8e\u63d0\u4f9b\u6a21\u578b\u771f\u5b9e\u4e16\u754c\u51c6\u786e\u6027\u7684\u8861\u91cf\u6807\u51c6\uff09\u3002<\/p>\n<p>\u5728\u6bcf\u4e2a\u6587\u4ef6\u5939\u4e2d\uff0c\u6570\u636e\u96c6\u8fdb\u4e00\u6b65\u5206\u4e3a\u4e24\u4e2a\u6587\u4ef6\u5939\uff1a\u56fe\u50cf\uff08images\uff09\u548c\u6807\u7b7e\uff08labels\uff09\u6587\u4ef6\u5939\u3002\u8fd9\u4e24\u4e2a\u6587\u4ef6\u5939\u7684\u5185\u5bb9\u7d27\u5bc6\u76f8\u8fde\u3002<\/p>\n<p>\u987e\u540d\u601d\u4e49\uff0cimages\u6587\u4ef6\u5939\u5305\u542b\u6570\u636e\u96c6\u7684\u6240\u6709\u5bf9\u8c61\u56fe\u50cf\u3002\u8fd9\u4e9b\u56fe\u50cf\u901a\u5e38\u5177\u6709\u65b9\u5f62\u7eb5\u6a2a\u6bd4\u3001\u4f4e\u5206\u8fa8\u7387\u548c\u5c0f\u7684\u6587\u4ef6\u5c3a\u5bf8\u3002<\/p>\n<p>labels\u6587\u4ef6\u5939\u5305\u542b\u8fb9\u754c\u6846\u5728\u6bcf\u4e2a\u56fe\u50cf\u4e2d\u7684\u4f4d\u7f6e\u548c\u5927\u5c0f\u7684\u6570\u636e\uff0c\u4ee5\u53ca\u6bcf\u4e2a\u56fe\u50cf\u8868\u793a\u7684\u5bf9\u8c61\u7684\u7c7b\u578b\uff08\u6216\u7c7b\u522b\uff09\u3002\u4f8b\u5982\uff1a<\/p>\n<p>\u8fd9\u91cc\u7684\u7b2c\u4e00\u884c\u6570\u636e\u4ee3\u8868\u56fe\u50cf\u4e2d\u5b58\u5728\u7684\u5355\u4e2a\u5bf9\u8c61\u3002\u5728\u6bcf\u4e00\u884c\u4e2d\uff0c\u7b2c\u4e00\u4e2a\u6570\u5b57\u8868\u793a\u5bf9\u8c61\u7684\u7c7b\u522b\uff0c\u7b2c\u4e8c\u4e2a\u548c\u7b2c\u4e09\u4e2a\u6570\u5b57\u8868\u793a\u8fb9\u754c\u6846\u4e2d\u5fc3\u7684x\u548cy\u5750\u6807\uff0c\u7b2c\u56db\u4e2a\u548c\u7b2c\u4e94\u4e2a\u6570\u5b57\u8868\u793a\u8fb9\u7f18\u6846\u7684\u5bbd\u5ea6\u548c\u9ad8\u5ea6\u3002<\/p>\n<p>images\u548clabels\u6587\u4ef6\u5939\u4e2d\u7684\u6570\u636e\u901a\u8fc7\u6587\u4ef6\u540d\u94fe\u63a5\u5728\u4e00\u8d77\u3002images\u6587\u4ef6\u5939\u4e2d\u7684\u6bcf\u4e2a\u56fe\u50cf\u5728labels\u6587\u4ef6\u5939\u4e2d\u90fd\u6709\u4e00\u4e2a\u5177\u6709\u76f8\u540c\u6587\u4ef6\u540d\u7684\u76f8\u5e94\u6587\u4ef6\uff1b\u53cd\u4e4b\u4ea6\u7136\u3002\u5728\u6570\u636e\u96c6\u4e2d\uff0cimages\u548clabels\u6587\u4ef6\u5939\u4e2d\u603b\u662f\u6709\u5339\u914d\u7684\u6587\u4ef6\u5bf9\uff0c\u5b83\u4eec\u5177\u6709\u76f8\u540c\u7684\u6587\u4ef6\u540d\uff0c\u4f46\u6587\u4ef6\u6269\u5c55\u540d\u4e0d\u540c\uff1b.jpg\u7528\u4e8e\u56fe\u50cf\uff0c.txt\u7528\u4e8e\u6807\u7b7e\u3002.jpg\u56fe\u7247\u4e2d\u6bcf\u4e2a\u5bf9\u8c61\u7684\u8fb9\u754c\u6846\u6570\u636e\u5305\u542b\u5728\u76f8\u5e94\u7684.txt\u6587\u4ef6\u4e2d\u3002<\/p>\n<p>YOLOv8\u517c\u5bb9\u6570\u636e\u96c6\u7684\u5178\u578b\u6587\u4ef6\u7ed3\u6784\u3002\u6765\u6e90\uff1aUltralytics\u516c\u53f8YOLO\u6587\u6863<\/p>\n<p>\u6709\u51e0\u79cd\u65b9\u6cd5\u53ef\u4ee5\u83b7\u5f97\u4e0eYOLOv8\u517c\u5bb9\u7684\u6570\u636e\u96c6\u6765\u5f00\u59cb\u8bad\u7ec3\u6a21\u578b\u3002\u4f60\u53ef\u4ee5\u521b\u5efa\u81ea\u5df1\u7684\u6570\u636e\u96c6\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u4e92\u8054\u7f51\u4e0a\u9884\u5148\u914d\u7f6e\u7684\u6570\u636e\u96c6\u3002\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u5c06\u4f7f\u7528CVAT\u521b\u5efa\u81ea\u5df1\u7684\u6570\u636e\u96c6\uff0c\u5e76\u4f7f\u7528Kaggle\u67e5\u627e\u9884\u914d\u7f6e\u7684\u6570\u636e\u96c6\u3002<\/p>\n<h2>CVAT<\/h2>\n<p>CVAT\uff08CVAT.ai\uff09\u662f\u4e00\u4e2a\u6ce8\u91ca\u5de5\u5177\uff0c\u5b83\u5141\u8bb8\u4f60\u901a\u8fc7\u624b\u52a8\u65b9\u5f0f\u4e3a\u56fe\u50cf\u548c\u89c6\u9891\u6dfb\u52a0\u6807\u7b7e\u6765\u521b\u5efa\u81ea\u5df1\u7684\u6570\u636e\u96c6\u3002<\/p>\n<p>\u521b\u5efa\u5e10\u6237\u5e76\u767b\u5f55\u540e\uff0c\u5f00\u59cb\u6ce8\u91ca\u7684\u8fc7\u7a0b\u5f88\u7b80\u5355\u3002\u53ea\u9700\u521b\u5efa\u4e00\u4e2a\u9879\u76ee\uff0c\u7ed9\u5b83\u4e00\u4e2a\u5408\u9002\u7684\u540d\u79f0\uff0c\u5e76\u6839\u636e\u9700\u8981\u4e3a\u5c3d\u53ef\u80fd\u591a\u7684\u5bf9\u8c61\u7c7b\u578b\/\u7c7b\u522b\u6dfb\u52a0\u6807\u7b7e\u3002<\/p>\n<p>\u4f5c\u8005\u5728cvat.ai.Video\u4e0a\u521b\u5efa\u65b0\u9879\u76ee\u548c\u6807\u7b7e<\/p>\n<p>\u521b\u5efa\u4e00\u4e2a\u65b0\u4efb\u52a1\uff0c\u5e76\u4e0a\u4f20\u4f60\u5e0c\u671b\u6210\u4e3a\u6570\u636e\u96c6\u4e00\u90e8\u5206\u7684\u6240\u6709\u56fe\u50cf\u3002\u70b9\u51fb\u201cSubmit &amp; Open\u201d\u6309\u94ae\uff0c\u9879\u76ee\u4e0b\u5e94\u521b\u5efa\u4e00\u4e2a\u65b0\u4efb\u52a1\uff0c\u5176\u4e2d\u5305\u542b\u4e00\u4e2a\u4f5c\u4e1a\u3002<\/p>\n<p>\u5728cvat.ai\u4e0a\u521b\u5efa\u65b0\u4efb\u52a1\u548c\u4f5c\u4e1a<\/p>\n<p>\u6253\u5f00\u6b64\u4f5c\u4e1a\u5c06\u5141\u8bb8\u4f60\u542f\u52a8\u6ce8\u91ca\u8fc7\u7a0b\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u77e9\u5f62\u5de5\u5177\u4e3a\u6570\u636e\u96c6\u4e2d\u7684\u6bcf\u4e2a\u56fe\u50cf\u521b\u5efa\u8fb9\u754c\u6846\u548c\u6807\u7b7e\u3002<\/p>\n<p>\u4f7f\u7528cvat.ai\u4e0a\u7684\u77e9\u5f62\u5de5\u5177\u521b\u5efa\u8fb9\u754c\u6846<\/p>\n<p>\u5728\u4e3a\u6240\u6709\u56fe\u50cf\u6dfb\u52a0\u6ce8\u91ca\u540e\uff0c\u8fd4\u56de\u4efb\u52a1\u5e76\u9009\u62e9\u201cActions\uff08\u52a8\u4f5c\uff09\u201d\u2192\u201cExport task dataset\uff08\u5bfc\u51fa\u4efb\u52a1\u6570\u636e\u96c6\uff09\u201d\uff0c\u7136\u540e\u9009\u62e9YOLOv8 Detection 1.0\u4f5c\u4e3a\u5bfc\u51fa\u683c\u5f0f\u3002\u4e0b\u8f7d\u4efb\u52a1\u6570\u636e\u96c6\u540e\uff0c\u4f60\u4f1a\u53d1\u73b0\u5b83\u53ea\u5305\u542blabels\u6587\u4ef6\u5939\uff0c\u800c\u4e0d\u5305\u542bimages\u6587\u4ef6\u5939\uff08\u9664\u975e\u4f60\u5728\u5bfc\u51fa\u65f6\u9009\u62e9\u4e86\u201cSave images\uff08\u4fdd\u5b58\u56fe\u50cf\uff09\u201d\u9009\u9879\uff09\u3002\u4f60\u5fc5\u987b\u624b\u52a8\u521b\u5efaimages\u6587\u4ef6\u5939\u5e76\u5c06\u56fe\u50cf\u79fb\u52a8\u5230\u90a3\u91cc\uff08\u4f60\u53ef\u80fd\u5e0c\u671b\u9996\u5148\u5c06\u56fe\u50cf\u538b\u7f29\u5230\u8f83\u4f4e\u7684\u5206\u8fa8\u7387\uff0c\u4f8b\u5982640&#215;640\uff09\u3002\u8bb0\u4f4f\u4e0d\u8981\u66f4\u6539\u6587\u4ef6\u540d\uff0c\u56e0\u4e3a\u5b83\u4eec\u5fc5\u987b\u4e0elabels\u6587\u4ef6\u5939\u4e2d.txt\u6587\u4ef6\u7684\u6587\u4ef6\u540d\u5339\u914d\u3002\u4f60\u8fd8\u9700\u8981\u51b3\u5b9a\u5982\u4f55\u5728\u9a8c\u8bc1\u3001\u8bad\u7ec3\u548c\u6d4b\u8bd5\u4e4b\u95f4\u5206\u914d\u56fe\u50cf\uff08\u8bad\u7ec3\u662f\u5176\u4e2d\u6700\u91cd\u8981\u7684\uff09\u3002<\/p>\n<p>\u4f5c\u8005\u4ececvat.ai.Image\u5bfc\u51fa\u7684\u793a\u4f8b\u6570\u636e\u96c6<\/p>\n<p>\u81f3\u6b64\uff0c\u4f60\u7684\u6570\u636e\u96c6\u5df2\u5b8c\u6210\u5e76\u51c6\u5907\u597d\u4f7f\u7528\u4e86\uff01<\/p>\n<h2>Kaggle<\/h2>\n<p>Kaggle\uff08Kaggle.com\uff09\u662f\u6700\u5927\u7684\u5728\u7ebf\u6570\u636e\u79d1\u5b66\u793e\u533a\u4e4b\u4e00\uff0c\u4e5f\u662f\u63a2\u7d22\u6570\u636e\u96c6\u7684\u6700\u4f73\u7f51\u7ad9\u4e4b\u4e00\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u7b80\u5355\u5730\u641c\u7d22\u4ed6\u4eec\u7684\u7f51\u7ad9\u6765\u5c1d\u8bd5\u627e\u5230\u4f60\u9700\u8981\u7684\u6570\u636e\u96c6\uff0c\u9664\u975e\u4f60\u6b63\u5728\u5bfb\u627e\u975e\u5e38\u5177\u4f53\u7684\u4e1c\u897f\uff1b\u5426\u5219\uff0c\u4f60\u5f88\u53ef\u80fd\u4f1a\u627e\u5230\u610f\u5411\u7684\u6570\u636e\u96c6\u3002\u7136\u800c\uff0cKaggle\u4e0a\u7684\u8bb8\u591a\u6570\u636e\u96c6\u4e0d\u662fYOLOv8\u517c\u5bb9\u7684\u683c\u5f0f\u548c\/\u6216\u4e0e\u8ba1\u7b97\u673a\u89c6\u89c9\u65e0\u5173\uff1b\u56e0\u6b64\uff0c\u4f60\u53ef\u80fd\u60f3\u5728\u67e5\u8be2\u4e2d\u5305\u542b\u201cYOLOv9\u201d\u6765\u4f18\u5316\u4f60\u7684\u641c\u7d22\u3002<\/p>\n<p>\u4f60\u53ef\u4ee5\u901a\u8fc7\u6570\u636e\u96c6\u7684Data Explorer\uff08\u9875\u9762\u53f3\u4fa7\uff09\u4e2d\u7684\u6587\u4ef6\u7ed3\u6784\u6765\u5224\u65ad\u6570\u636e\u96c6\u662f\u5426\u4e0eYOLOv8\u517c\u5bb9\u3002<\/p>\n<p>Kaggle\u4e0a\u517c\u5bb9YOLOv8\u7684\u6570\u636e\u96c6\u793a\u4f8b<\/p>\n<p>\u5982\u679c\u6570\u636e\u96c6\u76f8\u5bf9\u8f83\u5c0f\uff08\u51e0MB\uff09\u548c\/\u6216\u4f60\u60f3\u5728\u672c\u5730\u8bad\u7ec3\uff0c\u90a3\u4e48\u53ef\u4ee5\u76f4\u63a5\u4eceKaggle\u4e0b\u8f7d\u6570\u636e\u96c6\u3002\u4f46\u662f\uff0c\u5982\u679c\u4f60\u8ba1\u5212\u5728Google Colab\u4e0a\u4f7f\u7528\u5927\u578b\u6570\u636e\u96c6\u8fdb\u884c\u8bad\u7ec3\uff0c\u6700\u597d\u4ece\u7b14\u8bb0\u672c\u6587\u4ef6\u672c\u8eab\u8fdb\u884c\u6570\u636e\u96c6\u68c0\u7d22\uff08\u66f4\u591a\u4fe1\u606f\u89c1\u4e0b\u6587\uff09\u3002<\/p>\n<h2>\u8bad\u7ec3\u6a21\u578b<\/h2>\n<p>\u8bad\u7ec3\u8fc7\u7a0b\u5c06\u6839\u636e\u4f60\u662f\u5728\u672c\u5730\u8fd8\u662f\u5728\u4e91\u7aef\u8fdb\u884c\u8bad\u7ec3\u800c\u6709\u6240\u4e0d\u540c\u3002<\/p>\n<h3>\u672c\u5730<\/h3>\n<p>\u4e3a\u6240\u6709\u8bad\u7ec3\u6587\u4ef6\u521b\u5efa\u4e00\u4e2a\u9879\u76ee\u6587\u4ef6\u5939\u3002\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u5c06\u79f0\u4e4b\u4e3ayolov8-project\u3002\u7136\u540e\uff0c\u5c06\u6570\u636e\u96c6\u79fb\u52a8\/\u590d\u5236\u5230\u6b64\u6587\u4ef6\u5939\u4e0b\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u4f7f\u7528\u6240\u9700\u7684YOLOv8\u4f9d\u8d56\u9879\u8bbe\u7f6ePython\u865a\u62df\u73af\u5883\uff1a<\/p>\n<p>\u590d\u5236<\/p>\n<p>python3 -m venv venv source venv\/bin\/activate pip3 install ultralytics<\/p>\n<ul>\n<li>1.<\/li>\n<li>2.<\/li>\n<li>3.<\/li>\n<\/ul>\n<p>\u7136\u540e\uff0c\u521b\u5efa\u4e00\u4e2a\u540d\u4e3aconfig.yaml\u7684\u914d\u7f6e\u6587\u4ef6\u3002\u8fd9\u4e2a\u6587\u4ef6\u5c06\u4f1a\u6307\u5b9a\u7528\u4e8e\u8bad\u7ec3\u7684\u91cd\u8981\u6570\u636e\u96c6\u4fe1\u606f\uff1a<\/p>\n<p>\u590d\u5236<\/p>\n<p>path: \/Users\/oliverma\/yolov8-project\/dataset\/ # absolute path to dataset test: test\/images # relative path to test images train: train\/images # relative path to training images val: val\/images # relative path to validation images # classes names: 0: bottle<\/p>\n<ul>\n<li>1.<\/li>\n<li>2.<\/li>\n<li>3.<\/li>\n<li>4.<\/li>\n<li>5.<\/li>\n<li>6.<\/li>\n<li>7.<\/li>\n<li>8.<\/li>\n<\/ul>\n<p>\u5728\u4e0a\u9762\u914d\u7f6e\u4fe1\u606f\u7684path\u90e8\u5206\uff0c\u63d0\u4f9b\u7684\u662f\u6307\u5411\u6570\u636e\u96c6\u6839\u76ee\u5f55\u7684\u7edd\u5bf9\u6587\u4ef6\u8def\u5f84\u3002\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528\u76f8\u5bf9\u6587\u4ef6\u8def\u5f84\uff0c\u4f46\u8fd9\u53d6\u51b3\u4e8econfig.yaml\u7684\u76f8\u5bf9\u4f4d\u7f6e\u3002<\/p>\n<p>\u7136\u540e\uff0c\u5728test\u3001train\u548cval\u90e8\u5206\uff0c\u63d0\u4f9b\u7528\u4e8e\u6d4b\u8bd5\u3001\u8bad\u7ec3\u548c\u9a8c\u8bc1\u7684\u56fe\u50cf\u7684\u4f4d\u7f6e\uff08\u5982\u679c\u4f60\u53ea\u6709\u8bad\u7ec3\u56fe\u50cf\uff0c\u5219\u53ea\u9700\u5bf9\u6240\u6709\u8fd9\u4e09\u79cd\u64cd\u4f5c\u5747\u4f7f\u7528train\/images\uff09\u3002<\/p>\n<p>\u5728names\u90e8\u5206\uff0c\u6307\u5b9a\u6bcf\u4e2a\u7c7b\u522b\u7684\u540d\u79f0\u3002\u8fd9\u4e9b\u4fe1\u606f\u901a\u5e38\u53ef\u4ee5\u5728\u4efb\u4f55YOLOv8\u6570\u636e\u96c6\u7684data.yaml\u6587\u4ef6\u4e2d\u627e\u5230\u3002<\/p>\n<p>\u5982\u524d\u6240\u8ff0\uff0cPython API\u6216CLI\uff08\u547d\u4ee4\u884c\u65b9\u5f0f\uff09\u90fd\u53ef\u4ee5\u7528\u6765\u8fdb\u884c\u672c\u5730\u8bad\u7ec3\u3002<\/p>\n<h3>Python API\u65b9\u5f0f<\/h3>\n<p>\u521b\u5efa\u53e6\u4e00\u4e2a\u540d\u4e3amain.py\u7684\u6587\u4ef6\u3002\u8fd9\u662f\u5b9e\u9645\u8bad\u7ec3\u5f00\u59cb\u7684\u5730\u65b9\uff1a<\/p>\n<p>\u590d\u5236<\/p>\n<p>from ultralytics import YOLO model = YOLO(&#8220;yolov8n.yaml&#8221;) model.train(data=&#8221;config.yaml&#8221;, epochs=100)<\/p>\n<ul>\n<li>1.<\/li>\n<li>2.<\/li>\n<li>3.<\/li>\n<\/ul>\n<p>\u901a\u8fc7\u5c06\u6211\u4eec\u7684\u6a21\u578b\u521d\u59cb\u5316\u4e3aYOLO(&#8220;yolov8n.yaml&#8221;)\uff0c\u6211\u4eec\u57fa\u672c\u4e0a\u662f\u4ece\u5934\u5f00\u59cb\u521b\u5efa\u4e00\u4e2a\u65b0\u6a21\u578b\u3002\u6211\u4eec\u4f7f\u7528yolov8n\u662f\u56e0\u4e3a\u5b83\u662f\u6700\u5feb\u7684\u6a21\u578b\uff0c\u4f46\u6839\u636e\u4f60\u81ea\u5df1\u7684\u4f7f\u7528\u60c5\u51b5\uff0c\u4f60\u4e5f\u53ef\u4ee5\u9009\u62e9\u4f7f\u7528\u5176\u4ed6\u6a21\u578b\u3002<\/p>\n<h3>\u6027\u80fd\u6307\u6807<\/h3>\n<p>YOLOv8\u53d8\u4f53\u7684\u6027\u80fd\u6307\u6807\u3002\u6765\u6e90\uff1aUltralytics YOLO\u6587\u6863<\/p>\n<p>\u6700\u540e\uff0c\u6211\u4eec\u5f00\u59cb\u8bad\u7ec3\u6a21\u578b\uff0c\u5e76\u4f20\u9012\u914d\u7f6e\u6587\u4ef6\u548c\u8fed\u4ee3\u6b21\u6570\uff0c\u6216\u8bad\u7ec3\u8f6e\u6570\u3002\u4e00\u4e2a\u6bd4\u8f83\u597d\u7684\u8bad\u7ec3\u6307\u6807\u662f\u4f7f\u7528300\u4e2a\u8bad\u7ec3\u8f6e\u6570\uff0c\u4f46\u4f60\u53ef\u80fd\u60f3\u6839\u636e\u6570\u636e\u96c6\u7684\u5927\u5c0f\u548c\u786c\u4ef6\u7684\u901f\u5ea6\u6765\u8c03\u6574\u8fd9\u4e2a\u6570\u5b57\u3002<\/p>\n<p>\u4f60\u53ef\u80fd\u8fd8\u5e0c\u671b\u5305\u62ec\u4e00\u4e9b\u66f4\u6709\u7528\u7684\u8bbe\u7f6e\uff1a<\/p>\n<ul data-id=\"u738a58b-aJ2LC2Ca\">\n<li data-id=\"ld70c578-KD2DiDMX\">imgsz\uff1a\u5c06\u6240\u6709\u56fe\u50cf\u8c03\u6574\u5230\u6307\u5b9a\u7684\u5927\u5c0f\u3002\u4f8b\u5982\uff0cimgsz=640\u4f1a\u5c06\u6240\u6709\u56fe\u50cf\u7684\u5927\u5c0f\u8c03\u6574\u4e3a640&#215;640\u3002\u5982\u679c\u4f60\u521b\u5efa\u4e86\u81ea\u5df1\u7684\u6570\u636e\u96c6\u5e76\u4e14\u6ca1\u6709\u8c03\u6574\u56fe\u50cf\u5927\u5c0f\uff0c\u8fd9\u5c06\u975e\u5e38\u6709\u7528\u3002<\/li>\n<li data-id=\"ld70c578-989Yden1\">device\uff1a\u6307\u5b9a\u8981\u5728\u54ea\u4e2a\u8bbe\u5907\u4e0a\u8bad\u7ec3\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cYOLOv8\u4f1a\u5c1d\u8bd5\u5728GPU\u4e0a\u8bad\u7ec3\uff0c\u5e76\u4f7f\u7528CPU\u8bad\u7ec3\u4f5c\u4e3a\u540e\u5907\uff0c\u4f46\u5982\u679c\u4f60\u5728M\u7cfb\u5217Mac\u4e0a\u8bad\u7ec3\uff0c\u4f60\u5fc5\u987b\u4f7f\u7528device=&#8221;mps&#8221;\u4ee5\u4fbf\u4f7f\u7528\u82f9\u679c\u7535\u8111\u4e0a\u7684Metal Performance Shaders\uff08mps\uff09\u540e\u7aef\u8fdb\u884cGPU\u52a0\u901f\u8bad\u7ec3\u3002<\/li>\n<li data-id=\"ld70c578-3c5hC8KD\">\u6709\u5173\u6240\u6709\u8bad\u7ec3\u53c2\u6570\u7684\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u8bbf\u95eehttps:\/\/docs.ultralytics.com\/modes\/train\/#train-settings\u3002<\/li>\n<\/ul>\n<p>\u4f60\u7684\u9879\u76ee\u76ee\u5f55\u73b0\u5728\u5e94\u8be5\u770b\u8d77\u6765\u7c7b\u4f3c\u4e8e\u4e0b\u9762\u7684\u6837\u5b50\uff1a<\/p>\n<p>\u9879\u76ee\u76ee\u5f55\u7684\u793a\u4f8b\u6587\u4ef6\u7ed3\u6784<\/p>\n<p>\u73b0\u5728\uff0c\u6211\u4eec\u7ec8\u4e8e\u51c6\u5907\u597d\u5f00\u59cb\u8bad\u7ec3\u6211\u4eec\u7684\u6a21\u578b\u4e86\u3002\u4e3a\u6b64\uff0c\u53ea\u9700\u8981\u5728\u9879\u76ee\u76ee\u5f55\u4e2d\u6253\u5f00\u4e00\u4e2a\u7ec8\u7aef\u5e76\u8fd0\u884c\uff1a<\/p>\n<p>\u590d\u5236<\/p>\n<p>python3 main.py<\/p>\n<ul>\n<li>1.<\/li>\n<\/ul>\n<p>\u968f\u7740\u8bad\u7ec3\u7684\u8fdb\u884c\uff0c\u7ec8\u7aef\u5c06\u663e\u793a\u6bcf\u4e2a\u8bad\u7ec3\u4e16\u4ee3\u7684\u8bad\u7ec3\u8fdb\u5ea6\u4fe1\u606f\u3002<\/p>\n<p>\u7ec8\u7aef\u4e2d\u663e\u793a\u7684\u6bcf\u4e2a\u8bad\u7ec3\u4e16\u4ee3\u7684\u8bad\u7ec3\u8fdb\u5ea6<\/p>\n<p>\u8bad\u7ec3\u7ed3\u679c\u5c06\u4fdd\u5b58\u5728\u8def\u5f84runs\/detect\/train\uff08\u6216\u8005train2\uff0ctrain3\uff0c\u7b49\uff09\u3002\u6ce8\u610f\uff0c\u8fd9\u91cc\u5305\u62ec\u4e86\u6743\u91cd\u6570\u636e\uff08\u6587\u4ef6\u6269\u5c55\u540d\u4e3a.pt\uff09\uff0c\u8fd9\u5bf9\u4ee5\u540e\u8fd0\u884c\u6a21\u578b\u5f88\u91cd\u8981\uff1b\u8fd8\u6709\u6587\u4ef6results.png\uff0c\u5b83\u663e\u793a\u4e86\u8bb8\u591a\u5305\u542b\u76f8\u5173\u8bad\u7ec3\u7edf\u8ba1\u6570\u636e\u7684\u56fe\u8868\u3002<\/p>\n<p>results.png\u6587\u4ef6\u4e2d\u7684\u793a\u4f8b\u56fe<\/p>\n<h3>CLI\u65b9\u5f0f<\/h3>\n<p>\u5728\u9879\u76ee\u76ee\u5f55\u4e2d\u6253\u5f00\u4e00\u4e2a\u65b0\u7ec8\u7aef\u5e76\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>\u590d\u5236<\/p>\n<p>yolo detect train data=config.yaml model=yolov8n.yaml epochs=100<\/p>\n<ul>\n<li>1.<\/li>\n<\/ul>\n<p>\u6b64\u547d\u4ee4\u53ef\u4ee5\u4f7f\u7528\u4e0a\u9762\u4e3aPython API\u5217\u51fa\u7684\u76f8\u540c\u53c2\u6570\u8fdb\u884c\u4fee\u6539\u3002\u4f8b\u5982\uff1a<\/p>\n<p>\u590d\u5236<\/p>\n<p>yolo detect train data=config.yaml model=yolov8n.yaml epochs=300 imgsz=640 device=mps<\/p>\n<ul>\n<li>1.<\/li>\n<\/ul>\n<p>\u8bad\u7ec3\u5c06\u5f00\u59cb\uff0c\u8fdb\u5ea6\u5c06\u663e\u793a\u5728\u7ec8\u7aef\u4e0a\u3002\u5176\u4f59\u7684\u8bad\u7ec3\u8fc7\u7a0b\u4e0ePython CLI\u76f8\u540c\u3002<\/p>\n<h3>\u8c37\u6b4cColab\u65b9\u5f0f<\/h3>\n<p>\u5bfc\u822a\u5230https:\/\/colab.research.google.com\/\uff0c\u5e76\u4e3a\u8bad\u7ec3\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u7b14\u8bb0\u672c\u6587\u4ef6\u3002<\/p>\n<p>\u5728\u8bad\u7ec3\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u901a\u8fc7\u9009\u62e9\u53f3\u4e0a\u89d2\u7684\u201cChange runtime type\uff08\u66f4\u6539\u8fd0\u884c\u65f6\u7c7b\u578b\uff09\u201d\u8fde\u63a5\u5230GPU\u8fd0\u884c\u65f6\u3002CPU\u8fd0\u884c\u65f6\u7684\u8bad\u7ec3\u5c06\u975e\u5e38\u7f13\u6162\u3002<\/p>\n<p>\u5c06\u7b14\u8bb0\u672c\u7535\u8111\u8fd0\u884c\u65f6\u4eceCPU\u66f4\u6539\u4e3aT4 GPU<\/p>\n<p>\u5728\u5f00\u59cb\u4f7f\u7528Google Colab\u8fdb\u884c\u4efb\u4f55\u8bad\u7ec3\u4e4b\u524d\uff0c\u6211\u4eec\u9996\u5148\u9700\u8981\u5c06\u6570\u636e\u96c6\u5bfc\u5165\u7b14\u8bb0\u672c\u6587\u4ef6\u3002\u76f4\u89c2\u5730\u8bf4\uff0c\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u662f\u5c06\u6570\u636e\u96c6\u4e0a\u4f20\u5230\u8c37\u6b4c\u4e91\u7aef\u786c\u76d8\uff0c\u5e76\u4ece\u90a3\u91cc\u5bfc\u5165\u5230\u6211\u4eec\u7684\u7b14\u8bb0\u672c\u6587\u4ef6\u4e2d\u3002\u7136\u800c\uff0c\u4e0a\u4f20\u4efb\u4f55\u5927\u4e8e\u51e0MB\u7684\u6570\u636e\u96c6\u90fd\u9700\u8981\u975e\u5e38\u957f\u7684\u65f6\u95f4\u3002\u89e3\u51b3\u65b9\u6cd5\u662f\u5c06\u6570\u636e\u96c6\u4e0a\u4f20\u5230\u8fdc\u7a0b\u6587\u4ef6\u6258\u7ba1\u670d\u52a1\uff08\u5982Amazon S3\u751a\u81f3\u662fKaggle\uff09\uff0c\u5e76\u5c06\u6570\u636e\u96c6\u76f4\u63a5\u4ece\u90a3\u91cc\u62c9\u5165\u6211\u4eec\u7684Colab\u7b14\u8bb0\u672c\u6587\u4ef6\u3002<\/p>\n<h4>\u4eceKaggle\u5bfc\u5165<\/h4>\n<p>\u4ee5\u4e0b\u662f\u5982\u4f55\u5c06Kaggle\u6570\u636e\u96c6\u76f4\u63a5\u5bfc\u5165Colab\u7b14\u8bb0\u672c\u6587\u4ef6\u7684\u8bf4\u660e\uff1a<\/p>\n<p>\u5728Kaggle\u8d26\u6237\u8bbe\u7f6e\u4e2d\uff0c\u5411\u4e0b\u6eda\u52a8\u5230API\u5e76\u9009\u62e9\u201cCreate New Token\u201d\u547d\u4ee4\u3002\u8fd9\u5c06\u4e0b\u8f7d\u4e00\u4e2a\u540d\u4e3akaggle.json\u7684\u6587\u4ef6\u3002<\/p>\n<p>\u5728\u7b14\u8bb0\u672c\u5355\u5143\u683c\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>\u590d\u5236<\/p>\n<p>!pip install kaggle from google.colab import files files.upload()<\/p>\n<ul>\n<li>1.<\/li>\n<li>2.<\/li>\n<li>3.<\/li>\n<\/ul>\n<p>\u4e0a\u4f20\u521a\u521a\u4e0b\u8f7d\u7684kaggle.json\u6587\u4ef6\uff0c\u7136\u540e\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p>\u590d\u5236<\/p>\n<p>!mkdir ~\/.kaggle !cp kaggle.json ~\/.kaggle\/ !chmod 600 ~\/.kaggle\/kaggle.json !kaggle datasets download -d [DATASET] # replace [DATASET] with the desired dataset ref<\/p>\n<ul>\n<li>1.<\/li>\n<li>2.<\/li>\n<li>3.<\/li>\n<li>4.<\/li>\n<\/ul>\n<p>\u6570\u636e\u96c6\u5c06\u4f5c\u4e3azip\u5b58\u6863\u4e0b\u8f7d\u3002\u53ea\u9700\u8981\u4f7f\u7528unzip\u547d\u4ee4\u63d0\u53d6\u6709\u5173\u5185\u5bb9\uff1a<\/p>\n<p>\u590d\u5236<\/p>\n<p>!unzip dataset.zip -d dataset<\/p>\n<ul>\n<li>1.<\/li>\n<\/ul>\n<h4>\u5f00\u59cb\u8bad\u7ec3<\/h4>\n<p>\u5728\u7b14\u8bb0\u672c\u6587\u4ef6\u7684\u6587\u4ef6\u8d44\u6e90\u7ba1\u7406\u5668\u4e2d\u521b\u5efa\u4e00\u4e2a\u65b0\u7684config.yaml\u6587\u4ef6\uff0c\u5e76\u6309\u7167\u524d\u9762\u7684\u63cf\u8ff0\u8fdb\u884c\u914d\u7f6e\u3002Colab\u7b14\u8bb0\u672c\u6587\u4ef6\u4e2d\u7684\u9ed8\u8ba4\u5de5\u4f5c\u76ee\u5f55\u662f\/content\/\uff0c\u56e0\u6b64\u6570\u636e\u96c6\u7684\u7edd\u5bf9\u8def\u5f84\u5c06\u662f\/content\/[dataset folder]\u3002\u4f8b\u5982\uff1a<\/p>\n<p>\u590d\u5236<\/p>\n<p>path: \/content\/dataset\/ # absolute path to dataset test: test\/images # relative path to test images train: train\/images # relative path to training images val: val\/images # relative path to validation images # classes names: 0: bottle<\/p>\n<ul>\n<li>1.<\/li>\n<li>2.<\/li>\n<li>3.<\/li>\n<li>4.<\/li>\n<li>5.<\/li>\n<li>6.<\/li>\n<li>7.<\/li>\n<li>8.<\/li>\n<\/ul>\n<p>\u786e\u4fdd\u68c0\u67e5\u4e00\u4e0b\u6570\u636e\u96c6\u7684\u6587\u4ef6\u7ed3\u6784\uff0c\u4ee5\u786e\u4fddconfig.yaml\u4e2d\u6307\u5b9a\u7684\u8def\u5f84\u51c6\u786e\u3002\u6709\u65f6\u6570\u636e\u96c6\u4f1a\u88ab\u653e\u7f6e\u5728\u591a\u4e2a\u7ea7\u522b\u7684\u6587\u4ef6\u5939\u4e2d\u3002<\/p>\n<p>\u7136\u540e\uff0c\u5c06\u4ee5\u4e0b\u5185\u5bb9\u4f5c\u4e3a\u5355\u5143\u683c\u8fd0\u884c\uff1a<\/p>\n<p>\u590d\u5236<\/p>\n<p>!pip install ultralytics import os from ultralytics import YOLOmodel = YOLO(&#8220;yolov8n.yaml&#8221;) results = model.train(data=&#8221;config.yaml&#8221;, epochs=100)<\/p>\n<ul>\n<li>1.<\/li>\n<li>2.<\/li>\n<li>3.<\/li>\n<li>4.<\/li>\n<li>5.<\/li>\n<\/ul>\n<p>\u524d\u9762\u63d0\u5230\u7684\u7528\u4e8e\u4fee\u6539\u672c\u5730\u8bad\u7ec3\u8bbe\u7f6e\u7684\u53c2\u6570\u4e5f\u9002\u7528\u4e8e\u8fd9\u91cc\u3002<\/p>\n<p>\u4e0e\u672c\u5730\u8bad\u7ec3\u7c7b\u4f3c\uff0c\u7ed3\u679c\u3001\u6743\u91cd\u548c\u56fe\u8868\u5c06\u4fdd\u5b58\u5728runs\/detect\/train\u4e2d\u3002<\/p>\n<h2>\u5728\u672c\u5730\u8fdb\u884c\u9884\u6d4b<\/h2>\n<p>\u65e0\u8bba\u4f60\u662f\u5728\u672c\u5730\u8fd8\u662f\u5728\u4e91\u7aef\u8fdb\u884c\u8bad\u7ec3\uff0c\u9884\u6d4b\u90fd\u5fc5\u987b\u5728\u672c\u5730\u8fd0\u884c\u3002<\/p>\n<p>\u5728\u6a21\u578b\u5b8c\u6210\u8bad\u7ec3\u540e\uff0cruns\/detect\/train\/weights\u4e2d\u4f1a\u6709\u4e24\u4e2a\u6743\u91cd\uff0c\u5206\u522b\u547d\u540d\u4e3abest.pt\u548clast.pt\uff0c\u5206\u522b\u662f\u6700\u4f73\u8bad\u7ec3\u8f6e\u6b21\u548c\u6700\u65b0\u8bad\u7ec3\u8f6e\u6b21\u7684\u6743\u91cd\u3002\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u5c06\u4f7f\u7528best.pt\u8fd0\u884c\u6a21\u578b\u3002<\/p>\n<p>\u5982\u679c\u4f60\u5728\u672c\u5730\u8fdb\u884c\u8bad\u7ec3\uff0c\u8bf7\u5c06best.pt\u79fb\u52a8\u5230\u65b9\u4fbf\u7684\u4f4d\u7f6e\uff08\u4f8b\u5982\u6211\u4eec\u7684\u9879\u76ee\u6587\u4ef6\u5939yolov8-project\uff09\u4ee5\u8fd0\u884c\u9884\u6d4b\u3002\u5982\u679c\u4f60\u5728\u4e91\u7aef\u8bad\u7ec3\uff0c\u8bf7\u5c06best.pt\u4e0b\u8f7d\u5230\u4f60\u7684\u672c\u5730\u8bbe\u5907\u4e0a\u3002\u5728Google Colab\u4e0a\uff0c\u53f3\u952e\u5355\u51fb\u7b14\u8bb0\u672c\u8d44\u6e90\u7ba1\u7406\u5668\u4e2d\u7684\u6587\u4ef6\uff0c\u7136\u540e\u9009\u62e9\u201cDownload\u201d\uff08\u4e0b\u8f7d\uff09\u547d\u4ee4\u3002<\/p>\n<p>\u5728\u8c37\u6b4cColab\u4e0a\u4e0b\u8f7d\u6743\u91cd<\/p>\n<p>\u4e0e\u672c\u5730\u8bad\u7ec3\u7c7b\u4f3c\uff0c\u9884\u6d4b\u53ef\u4ee5\u901a\u8fc7Python API\u6216CLI\u8fd0\u884c\u3002<\/p>\n<h3>\u4f7f\u7528Python API\u9884\u6d4b<\/h3>\n<p>\u5728\u4e0ebest.pt\u76f8\u540c\u7684\u4f4d\u7f6e\uff0c\u521b\u5efa\u4e00\u4e2a\u540d\u4e3apredict.py\u7684\u65b0\u6587\u4ef6\uff1a<\/p>\n<p>\u590d\u5236<\/p>\n<p>from ultralytics import YOLO model = YOLO(&#8220;best.pt&#8221;) results = model(source=0, show=True, conf=0.25, save=True)<\/p>\n<ul>\n<li>1.<\/li>\n<li>2.<\/li>\n<li>3.<\/li>\n<\/ul>\n<p>\u4e0e\u8bad\u7ec3\u7c7b\u4f3c\uff0c\u5b58\u5728\u8bb8\u591a\u6709\u7528\u7684\u53c2\u6570\u53ef\u4ee5\u4fee\u6539\u9884\u6d4b\u8bbe\u7f6e\uff1a<\/p>\n<ul data-id=\"u738a58b-2efSiMkO\">\n<li data-id=\"ld70c578-YJjEBdV9\">source\uff1a\u63a7\u5236\u9884\u6d4b\u7684\u8f93\u5165\u6e90\u3002source=0\u5c06\u7f51\u7edc\u6444\u50cf\u5934\u8bbe\u7f6e\u4e3a\u8f93\u5165\u6e90\u3002\u66f4\u591a\u4fe1\u606f\u8bf7\u89c1\u4e0b\u6587\u3002<\/li>\n<li data-id=\"ld70c578-IeiXlefR\">show\uff1a\u5982\u679c\u4e3aTrue\uff0c\u5219\u5728\u5c4f\u5e55\u4e0a\u663e\u793a\u9884\u6d4b\u3001\u8fb9\u754c\u6846\u548c\u7f6e\u4fe1\u5ea6\u3002<\/li>\n<li data-id=\"ld70c578-nMDPeEf5\">conf\uff1a\u8981\u8003\u8651\u9884\u6d4b\u7684\u6700\u5c0f\u7f6e\u4fe1\u5ea6\u9608\u503c\u3002<\/li>\n<li data-id=\"ld70c578-UJBYmBo8\">save\uff1a\u5982\u679c\u4e3aTrue\uff0c\u5219\u5c06\u9884\u6d4b\u7ed3\u679c\u4fdd\u5b58\u5230run\/retect\/repredict\uff08\u6216predict2\u3001predict3\u7b49\uff09\u3002<\/li>\n<li data-id=\"ld70c578-gZCtJn3o\">device\uff1a\u5982\u524d\u6240\u8ff0\uff0c\u5728M\u7cfb\u5217Mac\u4e0a\u4f7f\u7528device=\u201cmps\u201d\u3002<\/li>\n<\/ul>\n<p>\u6709\u5173\u9884\u6d4b\u53c2\u6570\u7684\u5b8c\u6574\u5217\u8868\uff0c\u8bf7\u8bbf\u95ee\uff1a<\/p>\n<p>https:\/\/docs.ultralytics.com\/modes\/predict\/#inference-arguments\u3002<\/p>\n<h3>\u4f7f\u7528CLI\u9884\u6d4b<\/h3>\n<p>\u8fd0\u884c\u4ee5\u4e0bCLI\u547d\u4ee4\u5373\u53ef\u542f\u52a8\u6a21\u578b\uff1a<\/p>\n<p>\u590d\u5236<\/p>\n<p>python3 predict.py<\/p>\n<ul>\n<li>1.<\/li>\n<\/ul>\n<p>\u901a\u8fc7\u5b9e\u65f6\u7f51\u7edc\u6444\u50cf\u5934\u9988\u9001\u8fd0\u884cYOLOv8\u6a21\u578b\u9884\u6d4b<\/p>\n<h4>CLI\u547d\u4ee4<\/h4>\n<p>\u4f7f\u7528CLI\u65b9\u5f0f\u8fdb\u884c\u9884\u6d4b\u5e94\u7528\u7684\u547d\u4ee4\u662f\uff1a<\/p>\n<p>\u590d\u5236<\/p>\n<p>yolo detect predict model=best.pt source=0 show=True cnotallow=0.25 save=True<\/p>\n<ul>\n<li>1.<\/li>\n<\/ul>\n<p>\u6ce8\u610f\u5230\uff0c\u8fd9\u91cc\u6240\u4f7f\u7528\u7684\u53c2\u6570\u4e0ePython API\u4e2d\u7684\u53c2\u6570\u76f8\u540c\u3002<\/p>\n<h2>\u5c06YOLOv8\u6a21\u578b\u96c6\u6210\u5230\u5b9e\u9645\u573a\u666f<\/h2>\n<p>\u73b0\u5728\uff0c\u6211\u4eec\u5df2\u7ecf\u80fd\u591f\u5728\u5b9e\u65f6\u7f51\u7edc\u6444\u50cf\u5934\u4e0a\u6210\u529f\u5730\u8fd0\u884c\u8d77\u6211\u4eec\u7684\u6a21\u578b\uff0c\u4f46\u8fd9\u53c8\u4f1a\u600e\u6837\u5462\uff1f\u6211\u4eec\u5982\u4f55\u5b9e\u9645\u4f7f\u7528\u8fd9\u4e2a\u6a21\u578b\u5e76\u5c06\u5176\u96c6\u6210\u5230\u5b9e\u6218\u9879\u76ee\u4e2d\uff1f<\/p>\n<p>\u8ba9\u6211\u4eec\u4ece\u8f93\u5165\u548c\u8f93\u51fa\u7684\u89d2\u5ea6\u6765\u8003\u8651\u8fd9\u4e2a\u95ee\u9898\u3002\u4e3a\u4e86\u4f7f\u8fd9\u4e2a\u6a21\u578b\u6210\u529f\u5730\u5e94\u7528\u4e8e\u6211\u4eec\u6784\u5efa\u7684\u5916\u90e8\u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u6b64\u6a21\u578b\u5fc5\u987b\u80fd\u591f\u63a5\u53d7\u6709\u7528\u7684\u8f93\u5165\u5e76\u4ea7\u751f\u6709\u7528\u7684\u8f93\u51fa\u3002\u503c\u5f97\u5e86\u5e78\u7684\u662f\uff0cYOLOv8\u6a21\u578b\u7684\u7075\u6d3b\u6027\u4f7f\u5f97\u5c06\u6a21\u578b\u96c6\u6210\u5230\u5404\u79cd\u4f7f\u7528\u573a\u666f\u4e2d\u6210\u4e3a\u53ef\u80fd\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528source=0\u5c06\u7f51\u7edc\u6444\u50cf\u5934\u8bbe\u7f6e\u4e3a\u9884\u6d4b\u7684\u8f93\u5165\u6e90\u3002\u7136\u800c\uff0cYOLOv8\u6a21\u578b\u53ef\u4ee5\u5229\u7528\u6bd4\u8fd9\u66f4\u591a\u7684\u8f93\u5165\u6e90\u3002\u4ee5\u4e0b\u662f\u51e0\u4e2a\u4f8b\u5b50\uff1a<\/p>\n<p>\u590d\u5236<\/p>\n<p>results = model(source=&#8221;path\/to\/image.jpg&#8221;, show=True, conf=0.25, save=True) # static image results = model(source=&#8221;screen&#8221;, show=True, conf=0.25, save=True) # screenshot of current screen results = model(source=&#8221;https:\/\/ultralytics.com\/images\/bus.jpg&#8221;, show=True, conf=0.25, save=True) # image or video URL results = model(source=&#8221;path\/to\/file.csv&#8221;, show=True, conf=0.25, save=True) # CSV file results = model(source=&#8221;path\/to\/video.mp4&#8243;, show=True, conf=0.25, save=True) # video file results = model(source=&#8221;path\/to\/dir&#8221;, show=True, conf=0.25, save=True) # all images and videos within directory results = model(source=&#8221;path\/to\/dir\/**\/*.jpg&#8221;, show=True, conf=0.25, save=True) # glob expression results = model(source=&#8221;https:\/\/www.youtube.com\/watch?v=dQw4w9WgXcQ&#8221;, show=True, conf=0.25, save=True) # YouTube video URL<\/p>\n<ul>\n<li>1.<\/li>\n<li>2.<\/li>\n<li>3.<\/li>\n<li>4.<\/li>\n<li>5.<\/li>\n<li>6.<\/li>\n<li>7.<\/li>\n<li>8.<\/li>\n<\/ul>\n<p>\u6709\u5173\u9884\u6d4b\u6e90\u548c\u8f93\u5165\u9009\u9879\u7684\u5b8c\u6574\u5217\u8868\uff0c\u8bf7\u8bbf\u95ee\uff1a<\/p>\n<p>https:\/\/docs.ultralytics.com\/modes\/predict\/#inference-sources\u3002<\/p>\n<p>\u6bcf\u5f53\u6211\u4eec\u8fd0\u884c\u9884\u6d4b\u65f6\uff0cYOLOv8\u90fd\u4f1a\u4ee5Results\u5bf9\u8c61\u5217\u8868\u7684\u5f62\u5f0f\u8fd4\u56de\u5927\u91cf\u6709\u4ef7\u503c\u7684\u6570\u636e\uff0c\u5176\u4e2d\u5305\u62ec\u6709\u5173\u9884\u6d4b\u7684\u8fb9\u754c\u6846\u3001\u5206\u5272\u63a9\u7801\u3001\u5173\u952e\u70b9\u3001\u7c7b\u522b\u6982\u7387\u548c\u5b9a\u5411\u5305\u56f4\u76d2\uff08OBB\uff09\u7684\u4fe1\u606f\u3002<\/p>\n<p>\u7531\u4e8e\u6211\u4eec\u5728\u4ee3\u7801\u4e2d\u5c06\u9884\u6d4b\u7ed3\u679c\u5206\u914d\u7ed9results\u53d8\u91cf\uff0c\u56e0\u6b64\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u68c0\u7d22\u6709\u5173\u9884\u6d4b\u7684\u4fe1\u606f\uff1a<\/p>\n<p>\u590d\u5236<\/p>\n<p>from ultralytics import YOLO model = YOLO(&#8220;best.pt&#8221;) results = model(source=&#8221;bottles.jpg&#8221;, show=True, conf=0.25, save=True) print(&#8220;Bounding boxes of all detected objects in xyxy format:&#8221;) for r in results: print(r.boxes.xyxy) print(&#8220;Confidence values of all detected objects:&#8221;) for r in results: print(r.boxes.conf) print(&#8220;Class values of all detected objects:&#8221;) for r in results: print(r.boxes.cls)<\/p>\n<ul>\n<li>1.<\/li>\n<li>2.<\/li>\n<li>3.<\/li>\n<li>4.<\/li>\n<li>5.<\/li>\n<li>6.<\/li>\n<li>7.<\/li>\n<li>8.<\/li>\n<li>9.<\/li>\n<li>10.<\/li>\n<li>11.<\/li>\n<li>12.<\/li>\n<li>13.<\/li>\n<li>14.<\/li>\n<li>15.<\/li>\n<li>16.<\/li>\n<li>17.<\/li>\n<\/ul>\n<p>\u672c\u6559\u7a0b\u4e2d\u5305\u542b\u7684\u8f93\u51fa\u7ed3\u679c\u7c7b\u578b\u592a\u591a\uff0c\u4f46\u4f60\u53ef\u4ee5\u901a\u8fc7\u8bbf\u95ee\u94fe\u63a5\u4ee5\u4e86\u89e3\u66f4\u591a\u4fe1\u606f\uff1a<\/p>\n<p>https:\/\/docs.ultralytics.com\/modes\/predict\/#working-results\u3002<\/p>\n<p>\u8fd9\u91cc\u63d0\u4f9b\u7684\u53ea\u662f\u4e00\u4e2a\u975e\u5e38\u57fa\u672c\u7684\u4f8b\u5b50\uff0c\u8bf4\u660e\u4f60\u53ef\u4ee5\u7528YOLOv8\u6a21\u578b\u7684\u8f93\u51fa\u505a\u70b9\u4ec0\u4e48\u4e86\u3002\u5176\u5b9e\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u4e0a\u8ff0\u5217\u4e3e\u7684\u5f88\u591a\u79cd\u65b9\u5f0f\u5c06\u6a21\u578b\u5e94\u7528\u4e8e\u81ea\u5df1\u7684\u9879\u76ee\u4e2d\u3002<\/p>\n<h2>\u7ed3\u8bba<\/h2>\n<p>\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u7ec8\u4e8e\u5b9e\u73b0\u4e86\u4ece\u5934\u5f00\u59cb\u5236\u4f5c\u6211\u4eec\u81ea\u5df1\u7684YOLOv8\u517c\u5bb9\u6570\u636e\u96c6\uff0c\u4eceKaggle\u5bfc\u5165\u6570\u636e\u96c6\uff0c\u4f7f\u7528\u5305\u62ecPython API\u3001CLI\u548cGoogle Colab\u5728\u5185\u7684\u591a\u79cd\u73af\u5883\u6765\u8bad\u7ec3\u6a21\u578b\uff0c\u7136\u540e\u5728\u672c\u5730\u8fd0\u884c\u6211\u4eec\u7684\u6a21\u578b\uff0c\u5e76\u627e\u5230\u8bb8\u591a\u8f93\u5165\/\u8f93\u51fa\u65b9\u6cd5\uff0c\u4f7f\u6211\u4eec\u80fd\u591f\u5728\u81ea\u5df1\u7684\u9879\u76ee\u4e2d\u5229\u7528\u8bad\u7ec3\u51fa\u7684YOLOv8\u6a21\u578b\u3002<\/p>\n<p>\u8bf7\u8bb0\u4f4f\uff0c\u672c\u6559\u7a0b\u7684\u76ee\u7684\u662f\u4f5c\u4e3aYOLOv8\u6216\u8ba1\u7b97\u673a\u89c6\u89c9\u7684\u5b66\u4e60\u8d77\u70b9\u3002\u6211\u4eec\u5f53\u524d\u51e0\u4e4e\u6ca1\u6709\u89e6\u53caYOLOv8\u6a21\u578b\u9519\u7efc\u590d\u6742\u7684\u8868\u9762\uff0c\u968f\u7740\u4f60\u5bf9YOLOv9\u548c\u8ba1\u7b97\u673a\u89c6\u89c9\u8d8a\u6765\u8d8a\u6709\u7ecf\u9a8c\uff0c\u6df1\u5165\u4e86\u89e3\u8fd9\u4e2a\u6a21\u578b\u7edd\u5bf9\u662f\u660e\u667a\u7684\u3002<\/p>\n<p>\u8bdd\u867d\u5982\u6b64\uff0c\u5982\u679c\u4f60\u9075\u5faa\u4e86\u672c\u6559\u7a0b\u5e76\u575a\u6301\u5230\u6700\u540e\uff0c\u90a3\u4ecd\u7136\u662f\u4e00\u4e2a\u5f88\u5927\u7684\u6210\u529f\u3002\u6211\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u5e2e\u52a9\u4f60\u5bf9\u673a\u5668\u5b66\u4e60\u3001\u8ba1\u7b97\u673a\u89c6\u89c9\u548cYOLOv8\u6a21\u578b\u6709\u4e00\u4e2a\u57fa\u672c\u7684\u4e86\u89e3\u3002\u4e5f\u8bb8\u4f60\u751a\u81f3\u5bf9\u8fd9\u4e2a\u4e3b\u9898\u4ea7\u751f\u4e86\u70ed\u60c5\uff0c\u5e76\u5c06\u5728\u672a\u6765\u7ee7\u7eed\u5b66\u4e60\u66f4\u9ad8\u7ea7\u7684\u5185\u5bb9\u3002<\/p>\n<p>\u6587\u7ae0\u6765\u81ea\uff1a51CTO<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_22745\" class=\"pvc_stats total_only  \" data-element-id=\"22745\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.0\" viewBox=\"0 0 502 315\" preserveAspectRatio=\"xMidYMid meet\"><g transform=\"translate(0,332) scale(0.1,-0.1)\" fill=\"\" stroke=\"none\"><path d=\"M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z\"\/><path d=\"M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z\"\/><path d=\"M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z\"\/><path d=\"M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z\"\/><path d=\"M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z\"\/><path d=\"M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z\"\/><path d=\"M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z\"\/><path d=\"M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z\"\/><path d=\"M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z\"\/><\/g><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/aif.amtbbs.org\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u5c06\u901a\u8fc7\u4e00\u4e2a\u5b8c\u6574\u7684\u5b9e\u6218\u6848\u4f8b\u6765\u5c55\u793a\u4f7f\u7528Python\u3001\u547d\u4ee4\u884c\u6216Google Colab\u7b49\u65b9\u5f0f\u5728\u81ea\u5b9a\u4e49\u6570\u636e\u96c6\u4e0a\u8bad\u7ec3 [&hellip;]<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_22745\" class=\"pvc_stats total_only  \" data-element-id=\"22745\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" version=\"1.0\" viewBox=\"0 0 502 315\" preserveAspectRatio=\"xMidYMid meet\"><g transform=\"translate(0,332) scale(0.1,-0.1)\" fill=\"\" stroke=\"none\"><path d=\"M2394 3279 l-29 -30 -3 -207 c-2 -182 0 -211 15 -242 39 -76 157 -76 196 0 15 31 17 60 15 243 l-3 209 -33 29 c-26 23 -41 29 -80 29 -41 0 -53 -5 -78 -31z\"\/><path d=\"M3085 3251 c-45 -19 -58 -50 -96 -229 -47 -217 -49 -260 -13 -295 52 -53 146 -42 177 20 16 31 87 366 87 410 0 70 -86 122 -155 94z\"\/><path d=\"M1751 3234 c-13 -9 -29 -31 -37 -50 -12 -29 -10 -49 21 -204 19 -94 39 -189 45 -210 14 -50 54 -80 110 -80 34 0 48 6 76 34 21 21 34 44 34 59 0 14 -18 113 -40 219 -37 178 -43 195 -70 221 -36 32 -101 37 -139 11z\"\/><path d=\"M1163 3073 c-36 -7 -73 -59 -73 -102 0 -56 133 -378 171 -413 34 -32 83 -37 129 -13 70 36 67 87 -16 290 -86 209 -89 214 -129 231 -35 14 -42 15 -82 7z\"\/><path d=\"M3689 3066 c-15 -9 -33 -30 -42 -48 -48 -103 -147 -355 -147 -375 0 -98 131 -148 192 -74 13 15 57 108 97 206 80 196 84 226 37 273 -30 30 -99 39 -137 18z\"\/><path d=\"M583 2784 c-38 -19 -67 -74 -58 -113 9 -42 211 -354 242 -373 16 -10 45 -18 66 -18 51 0 107 52 107 100 0 39 -1 41 -124 234 -80 126 -108 162 -133 173 -41 17 -61 16 -100 -3z\"\/><path d=\"M4250 2784 c-14 -9 -74 -91 -133 -183 -95 -150 -107 -173 -107 -213 0 -55 33 -94 87 -104 67 -13 90 8 211 198 130 202 137 225 78 284 -27 27 -42 34 -72 34 -22 0 -50 -8 -64 -16z\"\/><path d=\"M2275 2693 c-553 -48 -1095 -270 -1585 -649 -135 -104 -459 -423 -483 -476 -23 -49 -22 -139 2 -186 73 -142 361 -457 571 -626 285 -228 642 -407 990 -497 242 -63 336 -73 660 -74 310 0 370 5 595 52 535 111 1045 392 1455 803 122 121 250 273 275 326 19 41 19 137 0 174 -41 79 -309 363 -465 492 -447 370 -946 591 -1479 653 -113 14 -422 18 -536 8z m395 -428 c171 -34 330 -124 456 -258 112 -119 167 -219 211 -378 27 -96 24 -300 -5 -401 -72 -255 -236 -447 -474 -557 -132 -62 -201 -76 -368 -76 -167 0 -236 14 -368 76 -213 98 -373 271 -451 485 -162 444 86 934 547 1084 153 49 292 57 452 25z m909 -232 c222 -123 408 -262 593 -441 76 -74 138 -139 138 -144 0 -16 -233 -242 -330 -319 -155 -123 -309 -223 -461 -299 l-81 -41 32 46 c18 26 49 83 70 128 143 306 141 649 -6 957 -25 52 -61 116 -79 142 l-34 47 45 -20 c26 -10 76 -36 113 -56z m-2057 25 c-40 -58 -105 -190 -130 -263 -110 -324 -59 -707 132 -981 25 -35 42 -64 37 -64 -19 0 -241 119 -326 174 -188 122 -406 314 -532 468 l-58 71 108 103 c185 178 428 349 672 473 66 33 121 60 123 61 2 0 -10 -19 -26 -42z\"\/><path d=\"M2375 1950 c-198 -44 -350 -190 -395 -379 -18 -76 -8 -221 19 -290 114 -284 457 -406 731 -260 98 52 188 154 231 260 27 69 37 214 19 290 -38 163 -166 304 -326 360 -67 23 -215 33 -279 19z\"\/><\/g><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/aif.amtbbs.org\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":56,"featured_media":22747,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,20,80],"tags":[1391],"class_list":["post-22745","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-23","category-20","category-80","tag---yolov8"],"_links":{"self":[{"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/posts\/22745","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/users\/56"}],"replies":[{"embeddable":true,"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/comments?post=22745"}],"version-history":[{"count":1,"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/posts\/22745\/revisions"}],"predecessor-version":[{"id":22748,"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/posts\/22745\/revisions\/22748"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/media\/22747"}],"wp:attachment":[{"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/media?parent=22745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/categories?post=22745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aif.amtbbs.org\/index.php\/wp-json\/wp\/v2\/tags?post=22745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}