{"id":120466,"date":"2026-10-31T19:01:26","date_gmt":"2026-10-31T11:01:26","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/120466.html"},"modified":"2026-10-31T19:01:26","modified_gmt":"2026-10-31T11:01:26","slug":"yolov5-%e4%bd%bf%e7%94%a8%e6%8c%87%e5%8d%97%ef%bc%9a%e4%bb%8e%e7%8e%af%e5%a2%83%e6%90%ad%e5%bb%ba%e5%88%b0%e6%8e%a8%e7%90%86%e4%b8%8e%e8%ae%ad%e7%bb%83","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/120466.html","title":{"rendered":"YOLOv5 \u4f7f\u7528\u6307\u5357\uff1a\u4ece\u73af\u5883\u642d\u5efa\u5230\u63a8\u7406\u4e0e\u8bad\u7ec3"},"content":{"rendered":"<h3>\u4e00\u3001YOLOv5 \u7b80\u4ecb<\/h3>\n<p>YOLOv5 \u662f Ultralytics \u5f00\u6e90\u7684\u76ee\u6807\u68c0\u6d4b\u6846\u67b6&#xff0c;\u57fa\u4e8e PyTorch \u5b9e\u73b0\u3002\u5b83\u5e76\u4e0d\u662f YOLO \u7cfb\u5217\u7684\u7b2c\u4e94\u4e2a\u5b98\u65b9\u7248\u672c&#xff0c;\u800c\u662f\u7531 Ultralytics \u56e2\u961f\u5728 YOLOv3 \u57fa\u7840\u4e0a\u6301\u7eed\u8fed\u4ee3\u7684\u5de5\u7a0b\u5316\u5b9e\u73b0\u3002\u76f8\u6bd4\u65e9\u671f\u7248\u672c&#xff0c;YOLOv5 \u7684\u4f18\u52bf\u4e3b\u8981\u4f53\u73b0\u5728\u4e09\u70b9&#xff1a;<\/p>\n<ul>\n<li>\u5de5\u7a0b\u5316\u5b8c\u5584&#xff1a;\u6570\u636e\u51c6\u5907\u3001\u8bad\u7ec3\u3001\u9a8c\u8bc1\u3001\u63a8\u7406\u3001\u5bfc\u51fa\u5168\u6d41\u7a0b\u811a\u672c\u9f50\u5907&#xff0c;\u5f00\u7bb1\u5373\u7528\u3002<\/li>\n<li>\u6027\u80fd\u5747\u8861&#xff1a;\u63d0\u4f9b n\u3001s\u3001m\u3001l\u3001x \u4e94\u79cd\u89c4\u6a21&#xff0c;\u53c2\u6570\u91cf\u4ece\u7ea6 1.9M \u5230 86M&#xff0c;\u53ef\u6309\u7b97\u529b\u7075\u6d3b\u9009\u62e9\u3002<\/li>\n<li>\u751f\u6001\u6210\u719f&#xff1a;\u652f\u6301 ONNX\u3001TensorRT\u3001OpenVINO\u3001CoreML \u7b49\u591a\u79cd\u90e8\u7f72\u683c\u5f0f&#xff0c;\u793e\u533a\u6587\u6863\u548c\u95ee\u9898\u89e3\u7b54\u4e30\u5bcc\u3002<\/li>\n<\/ul>\n<p>\u672c\u6587\u6309\u7167\u300c\u73af\u5883\u642d\u5efa \u2192 \u6570\u636e\u51c6\u5907 \u2192 \u63a8\u7406 \u2192 \u8bad\u7ec3 \u2192 \u5bfc\u51fa\u90e8\u7f72\u300d\u7684\u987a\u5e8f&#xff0c;\u5b8c\u6574\u8d70\u4e00\u904d YOLOv5 \u7684\u4f7f\u7528\u6d41\u7a0b\u3002<\/p>\n<h3>\u4e8c\u3001\u73af\u5883\u642d\u5efa<\/h3>\n<h4>2.1 \u57fa\u7840\u4f9d\u8d56<\/h4>\n<p>\u5efa\u8bae\u4f7f\u7528 Python 3.8 \u53ca\u4ee5\u4e0a\u7248\u672c&#xff0c;\u5e76\u51c6\u5907\u4e00\u5757\u53ef\u7528\u7684 NVIDIA \u663e\u5361&#xff08;CPU \u4e5f\u80fd\u8dd1&#xff0c;\u4f46\u8bad\u7ec3\u901f\u5ea6\u4f1a\u6162\u5f88\u591a&#xff09;\u3002\u5148\u786e\u8ba4 CUDA \u4e0e PyTorch \u7248\u672c\u5339\u914d&#xff1a;<\/p>\n<p>nvidia-smi<br \/>\npython &#8211;version <\/p>\n<h4>2.2 \u514b\u9686\u4ed3\u5e93\u5e76\u5b89\u88c5\u4f9d\u8d56<\/h4>\n<p>git clone https:\/\/github.com\/ultralytics\/yolov5.git<br \/>\ncd yolov5<br \/>\npip install -r requirements.txt <\/p>\n<p>\u5982\u679c\u4f7f\u7528 GPU&#xff0c;\u8bf7\u5148\u6309 PyTorch \u5b98\u7f51 \u7684\u6307\u5f15\u5b89\u88c5\u5bf9\u5e94 CUDA \u7248\u672c\u7684 torch&#xff0c;\u518d\u6267\u884c\u4e0a\u9762\u7684\u4f9d\u8d56\u5b89\u88c5&#xff0c;\u907f\u514d pip \u81ea\u52a8\u88c5\u6210 CPU \u7248\u672c\u3002<\/p>\n<h4>2.3 \u9a8c\u8bc1\u5b89\u88c5<\/h4>\n<p>python -c &#034;import torch; print(torch.__version__, torch.cuda.is_available())&#034; <\/p>\n<p>\u8f93\u51fa\u4e2d True \u8868\u793a GPU \u53ef\u7528\u3002\u968f\u540e\u8fd0\u884c\u4e00\u6b21\u5b98\u65b9\u63a8\u7406\u811a\u672c&#xff0c;\u82e5\u80fd\u6b63\u5e38\u8f93\u51fa\u68c0\u6d4b\u7ed3\u679c&#xff0c;\u8bf4\u660e\u73af\u5883\u5c31\u7eea\u3002<\/p>\n<h3>\u4e09\u3001\u5feb\u901f\u63a8\u7406<\/h3>\n<h4>3.1 \u547d\u4ee4\u884c\u63a8\u7406<\/h4>\n<p>YOLOv5 \u63d0\u4f9b\u4e86 detect.py \u811a\u672c&#xff0c;\u52a0\u8f7d\u5b98\u65b9\u9884\u8bad\u7ec3\u6743\u91cd\u5373\u53ef\u76f4\u63a5\u68c0\u6d4b&#xff1a;<\/p>\n<p>python detect.py &#8211;weights yolov5s.pt &#8211;source data\/images &#8211;img-size 640 &#8211;conf-thres 0.25 <\/p>\n<p>\u5e38\u7528\u53c2\u6570\u8bf4\u660e&#xff1a;<\/p>\n<table>\n<tr>\u53c2\u6570\u542b\u4e49\u793a\u4f8b\u503c<\/tr>\n<tbody>\n<tr>\n<td>&#8211;weights<\/td>\n<td>\u6a21\u578b\u6743\u91cd\u8def\u5f84<\/td>\n<td>yolov5s.pt<\/td>\n<\/tr>\n<tr>\n<td>&#8211;source<\/td>\n<td>\u8f93\u5165\u6e90&#xff0c;\u652f\u6301\u56fe\u7247\u3001\u76ee\u5f55\u3001\u89c6\u9891\u3001\u6444\u50cf\u5934<\/td>\n<td>data\/images\u30010<\/td>\n<\/tr>\n<tr>\n<td>&#8211;img-size<\/td>\n<td>\u63a8\u7406\u8f93\u5165\u5206\u8fa8\u7387<\/td>\n<td>640<\/td>\n<\/tr>\n<tr>\n<td>&#8211;conf-thres<\/td>\n<td>\u7f6e\u4fe1\u5ea6\u9608\u503c<\/td>\n<td>0.25<\/td>\n<\/tr>\n<tr>\n<td>&#8211;iou-thres<\/td>\n<td>NMS \u7684 IoU \u9608\u503c<\/td>\n<td>0.45<\/td>\n<\/tr>\n<tr>\n<td>&#8211;device<\/td>\n<td>\u8fd0\u884c\u8bbe\u5907<\/td>\n<td>0 \u6216 cpu<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u7ed3\u679c\u9ed8\u8ba4\u4fdd\u5b58\u5728 runs\/detect\/exp \u76ee\u5f55\u4e0b\u3002<\/p>\n<h4>3.2 Python \u4ee3\u7801\u8c03\u7528<\/h4>\n<p>\u5728\u4e1a\u52a1\u4ee3\u7801\u4e2d\u66f4\u5e38\u7528\u7684\u662f\u76f4\u63a5\u8c03\u7528\u6a21\u578b\u63a5\u53e3&#xff1a;<\/p>\n<p>import torch<br \/>\n\u52a0\u8f7d\u6a21\u578b&#xff08;\u9996\u6b21\u8fd0\u884c\u4f1a\u81ea\u52a8\u4e0b\u8f7d\u6743\u91cd&#xff09;<br \/>\nmodel &#061; torch.hub.load(&#039;ultralytics\/yolov5&#039;, &#039;yolov5s&#039;, pretrained&#061;True)<br \/>\n\u8bbe\u7f6e\u63a8\u7406\u53c2\u6570<br \/>\nmodel.conf &#061; 0.25<br \/>\nmodel.iou &#061; 0.45<br \/>\n\u63a8\u7406<br \/>\nresults &#061; model(&#039;data\/images\/bus.jpg&#039;)<br \/>\n\u6253\u5370\u7ed3\u679c\u5e76\u4fdd\u5b58\u53ef\u89c6\u5316\u56fe\u7247<br \/>\nresults.print()<br \/>\nresults.save(&#039;runs\/detect\/custom&#039;)<br \/>\n\u83b7\u53d6\u7ed3\u6784\u5316\u7ed3\u679c&#xff1a;xmin, ymin, xmax, ymax, confidence, class, name<br \/>\ndf &#061; results.pandas().xyxy[0]<br \/>\nprint(df) <\/p>\n<p>\u5982\u679c\u4e0d\u60f3\u4f9d\u8d56 torch.hub \u5728\u7ebf\u62c9\u53d6&#xff0c;\u4e5f\u53ef\u4ee5\u5728\u672c\u5730\u4ed3\u5e93\u76ee\u5f55\u4e0b\u4f7f\u7528&#xff1a;<\/p>\n<p>import sys<br \/>\nsys.path.append(&#039;\/path\/to\/yolov5&#039;)<br \/>\nimport torch<br \/>\nfrom models.common import DetectMultiBackend<br \/>\ndevice &#061; torch.device(&#039;cuda:0&#039; if torch.cuda.is_available() else &#039;cpu&#039;)<br \/>\nmodel &#061; DetectMultiBackend(&#039;yolov5s.pt&#039;, device&#061;device) <\/p>\n<h3>\u56db\u3001\u51c6\u5907\u81ea\u5b9a\u4e49\u6570\u636e\u96c6<\/h3>\n<h4>4.1 \u6570\u636e\u6807\u6ce8<\/h4>\n<p>YOLOv5 \u4f7f\u7528 YOLO \u683c\u5f0f\u6807\u6ce8&#xff1a;\u6bcf\u5f20\u56fe\u7247\u5bf9\u5e94\u4e00\u4e2a\u540c\u540d .txt \u6587\u4ef6&#xff0c;\u6bcf\u884c\u8868\u793a\u4e00\u4e2a\u76ee\u6807&#xff0c;\u683c\u5f0f\u4e3a&#xff1a;<\/p>\n<p>class_id x_center y_center width height <\/p>\n<p>\u5176\u4e2d\u5750\u6807\u5747\u4e3a\u76f8\u5bf9\u56fe\u7247\u5bbd\u9ad8\u7684\u5f52\u4e00\u5316\u503c&#xff0c;\u53d6\u503c\u8303\u56f4 0 \u5230 1\u3002\u63a8\u8350\u4f7f\u7528 LabelImg\u3001Label Studio \u6216 Roboflow \u8fdb\u884c\u6807\u6ce8&#xff0c;\u5bfc\u51fa\u65f6\u9009\u62e9 YOLO \u683c\u5f0f\u3002<\/p>\n<h4>4.2 \u76ee\u5f55\u7ed3\u6784<\/h4>\n<p>dataset\/<br \/>\n\u251c\u2500\u2500 images\/<br \/>\n\u2502   \u251c\u2500\u2500 train\/<br \/>\n\u2502   \u2514\u2500\u2500 val\/<br \/>\n\u2514\u2500\u2500 labels\/<br \/>\n    \u251c\u2500\u2500 train\/<br \/>\n    \u2514\u2500\u2500 val\/ <\/p>\n<p>\u6ce8\u610f images \u4e0e labels \u4e0b\u7684\u5b50\u76ee\u5f55\u540d\u5fc5\u987b\u4e00\u4e00\u5bf9\u5e94&#xff0c;\u56fe\u7247\u4e0e\u6807\u7b7e\u6587\u4ef6\u540d\u4fdd\u6301\u4e00\u81f4&#xff08;\u4ec5\u6269\u5c55\u540d\u4e0d\u540c&#xff09;\u3002<\/p>\n<h4>4.3 \u7f16\u5199\u6570\u636e\u914d\u7f6e\u6587\u4ef6<\/h4>\n<p>\u5728 data\/ \u76ee\u5f55\u4e0b\u65b0\u5efa mydata.yaml&#xff1a;<\/p>\n<p>path: ..\/dataset<br \/>\ntrain: images\/train<br \/>\nval: images\/val<br \/>\nnc: 3<br \/>\nnames: [&#039;person&#039;, &#039;car&#039;, &#039;dog&#039;] <\/p>\n<p>nc \u4e3a\u7c7b\u522b\u6570&#xff0c;names \u7684\u987a\u5e8f\u5fc5\u987b\u4e0e\u6807\u6ce8\u6587\u4ef6\u4e2d\u7684 class_id \u4e25\u683c\u5bf9\u5e94\u3002<\/p>\n<h3>\u4e94\u3001\u6a21\u578b\u8bad\u7ec3<\/h3>\n<h4>5.1 \u4ece\u9884\u8bad\u7ec3\u6743\u91cd\u5f00\u59cb\u8bad\u7ec3<\/h4>\n<p>python train.py \\\\<br \/>\n  &#8211;img 640 \\\\<br \/>\n  &#8211;batch 16 \\\\<br \/>\n  &#8211;epochs 100 \\\\<br \/>\n  &#8211;data data\/mydata.yaml \\\\<br \/>\n  &#8211;weights yolov5s.pt \\\\<br \/>\n  &#8211;device 0 <\/p>\n<p>\u5173\u952e\u53c2\u6570\u8bf4\u660e&#xff1a;<\/p>\n<ul>\n<li>&#8211;img&#xff1a;\u8bad\u7ec3\u5206\u8fa8\u7387&#xff0c;\u663e\u5b58\u4e0d\u8db3\u65f6\u53ef\u964d\u5230 416 \u6216 320\u3002<\/li>\n<li>&#8211;batch&#xff1a;\u6279\u5927\u5c0f&#xff0c;\u663e\u5b58\u4e0d\u8db3\u65f6\u4f18\u5148\u8c03\u5c0f\u8be5\u503c\u3002<\/li>\n<li>&#8211;weights&#xff1a;\u5f3a\u70c8\u5efa\u8bae\u52a0\u8f7d\u9884\u8bad\u7ec3\u6743\u91cd&#xff0c;\u6536\u655b\u901f\u5ea6\u548c\u7cbe\u5ea6\u90fd\u660e\u663e\u4f18\u4e8e\u4ece\u96f6\u8bad\u7ec3\u3002<\/li>\n<li>&#8211;hyp&#xff1a;\u8d85\u53c2\u6570\u6587\u4ef6&#xff0c;\u9ed8\u8ba4 data\/hyps\/hyp.scratch-low.yaml\u3002<\/li>\n<\/ul>\n<h4>5.2 \u8bad\u7ec3\u8fc7\u7a0b\u76d1\u63a7<\/h4>\n<p>\u8bad\u7ec3\u65e5\u5fd7\u548c\u6743\u91cd\u4fdd\u5b58\u5728 runs\/train\/exp \u76ee\u5f55&#xff0c;\u5176\u4e2d results.png \u6c47\u603b\u4e86\u635f\u5931\u66f2\u7ebf\u548c mAP \u66f2\u7ebf\u3002\u4e5f\u53ef\u4ee5\u542f\u52a8 TensorBoard \u5b9e\u65f6\u67e5\u770b&#xff1a;<\/p>\n<p>tensorboard &#8211;logdir runs\/train <\/p>\n<p>\u91cd\u70b9\u5173\u6ce8 mAP&#064;0.5 \u4e0e mAP&#064;0.5:0.95 \u4e24\u4e2a\u6307\u6807&#xff0c;\u4ee5\u53ca\u9a8c\u8bc1\u96c6\u635f\u5931\u662f\u5426\u51fa\u73b0\u53cd\u5f39&#xff08;\u8fc7\u62df\u5408\u4fe1\u53f7&#xff09;\u3002<\/p>\n<h4>5.3 \u65ad\u70b9\u7eed\u8bad<\/h4>\n<p>python train.py &#8211;resume runs\/train\/exp\/weights\/last.pt <\/p>\n<h3>\u516d\u3001\u6a21\u578b\u9a8c\u8bc1\u4e0e\u63a8\u7406<\/h3>\n<h4>6.1 \u5728\u9a8c\u8bc1\u96c6\u4e0a\u8bc4\u4f30<\/h4>\n<p>python val.py &#8211;weights runs\/train\/exp\/weights\/best.pt &#8211;data data\/mydata.yaml &#8211;img 640 <\/p>\n<p>\u8f93\u51fa\u4f1a\u7ed9\u51fa\u6bcf\u4e00\u7c7b\u7684 Precision\u3001Recall\u3001mAP&#064;0.5 \u548c mAP&#064;0.5:0.95&#xff0c;\u53ef\u636e\u6b64\u5224\u65ad\u54ea\u4e00\u7c7b\u6548\u679c\u8f83\u5dee&#xff0c;\u518d\u9488\u5bf9\u6027\u8865\u5145\u6570\u636e\u3002<\/p>\n<h4>6.2 \u7528\u81ea\u8bad\u7ec3\u6a21\u578b\u63a8\u7406<\/h4>\n<p>python detect.py &#8211;weights runs\/train\/exp\/weights\/best.pt &#8211;source test_images &#8211;img 640 &#8211;conf-thres 0.3 <\/p>\n<h3>\u4e03\u3001\u6a21\u578b\u5bfc\u51fa\u4e0e\u90e8\u7f72<\/h3>\n<p>YOLOv5 \u5185\u7f6e export.py&#xff0c;\u53ef\u5c06\u6a21\u578b\u5bfc\u51fa\u4e3a\u591a\u79cd\u63a8\u7406\u683c\u5f0f&#xff1a;<\/p>\n<p># \u5bfc\u51fa ONNX<br \/>\npython export.py &#8211;weights best.pt &#8211;include onnx &#8211;img 640<br \/>\n\u5bfc\u51fa TensorRT&#xff08;\u9700\u8981 GPU \u4e0e TensorRT \u73af\u5883&#xff09;<br \/>\npython export.py &#8211;weights best.pt &#8211;include engine &#8211;img 640 &#8211;device 0<br \/>\n\u5bfc\u51fa OpenVINO<br \/>\npython export.py &#8211;weights best.pt &#8211;include openvino &#8211;img 640 <\/p>\n<p>\u5bfc\u51fa\u540e\u53ef\u7528 ONNX Runtime \u505a\u8f7b\u91cf\u63a8\u7406&#xff1a;<\/p>\n<p>import onnxruntime as ort<br \/>\nimport numpy as np<br \/>\nsession &#061; ort.InferenceSession(&#039;best.onnx&#039;, providers&#061;[&#039;CUDAExecutionProvider&#039;, &#039;CPUExecutionProvider&#039;])<br \/>\ninput_name &#061; session.get_inputs()[0].name<br \/>\n\u8f93\u5165\u9700\u4e3a NCHW\u3001\u5f52\u4e00\u5316\u5230 0-1 \u7684 float32 \u6570\u7ec4<br \/>\nblob &#061; np.random.rand(1, 3, 640, 640).astype(np.float32)<br \/>\noutputs &#061; session.run(None, {input_name: blob})<br \/>\nprint([o.shape for o in outputs]) <\/p>\n<p>\u6ce8\u610f\u5bfc\u51fa\u540e\u7684\u6a21\u578b\u8f93\u51fa\u4ecd\u662f\u539f\u59cb\u9884\u6d4b\u5f20\u91cf&#xff0c;\u9700\u8981\u81ea\u884c\u5b9e\u73b0 NMS \u540e\u5904\u7406&#xff0c;\u6216\u76f4\u63a5\u4f7f\u7528 Ultralytics \u63d0\u4f9b\u7684\u63a8\u7406\u5c01\u88c5\u3002<\/p>\n<h3>\u516b\u3001\u5e38\u89c1\u95ee\u9898\u4e0e\u8c03\u4f18\u5efa\u8bae<\/h3>\n<ul>\n<li>\u663e\u5b58\u4e0d\u8db3&#xff08;CUDA out of memory&#xff09;&#xff1a;\u4f9d\u6b21\u5c1d\u8bd5\u51cf\u5c0f &#8211;batch\u3001\u964d\u4f4e &#8211;img\u3001\u6539\u7528\u66f4\u5c0f\u7684\u6a21\u578b&#xff08;yolov5n \/ yolov5s&#xff09;\u3002<\/li>\n<li>\u8bad\u7ec3\u4e0d\u6536\u655b&#xff1a;\u68c0\u67e5\u6807\u6ce8\u6587\u4ef6\u8def\u5f84\u4e0e\u7c7b\u522b id \u662f\u5426\u6b63\u786e&#xff0c;\u786e\u8ba4 nc \u4e0e names \u6570\u91cf\u4e00\u81f4&#xff0c;\u5e76\u786e\u4fdd\u52a0\u8f7d\u4e86\u9884\u8bad\u7ec3\u6743\u91cd\u3002<\/li>\n<li>\u6f0f\u68c0\u4e25\u91cd&#xff1a;\u9002\u5f53\u964d\u4f4e &#8211;conf-thres&#xff0c;\u6216\u8865\u5145\u5c0f\u76ee\u6807\u3001\u906e\u6321\u573a\u666f\u7684\u8bad\u7ec3\u6837\u672c\u3002<\/li>\n<li>\u8bef\u68c0\u8fc7\u591a&#xff1a;\u63d0\u9ad8\u7f6e\u4fe1\u5ea6\u9608\u503c&#xff0c;\u68c0\u67e5\u662f\u5426\u5b58\u5728\u6807\u6ce8\u9519\u8bef\u6216\u7c7b\u522b\u6df7\u6dc6\u3002<\/li>\n<li>\u63a8\u7406\u901f\u5ea6\u6162&#xff1a;\u5bfc\u51fa TensorRT \u6216 ONNX \u5e76\u4f7f\u7528 FP16 \u63a8\u7406&#xff0c;\u901a\u5e38\u53ef\u83b7\u5f97\u6570\u500d\u52a0\u901f\u3002<\/li>\n<\/ul>\n<h3>\u4e5d\u3001\u5c0f\u7ed3<\/h3>\n<p>YOLOv5 \u7684\u4f7f\u7528\u53ef\u4ee5\u6982\u62ec\u4e3a\u4e00\u6761\u6e05\u6670\u7684\u6d41\u6c34\u7ebf&#xff1a;\u5b89\u88c5\u4f9d\u8d56\u5e76\u9a8c\u8bc1 GPU \u73af\u5883&#xff0c;\u7528 detect.py \u8dd1\u901a\u5b98\u65b9\u6743\u91cd\u5efa\u7acb\u4fe1\u5fc3&#xff0c;\u6309 YOLO \u683c\u5f0f\u6574\u7406\u81ea\u5b9a\u4e49\u6570\u636e\u96c6\u5e76\u7f16\u5199 yaml \u914d\u7f6e&#xff0c;\u52a0\u8f7d\u9884\u8bad\u7ec3\u6743\u91cd\u5f00\u59cb\u8bad\u7ec3&#xff0c;\u6700\u540e\u901a\u8fc7 val.py \u8bc4\u4f30\u3001export.py \u5bfc\u51fa\u90e8\u7f72\u3002\u638c\u63e1\u8fd9\u6761\u94fe\u8def\u540e&#xff0c;\u8fc1\u79fb\u5230\u5176\u4ed6\u68c0\u6d4b\u4efb\u52a1\u57fa\u672c\u53ea\u9700\u8981\u66ff\u6362\u6570\u636e\u96c6\u548c\u8c03\u6574\u8d85\u53c2\u6570\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001YOLOv5 \u7b80\u4ecb<br \/>\nYOLOv5 \u662f Ultralytics \u5f00\u6e90\u7684\u76ee\u6807\u68c0\u6d4b\u6846\u67b6&#xff0c;\u57fa\u4e8e PyTorch \u5b9e\u73b0\u3002\u5b83\u5e76\u4e0d\u662f YOLO \u7cfb\u5217\u7684\u7b2c\u4e94\u4e2a\u5b98\u65b9\u7248\u672c&#xff0c;\u800c\u662f\u7531 Ultralytics \u56e2\u961f\u5728 YOLOv3 \u57fa\u7840\u4e0a\u6301\u7eed\u8fed\u4ee3\u7684\u5de5\u7a0b\u5316\u5b9e\u73b0\u3002\u76f8\u6bd4\u65e9\u671f\u7248\u672c&#xff0c;YOLOv5 \u7684\u4f18\u52bf\u4e3b\u8981\u4f53\u73b0\u5728\u4e09\u70b9&#xff1a;<br \/>\n\u5de5\u7a0b\u5316\u5b8c\u5584&#xff1a;\u6570\u636e\u51c6\u5907\u3001\u8bad\u7ec3\u3001\u9a8c\u8bc1\u3001\u63a8\u7406\u3001\u5bfc\u51fa\u5168\u6d41\u7a0b\u811a\u672c\u9f50\u5907&#xff0c;\u5f00\u7bb1\u5373\u7528\u3002\u6027\u80fd\u5747\u8861&#xff1a;\u63d0\u4f9b n<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[156],"topic":[],"class_list":["post-120466","post","type-post","status-publish","format-standard","hentry","category-server","tag-yolo"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>YOLOv5 \u4f7f\u7528\u6307\u5357\uff1a\u4ece\u73af\u5883\u642d\u5efa\u5230\u63a8\u7406\u4e0e\u8bad\u7ec3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/120466.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"YOLOv5 \u4f7f\u7528\u6307\u5357\uff1a\u4ece\u73af\u5883\u642d\u5efa\u5230\u63a8\u7406\u4e0e\u8bad\u7ec3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4e00\u3001YOLOv5 \u7b80\u4ecb YOLOv5 \u662f Ultralytics \u5f00\u6e90\u7684\u76ee\u6807\u68c0\u6d4b\u6846\u67b6&#xff0c;\u57fa\u4e8e PyTorch \u5b9e\u73b0\u3002\u5b83\u5e76\u4e0d\u662f YOLO \u7cfb\u5217\u7684\u7b2c\u4e94\u4e2a\u5b98\u65b9\u7248\u672c&#xff0c;\u800c\u662f\u7531 Ultralytics \u56e2\u961f\u5728 YOLOv3 \u57fa\u7840\u4e0a\u6301\u7eed\u8fed\u4ee3\u7684\u5de5\u7a0b\u5316\u5b9e\u73b0\u3002\u76f8\u6bd4\u65e9\u671f\u7248\u672c&#xff0c;YOLOv5 \u7684\u4f18\u52bf\u4e3b\u8981\u4f53\u73b0\u5728\u4e09\u70b9&#xff1a; \u5de5\u7a0b\u5316\u5b8c\u5584&#xff1a;\u6570\u636e\u51c6\u5907\u3001\u8bad\u7ec3\u3001\u9a8c\u8bc1\u3001\u63a8\u7406\u3001\u5bfc\u51fa\u5168\u6d41\u7a0b\u811a\u672c\u9f50\u5907&#xff0c;\u5f00\u7bb1\u5373\u7528\u3002\u6027\u80fd\u5747\u8861&#xff1a;\u63d0\u4f9b n\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/120466.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-31T11:01:26+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/120466.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/120466.html\",\"name\":\"YOLOv5 \u4f7f\u7528\u6307\u5357\uff1a\u4ece\u73af\u5883\u642d\u5efa\u5230\u63a8\u7406\u4e0e\u8bad\u7ec3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-31T11:01:26+00:00\",\"dateModified\":\"2026-10-31T11:01:26+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/120466.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/120466.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/120466.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"YOLOv5 \u4f7f\u7528\u6307\u5357\uff1a\u4ece\u73af\u5883\u642d\u5efa\u5230\u63a8\u7406\u4e0e\u8bad\u7ec3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"YOLOv5 \u4f7f\u7528\u6307\u5357\uff1a\u4ece\u73af\u5883\u642d\u5efa\u5230\u63a8\u7406\u4e0e\u8bad\u7ec3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/120466.html","og_locale":"zh_CN","og_type":"article","og_title":"YOLOv5 \u4f7f\u7528\u6307\u5357\uff1a\u4ece\u73af\u5883\u642d\u5efa\u5230\u63a8\u7406\u4e0e\u8bad\u7ec3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4e00\u3001YOLOv5 \u7b80\u4ecb YOLOv5 \u662f Ultralytics \u5f00\u6e90\u7684\u76ee\u6807\u68c0\u6d4b\u6846\u67b6&#xff0c;\u57fa\u4e8e PyTorch \u5b9e\u73b0\u3002\u5b83\u5e76\u4e0d\u662f YOLO \u7cfb\u5217\u7684\u7b2c\u4e94\u4e2a\u5b98\u65b9\u7248\u672c&#xff0c;\u800c\u662f\u7531 Ultralytics \u56e2\u961f\u5728 YOLOv3 \u57fa\u7840\u4e0a\u6301\u7eed\u8fed\u4ee3\u7684\u5de5\u7a0b\u5316\u5b9e\u73b0\u3002\u76f8\u6bd4\u65e9\u671f\u7248\u672c&#xff0c;YOLOv5 \u7684\u4f18\u52bf\u4e3b\u8981\u4f53\u73b0\u5728\u4e09\u70b9&#xff1a; \u5de5\u7a0b\u5316\u5b8c\u5584&#xff1a;\u6570\u636e\u51c6\u5907\u3001\u8bad\u7ec3\u3001\u9a8c\u8bc1\u3001\u63a8\u7406\u3001\u5bfc\u51fa\u5168\u6d41\u7a0b\u811a\u672c\u9f50\u5907&#xff0c;\u5f00\u7bb1\u5373\u7528\u3002\u6027\u80fd\u5747\u8861&#xff1a;\u63d0\u4f9b n","og_url":"https:\/\/www.wsisp.com\/helps\/120466.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-31T11:01:26+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/120466.html","url":"https:\/\/www.wsisp.com\/helps\/120466.html","name":"YOLOv5 \u4f7f\u7528\u6307\u5357\uff1a\u4ece\u73af\u5883\u642d\u5efa\u5230\u63a8\u7406\u4e0e\u8bad\u7ec3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-31T11:01:26+00:00","dateModified":"2026-10-31T11:01:26+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/120466.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/120466.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/120466.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"YOLOv5 \u4f7f\u7528\u6307\u5357\uff1a\u4ece\u73af\u5883\u642d\u5efa\u5230\u63a8\u7406\u4e0e\u8bad\u7ec3"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/120466","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=120466"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/120466\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=120466"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=120466"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=120466"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=120466"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}