{"id":4081,"date":"2025-11-09T12:33:07","date_gmt":"2025-11-09T04:33:07","guid":{"rendered":"https:\/\/saludpcb.com\/zh\/?p=4081"},"modified":"2025-11-09T12:33:14","modified_gmt":"2025-11-09T04:33:14","slug":"yolo11-insane-ai-detection-model","status":"publish","type":"post","link":"https:\/\/saludpcb.com\/zh\/yolo11-insane-ai-detection-model\/","title":{"rendered":"YOLO11 \u5f37\u52e2\u767b\u5834 | AI \u7269\u4ef6\u5075\u6e2c\u5feb\u5230\u4e0d\u50cf\u8a71\uff0c\u6e96\u78ba\u7387\u518d\u5275\u65b0\u5dd4\u5cf0\uff01"},"content":{"rendered":"\n<hr class=\"wp-block-separator alignwide has-text-color has-palette-color-1-color has-alpha-channel-opacity has-palette-color-1-background-color has-background is-style-wide\"\/>\n\n\n\n<p><strong>YOLO11<\/strong>\uff0c\u4f5c\u70ba Ultralytics \u63a8\u51fa\u7684\u6700\u65b0\u4e00\u4ee3\u5373\u6642\u7269\u4ef6\u5075\u6e2c\u6a21\u578b\uff0c\u6b63\u6380\u8d77\u96fb\u8166\u8996\u89ba\u9818\u57df\u7684\u65b0\u4e00\u6ce2\u9769\u547d\u3002\u5b83\u4e0d\u50c5\u5b8c\u7f8e\u627f\u8972\u4e86\u300cYou Only Look Once\u300d\u7cfb\u5217\u8207\u751f\u4ff1\u4f86\u7684\u6975\u81f4\u901f\u5ea6\uff0c\u66f4\u5728<strong>\u5075\u6e2c\u7cbe\u5ea6\u3001\u904b\u7b97\u6548\u7387\u8207\u591a\u4efb\u52d9\u652f\u63f4<\/strong>\u4e0a\u5be6\u73fe\u4e86\u5168\u9762\u6027\u7684\u9032\u5316\u3002<\/p>\n\n\n\n<p>\u7269\u4ef6\u5075\u6e2c\u4f5c\u70ba\u96fb\u8166\u8996\u89ba\u7684\u6838\u5fc3\u57fa\u77f3\uff0c\u5176\u61c9\u7528\u904d\u53ca\u5de5\u696d\u81ea\u52d5\u5316\u6aa2\u6e2c\u3001\u81ea\u52d5\u99d5\u99db\u3001\u667a\u80fd\u76e3\u63a7\u7cfb\u7d71\u7b49\u95dc\u9375\u9818\u57df\u3002\u5728\u773e\u591a\u6280\u8853\u65b9\u6848\u4e2d\uff0cYOLO \u7cfb\u5217\u6191\u85c9\u5176<strong>\u5353\u8d8a\u7684\u63a8\u8ad6\u901f\u5ea6\u8207\u53ef\u9760\u7684\u6aa2\u6e2c\u7cbe\u5ea6<\/strong>\uff0c\u59cb\u7d42\u662f\u696d\u754c\u5be6\u8e10\u4e2d\u7684\u9996\u9078\u3002\u8fd1\u65e5\uff0cUltralytics \u6b63\u5f0f\u63a8\u51fa YOLO11\uff0c\u9019\u9805\u91cc\u7a0b\u7891\u5f0f\u7684\u767c\u5e03\uff0c\u6a19\u8a8c\u8457\u5373\u6642\u7269\u4ef6\u6aa2\u6e2c\u6280\u8853\u9081\u5411\u4e86\u5168\u65b0\u7684\u9ad8\u5ea6\u3002<\/p>\n\n\n\n<p>\u672c\u6587\u5c07\u6df1\u5165\u5256\u6790\u8a72\u6a21\u578b\u7684<strong>\u6838\u5fc3\u6280\u8853\u5275\u65b0<\/strong>\u3001<strong>\u5177\u9ad4\u6548\u80fd\u63d0\u5347<\/strong>\u4ee5\u53ca\u5176\u5728<strong>\u591a\u4efb\u52d9\u5b78\u7fd2\u4e0a\u7684\u91cd\u5927\u7a81\u7834<\/strong>\uff0c\u70ba\u60a8\u5168\u9762\u89e3\u8b80\u9019\u4e00\u5283\u6642\u4ee3\u7684\u6a21\u578b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/saludpcb.com\/zh\/wp-content\/uploads\/2025\/11\/YOLO11-Is-Insane-The-Fastest-and-Most-Accurate-AI-Detection-Model-Yet.jpg\" alt=\"YOLO11\" class=\"wp-image-4086\" title=\"\" srcset=\"https:\/\/saludpcb.com\/zh\/wp-content\/uploads\/2025\/11\/YOLO11-Is-Insane-The-Fastest-and-Most-Accurate-AI-Detection-Model-Yet.jpg 1024w, https:\/\/saludpcb.com\/zh\/wp-content\/uploads\/2025\/11\/YOLO11-Is-Insane-The-Fastest-and-Most-Accurate-AI-Detection-Model-Yet-768x576.jpg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>\u5167\u5bb9<\/h2><nav><ul><li class=\"\"><a href=\"#\u4ec0\u9ebc\u662f-ollama\uff1f\">\u4ec0\u9ebc\u662f YOLO11 ?<\/a><\/li><li class=\"\"><a href=\"#ai-agent-\u7684\u6838\u5fc3\u904b\u4f5c\u6a21\u5f0f\">YOLO \u7684\u6838\u5fc3\u904b\u4f5c\u6a21\u5f0f<\/a><\/li><li class=\"\"><a href=\"#\u70ba\u4ec0\u9ebc-c-\u958b\u767c\u8005\u9700\u8981\u81ea\u5efa-mcp-server\uff1f\">YOLO \u53ef\u4ee5\u505a\u54ea\u4e9b\u4e8b\u60c5\uff1f<\/a><\/li><li class=\"\"><a href=\"#\u958b\u767c\u74b0\u5883\u6e96\u5099\">\u958b\u767c\u74b0\u5883<\/a><\/li><li class=\"\"><a href=\"#\u5b89\u88dd\">\u5efa\u7acb YOLO \u865b\u64ec\u74b0\u5883<\/a><\/li><li class=\"\"><a href=\"#\u5b89\u88dd-yolo\">\u5b89\u88dd YOLO \u5957\u4ef6<\/a><\/li><li class=\"\"><a href=\"#c\">Code<\/a><\/li><li class=\"\"><a href=\"#yolo-11-python-example-\u8aaa\u660e\">\u7a0b\u5f0f\u8aaa\u660e<\/a><\/li><li class=\"\"><a href=\"#\u7d50\u8ad6-1\">\u7d50\u8ad6<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u4ec0\u9ebc\u662f-ollama\uff1f\">\u4ec0\u9ebc\u662f YOLO11 ?<\/h2>\n\n\n\n<p>\u8a72\u6a21\u578b\u662f\u7531 <strong>Ultralytics<\/strong> \u63a8\u51fa\u7684\u6700\u65b0\u4e00\u4ee3 <em>You Only Look Once<\/em> \u7cfb\u5217\u6a21\u578b\uff0c\u662f\u76ee\u524d\u6700\u5148\u9032\u7684\u5373\u6642\u7269\u4ef6\u5075\u6e2c\uff08Real-Time Object Detection\uff09\u67b6\u69cb\u4e4b\u4e00\u3002<br>\u5b83\u7684\u8a2d\u8a08\u7406\u5ff5\u5ef6\u7e8c\u4e86 YOLO \u7cfb\u5217\u300c\u4e00\u6b21\u770b\u5168\u5716\u300d\u7684\u9ad8\u6548\u7279\u6027\uff0c\u900f\u904e\u55ae\u6b21\u524d\u5411\u50b3\u64ad\uff08single forward pass\uff09\u5373\u53ef\u540c\u6642\u5b8c\u6210\u76ee\u6a19\u5b9a\u4f4d\u8207\u5206\u985e\uff0c\u5927\u5e45\u964d\u4f4e\u904b\u7b97\u5ef6\u9072\u3002<\/p>\n\n\n\n<p>\u8207\u524d\u4ee3\u6a21\u578b\u76f8\u6bd4\uff0c\u8a72\u6a21\u578b\u5728\u591a\u9805\u95dc\u9375\u5c64\u9762\u4e0a\u5be6\u73fe\u4e86\u986f\u8457\u5347\u7d1a\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u63a1\u7528\u66f4\u8f15\u91cf\u4e14\u9ad8\u6548\u7684\u7db2\u8def\u67b6\u69cb\uff0c\u4f7f\u63a8\u8ad6\u901f\u5ea6\u518d\u63d0\u5347\u3002<\/li>\n\n\n\n<li>\u5f15\u5165\u6539\u9032\u7684\u7279\u5fb5\u878d\u5408\u8207\u6ce8\u610f\u529b\u6a5f\u5236\uff0c\u63d0\u5347\u5c0d\u7d30\u5c0f\u76ee\u6a19\u8207\u8907\u96dc\u5834\u666f\u7684\u6aa2\u6e2c\u7cbe\u5ea6\u3002<\/li>\n\n\n\n<li>\u652f\u63f4\u591a\u4efb\u52d9\u5b78\u7fd2\uff08multi-task learning\uff09\uff0c\u6db5\u84cb\u7269\u4ef6\u5075\u6e2c\u3001\u5be6\u4f8b\u5206\u5272\uff08instance segmentation\uff09\u3001\u59ff\u614b\u4f30\u8a08\uff08pose estimation\uff09\u8207\u5206\u985e\uff08classification\uff09\u7b49\u4efb\u52d9\u3002<\/li>\n\n\n\n<li>\u63d0\u4f9b\u591a\u7a2e\u6a21\u578b\u5c3a\u5bf8\uff08\u5982 YOLO11n\u3001s\u3001m\u3001l\u3001x\uff09\uff0c\u53ef\u4f9d\u786c\u9ad4\u8cc7\u6e90\u8207\u61c9\u7528\u5834\u666f\u5f48\u6027\u90e8\u7f72\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u7e3d\u9ad4\u800c\u8a00\uff0c\u8a72\u6a21\u578b\u4e0d\u50c5\u662f\u4e00\u500b\u901f\u5ea6\u8207\u7cbe\u5ea6\u517c\u5177\u7684\u6a21\u578b\uff0c\u66f4\u662f\u80fd\u9748\u6d3b\u61c9\u5c0d\u591a\u6a23 AI \u8996\u89ba\u4efb\u52d9\u7684\u5168\u65b9\u4f4d\u5f15\u64ce\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ai-agent-\u7684\u6838\u5fc3\u904b\u4f5c\u6a21\u5f0f\">YOLO \u7684\u6838\u5fc3\u904b\u4f5c\u6a21\u5f0f<\/h2>\n\n\n\n<p><strong>YOLO\uff08You Only Look Once\uff09<\/strong> \u7684\u6838\u5fc3\u7406\u5ff5\u5728\u65bc\uff1a\u300c\u53ea\u770b\u4e00\u6b21\uff0c\u5c31\u80fd\u5b8c\u6210\u6574\u5f35\u5f71\u50cf\u7684\u7269\u4ef6\u5075\u6e2c\u300d\u3002<br>\u4e0d\u540c\u65bc\u50b3\u7d71\u65b9\u6cd5\u9700\u5148\u7522\u751f\u5019\u9078\u5340\u57df\uff08Region Proposals\uff09\u518d\u9032\u884c\u5206\u985e\uff0cYOLO \u63a1\u7528**\u7aef\u5230\u7aef\uff08End-to-End\uff09**\u7684\u55ae\u968e\u6bb5\u5075\u6e2c\u67b6\u69cb\uff0c\u4f7f\u63a8\u8ad6\u901f\u5ea6\u9060\u8d85\u904e\u5169\u968e\u6bb5\u6a21\u578b\uff08\u5982 R-CNN\u3001Faster R-CNN\uff09\u3002<\/p>\n\n\n\n<p>\u5176\u904b\u4f5c\u6d41\u7a0b\u53ef\u6982\u62ec\u70ba\u4ee5\u4e0b\u4e09\u500b\u95dc\u9375\u6b65\u9a5f\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u5f71\u50cf\u5206\u683c\uff08Grid Division\uff09<\/strong><br>YOLO \u5c07\u8f38\u5165\u5f71\u50cf\u5207\u5206\u70ba\u56fa\u5b9a\u5927\u5c0f\u7684\u7db2\u683c\uff08grids\uff09\uff0c\u6bcf\u500b\u683c\u5b50\u8ca0\u8cac\u5075\u6e2c\u8a72\u5340\u57df\u5167\u7684\u7269\u4ef6\u3002<\/li>\n\n\n\n<li><strong>\u908a\u754c\u6846\u8207\u5206\u985e\u9810\u6e2c\uff08Bounding Box &amp; Class Prediction\uff09<\/strong><br>\u6bcf\u500b\u683c\u5b50\u540c\u6642\u9810\u6e2c\u591a\u500b\u908a\u754c\u6846\uff08bounding boxes\uff09\uff0c\u4e26\u5c0d\u6bcf\u500b\u6846\u8f38\u51fa\u7269\u4ef6\u985e\u5225\u8207\u7f6e\u4fe1\u5ea6\uff08confidence score\uff09\u3002<\/li>\n\n\n\n<li><strong>\u975e\u6975\u5927\u503c\u6291\u5236\uff08Non-Maximum Suppression, NMS\uff09<\/strong><br>\u6a21\u578b\u6703\u79fb\u9664\u91cd\u758a\u6216\u4f4e\u7f6e\u4fe1\u5ea6\u7684\u6846\uff0c\u4fdd\u7559\u6700\u6709\u4ee3\u8868\u6027\u7684\u6aa2\u6e2c\u7d50\u679c\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u9019\u7a2e\u300c\u55ae\u6b21\u524d\u5411\u50b3\u64ad\uff08Single Forward Pass\uff09\u300d\u7684\u8a2d\u8a08\uff0c\u4f7f YOLO \u80fd\u5728\u6beb\u79d2\u7d1a\u5b8c\u6210\u5075\u6e2c\uff0c\u771f\u6b63\u5be6\u73fe <strong>Real-Time Object Detection\uff08\u5373\u6642\u7269\u4ef6\u5075\u6e2c\uff09<\/strong>\u3002<br>\u56e0\u6b64\uff0c\u5b83\u5728\u901f\u5ea6\u8207\u6e96\u78ba\u5ea6\u4e4b\u9593\u53d6\u5f97\u4e86\u7406\u60f3\u5e73\u8861\uff0c\u4e5f\u6210\u70ba\u908a\u7de3\u904b\u7b97\u8207\u5373\u6642\u61c9\u7528\u5834\u666f\u7684\u9996\u9078\u65b9\u6848\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u70ba\u4ec0\u9ebc-c-\u958b\u767c\u8005\u9700\u8981\u81ea\u5efa-mcp-server\uff1f\">YOLO \u53ef\u4ee5\u505a\u54ea\u4e9b\u4e8b\u60c5\uff1f<\/h2>\n\n\n\n<p><strong>YOLO<\/strong> \u4e0d\u50c5\u662f\u4e00\u500b\u7269\u4ef6\u5075\u6e2c\u6a21\u578b\uff0c\u4e5f\u662f\u591a\u529f\u80fd\u7684 AI \u8996\u89ba\u5f15\u64ce\uff0c\u652f\u63f4\u591a\u7a2e\u4efb\u52d9\u8207\u61c9\u7528\u5834\u666f\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u5373\u6642\u7269\u4ef6\u5075\u6e2c\uff08Real-Time Object Detection\uff09<\/strong>: \u5075\u6e2c\u5404\u985e\u7269\u4ef6\uff0c\u5982\u4eba\u3001\u8eca\u3001\u52d5\u7269\u3001\u5de5\u696d\u96f6\u4ef6\u7b49\u3002\u9069\u7528\u65bc\u76e3\u63a7\u7cfb\u7d71\u3001\u81ea\u99d5\u8eca\u3001\u667a\u80fd\u5de5\u5ee0\u7b49\u5834\u666f<\/li>\n\n\n\n<li><strong>\u5be6\u4f8b\u5206\u5272\uff08Instance Segmentation\uff09<\/strong>: \u4e0d\u53ea\u8fa8\u8b58\u7269\u4ef6\u985e\u5225\uff0c\u9084\u80fd\u7cbe\u78ba\u63cf\u7e6a\u7269\u4ef6\u8f2a\u5ed3\u3002\u9069\u5408\u91ab\u7642\u5f71\u50cf\u3001\u5de5\u696d\u7455\u75b5\u6aa2\u6e2c\u3001AR\/VR \u61c9\u7528<\/li>\n\n\n\n<li><strong>\u59ff\u614b\u4f30\u8a08\uff08Pose Estimation\uff09<\/strong>: \u5075\u6e2c\u4eba\u9ad4\u95dc\u9375\u9ede\u8207\u52d5\u4f5c\u3002\u9069\u5408\u904b\u52d5\u5206\u6790\u3001\u884c\u70ba\u8b58\u5225\u3001\u5065\u8eab\u8f14\u52a9\u7cfb\u7d71<\/li>\n\n\n\n<li><strong>\u5206\u985e\u4efb\u52d9\uff08Classification\uff09<\/strong>: \u5c0d\u5f71\u50cf\u6216\u7269\u4ef6\u9032\u884c\u5206\u985e\uff0c\u652f\u63f4\u81ea\u8a02\u985e\u5225\u3002\u9069\u7528\u65bc\u96f6\u552e\u3001\u5f71\u50cf\u641c\u5c0b\u3001\u54c1\u8cea\u6aa2\u6e2c<\/li>\n\n\n\n<li><strong>\u591a\u4efb\u52d9\u6574\u5408\uff08Multi-Task Learning\uff09<\/strong>: \u540c\u6642\u8655\u7406\u591a\u7a2e\u4efb\u52d9\uff0c\u7121\u9700\u5206\u958b\u6a21\u578b\u3002\u63d0\u5347\u908a\u7de3\u904b\u7b97\u6548\u7387\u8207\u6574\u9ad4\u90e8\u7f72\u4fbf\u5229\u6027<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u958b\u767c\u74b0\u5883\u6e96\u5099\">\u958b\u767c\u74b0\u5883<\/h2>\n\n\n\n<p>Ultralytics \u63d0\u4f9b\u4e86\u5b98\u65b9 <a href=\"https:\/\/saludpcb.com\/zh\/ai-compute-power-pytorch\/\">Python<\/a> \u5957\u4ef6\u8207\u547d\u4ee4\u5217\u5de5\u5177\uff0c\u53ea\u9700\u5e7e\u6b65\u5373\u53ef\u5b8c\u6210\u74b0\u5883\u5efa\u7f6e\u3002<\/p>\n\n\n\n<p>\u7cfb\u7d71\u9700\u6c42 :<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u9805\u76ee<\/th><th>\u5efa\u8b70\u914d\u7f6e<\/th><\/tr><\/thead><tbody><tr><td><strong>\u4f5c\u696d\u7cfb\u7d71<\/strong><\/td><td>Windows \/ macOS \/ Linux<\/td><\/tr><tr><td><strong>Python \u7248\u672c<\/strong><\/td><td>Python 3.8 \u4ee5\u4e0a<\/td><\/tr><tr><td><strong>GPU \u652f\u63f4<\/strong><\/td><td>\u5efa\u8b70\u4f7f\u7528 NVIDIA GPU\uff08CUDA 11+\uff09\u4ee5\u52a0\u901f\u8a13\u7df4\u8207\u63a8\u8ad6<\/td><\/tr><tr><td><strong>\u6846\u67b6\u4f9d\u8cf4<\/strong><\/td><td>PyTorch\uff08\u81ea\u52d5\u5b89\u88dd\uff09<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u5b89\u88dd\">\u5efa\u7acb YOLO \u865b\u64ec\u74b0\u5883<\/h2>\n\n\n\n<p>\u70ba\u4e86\u4fdd\u6301\u958b\u767c\u74b0\u5883\u4e7e\u6de8\u3001\u907f\u514d\u8207\u5176\u4ed6 Python \u5c08\u6848\u7684\u5957\u4ef6\u885d\u7a81\uff0c\u5efa\u8b70\u5148\u5efa\u7acb\u4e00\u500b\u5c08\u5c6c\u7684\u865b\u64ec\u74b0\u5883\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\"><code>python -m venv yoloenv<\/code><\/code><\/pre>\n\n\n\n<p>\u63a5\u8457\u555f\u7528\u74b0\u5883\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\"># macOS \/ Linux\nsource yoloenv\/bin\/activate\n\n# Windows\nyoloenv\\Scripts\\activate<\/code><\/pre>\n\n\n\n<p><br>\u7576\u4f60\u770b\u5230\u547d\u4ee4\u5217\u524d\u65b9\u51fa\u73fe <code>(yoloenv)<\/code> \u6642\uff0c\u5c31\u8868\u793a\u865b\u64ec\u74b0\u5883\u5df2\u7d93\u555f\u7528\u6210\u529f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u5b89\u88dd-yolo\">\u5b89\u88dd YOLO \u5957\u4ef6<\/h2>\n\n\n\n<p>Ultralytics \u63d0\u4f9b\u5b98\u65b9\u7684 YOLO \u5de5\u5177\u5305\uff0c\u5176\u4e2d\u5df2\u5305\u542b\u8a72\u6a21\u578b\u6a21\u578b\u8207\u547d\u4ee4\u5217\u4ecb\u9762\u3002\u53ea\u9700\u4e00\u884c\u6307\u4ee4\u5373\u53ef\u5b89\u88dd\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">pip install ultralytics<\/code><\/pre>\n\n\n\n<p>\u5b89\u88dd\u5b8c\u6210\u5f8c\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6307\u4ee4\u6aa2\u67e5\u662f\u5426\u6210\u529f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">yolo version<\/code><\/pre>\n\n\n\n<p>\u82e5\u986f\u793a\u7248\u672c\u865f\u70ba\u5982 8.3.x\uff0c\u5c31\u4ee3\u8868\u5b89\u88dd\u5b8c\u6210 \u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"c\">Code<\/h2>\n\n\n\n<p>\u5728 Python \u4e2d\u57f7\u884c\u4ee5\u4e0b\u7a0b\u5f0f\u78bc\uff0c\u5982\u679c\u6210\u529f\u8f09\u5165\u6a21\u578b\u4e14\u6c92\u6709\u5831\u932f\uff0c\u5247\u8aaa\u660e\u74b0\u5883\u57fa\u672c\u914d\u7f6e\u6b63\u78ba\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\"># ===============================\n# YOLO Complete Python Example\n# ===============================\n\nimport os\nfrom ultralytics import YOLO\n\n# Set up project folder\nproject_dir = \"\/Users\/kdm4\/Desktop\/yoloenv\/main\/outputs\"  # Customize the save folder\nos.makedirs(project_dir, exist_ok=True)  # Automatically create if it doesn't exist\n\n# Load YOLO pre-trained model\n# This is the nano version \u2013 lightweight and fast\nmodel = YOLO(\"yolo11n.pt\")\n\n# Run inference on an image and save results\nimage_source = \"https:\/\/ultralytics.com\/images\/bus.jpg\"\n\nresults = model(\n    image_source,\n    save=True,                 # Automatically save the output\n    project=project_dir,       # Specify the save location\n    name=\"demo\",               # Subfolder name\n)\n\n# Display inference results\nresults[0].show()  # Opens a window showing detection boxes\n\n# Print bounding box details\nfor i, box in enumerate(results[0].boxes):\n    cls_id = int(box.cls)                    # Class index\n    conf = float(box.conf)                   # Confidence score\n    xyxy = box.xyxy[0].tolist()             # Bounding box coordinates [x1, y1, x2, y2]\n    print(f\"Object {i+1}: Class {cls_id}, Confidence {conf:.2f}, BBox {xyxy}\")\n\n# Show save directory\nprint(f\"Results saved to: {results[0].save_dir}\")<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"yolo-11-python-example-\u8aaa\u660e\">\u7a0b\u5f0f\u8aaa\u660e<\/h2>\n\n\n\n<p><strong>\u5c0e\u5165\u5957\u4ef6 :<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">import os\nfrom ultralytics import YOLO<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>os<\/code> \u7528\u4f86\u5efa\u7acb\u8cc7\u6599\u593e\u6216\u64cd\u4f5c\u6a94\u6848\u8def\u5f91\u3002<\/li>\n\n\n\n<li><code>ultralytics.YOLO<\/code> \u662f\u8a72\u6a21\u578b\u7684 Python \u6a21\u7d44\uff0c\u7528\u4f86\u8f09\u5165\u6a21\u578b\u3001\u9032\u884c\u63a8\u8ad6\u3001\u7ba1\u7406\u7d50\u679c\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u8a2d\u5b9a\u5c08\u6848\u8cc7\u6599\u593e :<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">project_dir = \"\/Users\/kdm4\/Desktop\/yoloenv\/main\/outputs\"\nos.makedirs(project_dir, exist_ok=True)<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>project_dir<\/code>\uff1a\u6307\u5b9a\u8a72\u6a21\u578b\u5132\u5b58\u63a8\u8ad6\u7d50\u679c\u7684\u4e3b\u8cc7\u6599\u593e\u3002<\/li>\n\n\n\n<li><code>os.makedirs(..., exist_ok=True)<\/code>\uff1a\u5982\u679c\u8cc7\u6599\u593e\u4e0d\u5b58\u5728\u6703\u81ea\u52d5\u5efa\u7acb\uff0c\u907f\u514d\u7a0b\u5f0f\u5831\u932f\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u8f09\u5165\u6a21\u578b :<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">model = YOLO(\"yolo11n.pt\")<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>yolo11n.pt<\/code> \u662f <strong>YOLO11 nano \u7248<\/strong>\uff0c\u8f15\u91cf\u4e14\u5feb\u901f\u3002<\/li>\n\n\n\n<li>\u9019\u884c\u7a0b\u5f0f\u6703\u8f09\u5165\u6a21\u578b\u5230 Python\uff0c\u6e96\u5099\u9032\u884c\u63a8\u8ad6\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u63a8\u8ad6\u5716\u7247\u4e26\u81ea\u52d5\u5132\u5b58 :<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">results = model(\n    \"https:\/\/ultralytics.com\/images\/bus.jpg\",\n    save=True,\n    project=project_dir,\n    name=\"demo\",\n)<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>\"https:\/\/ultralytics.com\/images\/bus.jpg\"<\/code>\uff1a\u63a8\u8ad6\u7684\u5716\u7247\uff0c\u53ef\u4ee5\u662f\u672c\u5730\u6a94\u6848\u6216\u7db2\u8def\u5716\u7247\u3002<\/li>\n\n\n\n<li><code>save=True<\/code>\uff1a\u81ea\u52d5\u628a\u7d50\u679c\u5b58\u6210\u5e36\u6a19\u8a3b\u7684\u5716\u7247\u3002<\/li>\n\n\n\n<li><code>project<\/code>\uff1a\u5132\u5b58\u4e3b\u8cc7\u6599\u593e\u3002<\/li>\n\n\n\n<li><code>name<\/code>\uff1a\u5efa\u7acb\u5b50\u8cc7\u6599\u593e\u540d\u7a31\uff0c\u907f\u514d\u591a\u6b21\u57f7\u884c\u8986\u84cb\u820a\u7d50\u679c\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u986f\u793a\u5716\u7247\u7d50\u679c :<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">results[0].show()<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6253\u958b\u4e00\u500b\u8996\u7a97\uff0c\u986f\u793a\u63a8\u8ad6\u5f8c\u7684\u5716\u7247\uff0c\u6846\u51fa\u5075\u6e2c\u5230\u7684\u7269\u4ef6\u4e26\u6a19\u793a\u985e\u5225\u8207\u4fe1\u5fc3\u5206\u6578\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u5217\u5370\u5075\u6e2c\u6846\u8cc7\u6599 :<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">for i, box in enumerate(results[0].boxes):\n    cls_id = int(box.cls)\n    conf = float(box.conf)\n    xyxy = box.xyxy[0].tolist()\n    print(f\"Object {i+1}: Class {cls_id}, Confidence {conf:.2f}, BBox {xyxy}\")<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>results[0].boxes<\/code>\uff1a\u6240\u6709\u5075\u6e2c\u6846\u7684\u96c6\u5408\uff0c\u6bcf\u500b\u7269\u4ef6\u7684\u8a73\u7d30\u8cc7\u8a0a\u90fd\u5728\u9019\u88e1\u3002<\/li>\n\n\n\n<li><code>cls_id<\/code>\uff1a\u7269\u4ef6\u985e\u5225\u7de8\u865f\u3002<\/li>\n\n\n\n<li><code>conf<\/code>\uff1a\u6a21\u578b\u5c0d\u8a72\u7269\u4ef6\u7684\u4fe1\u5fc3\u5206\u6578\uff080~1\uff09\u3002<\/li>\n\n\n\n<li><code>xyxy<\/code>\uff1a\u908a\u754c\u6846\u5ea7\u6a19 <code>[x1, y1, x2, y2]<\/code>\u3002<\/li>\n\n\n\n<li>\u9019\u6bb5\u7a0b\u5f0f\u6703\u9010\u4e00\u5217\u5370\u6bcf\u500b\u7269\u4ef6\u7684\u8cc7\u8a0a\u5230\u7d42\u7aef\u6a5f\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u986f\u793a\u5132\u5b58\u8def\u5f91 :<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">print(f\"Results saved to: {results[0].save_dir}\")<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>results[0].save_dir<\/code>\uff1a\u63a8\u8ad6\u7d50\u679c\u5132\u5b58\u7684\u8cc7\u6599\u593e\u8def\u5f91\uff0c\u65b9\u4fbf\u4f60\u6253\u958b\u6aa2\u8996\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u57f7\u884c\u5f8c\u4f60\u6703\u770b\u5230 :<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u5f48\u51fa\u8996\u7a97<\/strong>\uff1a\u5716\u7247\u4e2d\u6240\u6709\u5075\u6e2c\u5230\u7684\u7269\u4ef6\u90fd\u6709\u6a19\u8a3b\u6846\u8207\u985e\u5225\u540d\u7a31\u3002<\/li>\n\n\n\n<li><strong>\u7d42\u7aef\u6a5f\u8f38\u51fa<\/strong>\uff1a\u6bcf\u500b\u5075\u6e2c\u7269\u4ef6\u7684\u985e\u5225\u3001\u4fe1\u5fc3\u5206\u6578\u8207\u5ea7\u6a19\u3002<\/li>\n\n\n\n<li><strong>\u8cc7\u6599\u593e\u7d50\u679c<\/strong>\uff1a<code>outputs\/demo\/<\/code> \u5167\u6703\u6709\u6a19\u8a3b\u5f8c\u7684\u5716\u7247\uff0c\u65b9\u4fbf\u4fdd\u5b58\u6216\u5206\u6790\u3002<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"810\" height=\"1080\" src=\"https:\/\/saludpcb.com\/zh\/wp-content\/uploads\/2025\/11\/bus.jpg\" alt=\"YOLO11\" class=\"wp-image-4096\" title=\"\" srcset=\"https:\/\/saludpcb.com\/zh\/wp-content\/uploads\/2025\/11\/bus.jpg 810w, https:\/\/saludpcb.com\/zh\/wp-content\/uploads\/2025\/11\/bus-768x1024.jpg 768w\" sizes=\"auto, (max-width: 810px) 100vw, 810px\" \/><figcaption class=\"wp-element-caption\">\u6e2c\u8a66\u5716\u7247\u4f86\u6e90\uff1a<code>Ultralytics<\/code> \u5b98\u65b9\u793a\u7bc4\u5f71\u50cf\u6a94 bus.jpg <\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u7d50\u8ad6-1\">\u7d50\u8ad6<\/h2>\n\n\n\n<p><strong><a href=\"https:\/\/www.ultralytics.com\/\" target=\"_blank\" rel=\"noopener\">YOLO11<\/a>\uff0c\u4e0d\u53ea\u662f YOLO \u7cfb\u5217\u7684\u9032\u5316\uff0c\u66f4\u662f\u4e00\u5834\u5373\u6642\u7269\u4ef6\u5075\u6e2c\u7684\u9769\u547d\u3002<\/strong><\/p>\n\n\n\n<p>\u5b83\u50cf\u662f\u4e00\u9053\u9583\u96fb\uff0c\u4ee5\u9a5a\u4eba\u7684\u901f\u5ea6\u5283\u7834\u8996\u89ba\u8655\u7406\u7684\u5929\u7a7a\uff0c\u540c\u6642\u53c8\u4ee5\u9df9\u773c\u822c\u7684\u7cbe\u6e96\u9396\u5b9a\u6bcf\u4e00\u500b\u7d30\u7bc0\u3002\u7121\u8ad6\u662f\u8857\u982d\u76e3\u63a7\u3001\u667a\u6167\u96f6\u552e\uff0c\u9084\u662f\u81ea\u99d5\u8eca\u7684\u5373\u6642\u5224\u8b80\uff0cYOLO \u90fd\u80fd\u5728\u6beb\u79d2\u4e4b\u9593\u5b8c\u6210\u8fa8\u8b58\uff0c\u70ba AI \u61c9\u7528\u6ce8\u5165\u524d\u6240\u672a\u6709\u7684\u6548\u7387\u8207\u53ef\u9760\u6027\u3002<\/p>\n\n\n\n<p>\u66f4\u4ee4\u4eba\u9a5a\u8277\u7684\u662f\uff0c\u8a72\u6a21\u578b\u4e0d\u50c5\u300c\u770b\u5f97\u5feb\u3001\u770b\u5f97\u6e96\u300d\uff0c\u9084\u80fd\u300c\u770b\u5f97\u591a\u300d\u2014\u2014\u5f9e\u7269\u4ef6\u5075\u6e2c\u3001\u8a9e\u7fa9\u5206\u5272\u3001\u59ff\u614b\u4f30\u8a08\uff0c\u5230\u5716\u50cf\u5206\u985e\uff0c\u4e00\u500b\u6a21\u578b\u5c31\u80fd\u641e\u5b9a\u591a\u7a2e\u4efb\u52d9\uff0c\u5fb9\u5e95\u985b\u8986\u50b3\u7d71\u96fb\u8166\u8996\u89ba\u7684\u5de5\u4f5c\u6d41\u7a0b\u3002<\/p>\n\n\n\n<p>\u5c0d\u65bc\u7814\u7a76\u4eba\u54e1\uff0c\u5b83\u662f\u63a2\u7d22\u672a\u4f86\u7684\u5229\u5668\uff1b\u5c0d\u65bc\u958b\u767c\u8005\uff0c\u5b83\u662f\u5feb\u901f\u843d\u5730\u7684\u6a4b\u6a11\uff1b\u5c0d\u65bc\u4f01\u696d\uff0c\u5b83\u662f\u667a\u6167\u8f49\u578b\u7684\u52a0\u901f\u5668\u3002\u5728\u9019\u500b AI \u9ad8\u901f\u6f14\u9032\u7684\u6642\u4ee3\uff0c\u8a72\u6a21\u578b\u4e0d\u53ea\u662f\u6280\u8853\u7684\u7a81\u7834\uff0c\u66f4\u662f\u667a\u6167\u8996\u89ba\u666e\u53ca\u5316\u7684\u95dc\u9375\u4e00\u6b65\u2014\u2014\u8b93\u6bcf\u4e00\u500b\u8a2d\u5099\u90fd\u80fd\u300c\u770b\u898b\u300d\u4e16\u754c\uff0c\u8b93\u6bcf\u4e00\u500b\u61c9\u7528\u90fd\u80fd\u300c\u7406\u89e3\u300d\u73fe\u5be6\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator alignwide has-text-color has-palette-color-1-color has-alpha-channel-opacity has-palette-color-1-background-color has-background is-style-wide\"\/>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>YOLO11\uff0c\u4f5c\u70ba Ultralytics \u63a8\u51fa\u7684\u6700\u65b0\u4e00\u4ee3\u5373\u6642\u7269\u4ef6\u5075\u6e2c\u6a21\u578b\uff0c\u6b63\u6380\u8d77\u96fb\u8166\u8996\u89ba\u9818\u57df\u7684\u65b0\u4e00\u6ce2\u9769\u547d\u3002\u5b83 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4086,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[93],"tags":[92,27,21,91,44,9,86,11],"class_list":["post-4081","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","tag-ai","tag-c","tag-ide","tag-ollama","tag-programming-language","tag-python","tag-rtos","tag-tutorial"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/posts\/4081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/comments?post=4081"}],"version-history":[{"count":15,"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/posts\/4081\/revisions"}],"predecessor-version":[{"id":4098,"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/posts\/4081\/revisions\/4098"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/media\/4086"}],"wp:attachment":[{"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/media?parent=4081"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/categories?post=4081"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/saludpcb.com\/zh\/wp-json\/wp\/v2\/tags?post=4081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}