{"id":5536,"date":"2022-05-08T18:57:17","date_gmt":"2022-05-08T10:57:17","guid":{"rendered":"https:\/\/blog.iyatt.com\/?p=5536"},"modified":"2024-05-05T14:19:06","modified_gmt":"2024-05-05T06:19:06","slug":"%e8%bd%a6%e7%89%8c%e8%af%86%e5%88%ab%e5%ae%9a%e4%bd%8d","status":"publish","type":"post","link":"https:\/\/blog.iyatt.com\/?p=5536","title":{"rendered":"\u8f66\u724c\u8bc6\u522b &#8211; \u5b9a\u4f4d"},"content":{"rendered":"\n<p>\u53d1\u5e03\u4e8e\uff1a<a href=\"http:\/\/blog.iyatt.com\" target=\"_blank\" rel=\"noreferrer noopener\">blog.iyatt.com<\/a><\/p>\n\n\n\n<p>\u672c\u6587\u8d44\u6e90\u6587\u4ef6\u4e0b\u8f7d\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/pan.baidu.com\/s\/1pjQiroUfqpxJp4JEdcaaLg?pwd=oqcu\" target=\"_blank\">https:\/\/pan.baidu.com\/s\/1pjQiroUfqpxJp4JEdcaaLg?pwd=oqcu<\/a><\/p>\n\n\n\n<p>\u6d4b\u8bd5\u73af\u5883\uff08\u57fa\u7840\uff09\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Ubuntu 20.04 x86_64\nPython 3.9.10\njupyter 1.0.0\nopencv-python 4.5.5.64\ntorch 1.11.0<\/pre>\n\n\n\n<p>\u8f66\u724c\u8bc6\u522b\u7684\u7b2c\u4e00\u6b65\u5c31\u662f\u9700\u8981\u8f66\u724c\u5b9a\u4f4d\uff0c\u5728\u56fe\u50cf\u4e2d\u627e\u5230\u8f66\u724c\u7684\u4f4d\u7f6e\u3002\u521a\u5f00\u59cb\u6211\u5c1d\u8bd5\u8fc7\u7eaf\u89c6\u89c9\u5904\u7406\uff0c\u4f46\u662f\u73af\u5883\u53d8\u5316\u5bf9\u6548\u679c\u5f71\u54cd\u5f88\u5927\uff0c\u51c6\u786e\u5ea6\u592a\u4f4e\uff0c\u6ca1\u6cd5\u5b9e\u9645\u5e94\u7528\u3002\u540e\u9762\u4e86\u89e3\u5230 opencv \u63d0\u4f9b\u4e86\u8bad\u7ec3\u597d\u7684\u7ea7\u8054\u5206\u7c7b\u5668\u6a21\u578b\uff0c\u6211\u5c1d\u8bd5\u4e86\u4e00\u4e0b\uff0c\u6548\u679c\u4e0d\u592a\u597d\uff0c\u624d\u6ce8\u610f\u5230\u8fd9\u4e2a\u6a21\u578b\u662f\u9488\u5bf9\u4fc4\u7f57\u65af\u8f66\u724c\u7684\u3002\u6240\u4ee5\u6700\u540e\u51b3\u5b9a\u8fd8\u662f\u91c7\u7528\u4eba\u5de5\u795e\u7ecf\u7f51\u7edc\uff0c\u8fd9\u91cc\u6211\u4f7f\u7528\u7684\u662f <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/ultralytics\/yolov5\" target=\"_blank\">YOLOv5<\/a>\u3002<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong>YOLOv5 \u73af\u5883\u914d\u7f6e<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt update\nsudo apt install -y build-essential cmake pkg-config git\ncd ~\ngit clone https:\/\/github.com\/ultralytics\/yolov5.git --branch=v6.1 --depth=1  # YOLOv5 6.1\ncd yolov5\npip3 install -r requirements.txt<\/pre>\n\n\n\n<p class=\"has-text-align-center\"><strong>\u6570\u636e\u96c6<\/strong><\/p>\n\n\n\n<p>CCPD\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/detectRecog\/CCPD\" target=\"_blank\">https:\/\/github.com\/detectRecog\/CCPD<\/a><\/p>\n\n\n\n<p>CCPD(\u4e2d\u56fd\u57ce\u5e02\u505c\u8f66\u6570\u636e\u96c6\uff0cECCV)\u548cPDRC(\u8f66\u724c\u68c0\u6d4b\u4e0e\u8bc6\u522b\u6311\u6218)\u3002\u8fd9\u662f\u4e00\u4e2a\u7528\u4e8e\u8f66\u724c\u8bc6\u522b\u7684\u5927\u578b\u56fd\u5185\u7684\u6570\u636e\u96c6\uff0c\u7531\u4e2d\u79d1\u5927\u7684\u79d1\u7814\u4eba\u5458\u6784\u5efa\u51fa\u6765\u7684\u3002\u53d1\u8868\u5728ECCV2018\u8bba\u6587Towards End-to-End License Plate Detection and Recognition: A Large Dataset and Baseline\u3002<\/p>\n\n\n\n<p>\u8be5\u6570\u636e\u96c6\u5728\u5408\u80a5\u5e02\u7684\u505c\u8f66\u573a\u91c7\u96c6\u5f97\u6765\u7684\uff0c\u91c7\u96c6\u65f6\u95f4\u65e9\u4e0a7:30\u5230\u665a\u4e0a10:00.\u6d89\u53ca\u591a\u79cd\u590d\u6742\u73af\u5883\uff0c\u56fe\u7247\u5927\u5c0f\u4e3a 720x1160x3\u3002\u4e00\u5171\u5305\u542b9\u9879\u3002\u6bcf\u9879\u5360\u6bd4\u5982\u4e0b\uff1a<\/p>\n\n\n\n<p>CCPD 2019<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>CCPD-<\/strong><\/td><td>\u6570\u91cf\/\u5343<\/td><td>\u63cf\u8ff0<\/td><\/tr><tr><td>base<\/td><td>200<\/td><td>\u6b63\u5e38\u8f66\u724c<\/td><\/tr><tr><td>fn<\/td><td>20<\/td><td>\u62cd\u6444\u8ddd\u79bb\u76f8\u5f53\u8fd1\u6216\u8005\u76f8\u5f53\u539f<\/td><\/tr><tr><td>db<\/td><td>20<\/td><td>\u5149\u7ebf\u6697\u6216\u8005\u6bd4\u8f83\u4eae<\/td><\/tr><tr><td>rotate<\/td><td>10<\/td><td>\u6c34\u5e73\u503e\u659c 20\uff5e25 \u5ea6\uff0c\u5782\u76f4\u503e\u659c -10\uff5e10 \u5ea6<\/td><\/tr><tr><td>tilt<\/td><td>10<\/td><td>\u6c34\u5e73\u503e\u659c 15\uff5e45 \u5ea6\uff0c\u5782\u76f4\u503e\u659c 15\uff5e45 \u5ea6<\/td><\/tr><tr><td>weather<\/td><td>10<\/td><td>\u96e8\u5929\uff0c\u96ea\u5929\u6216\u96fe\u5929<\/td><\/tr><tr><td>blur<\/td><td>5<\/td><td>\u7531\u4e8e\u76f8\u673a\u6296\u52a8\u9020\u6210\u7684\u6a21\u7cca<\/td><\/tr><tr><td>challenge<\/td><td>10<\/td><td>\u6bd4\u8f83\u6709\u6311\u6218\u6027\u7684\u8f66\u724c<\/td><\/tr><tr><td>np<\/td><td>5<\/td><td>\u6ca1\u6709\u8f66\u724c\u7684<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u6570\u636e\u96c6\u4e2d\u6bcf\u5f20\u56fe\u7247\u7684\u547d\u540d\u662f\u6807\u6ce8\uff0c\u6bd4\u5982\uff1a<\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">01-1_3-263&amp;456_407&amp;514-407&amp;510_268&amp;514_263&amp;460_402&amp;456-0_0_10_23_32_28_33-166-2.jpg<\/mark><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>01 \u6211\u4e5f\u6ca1\u67e5\u660e\u767d\u8fd9\u662f\u4e2a\u5565<\/li><li>1_3 \u6c34\u5e73\u503e\u659c\u89d2 1 \u5ea6\uff0c\u5782\u76f4\u503e\u659c\u89d2 3 \u5ea6<\/li><li>263&amp;456_407&amp;514 \u8fb9\u754c\u6846\u5750\u6807\uff1a\u5de6\u4e0a(263,456)\uff0c\u53f3\u4e0b(407,514)<\/li><li>407&amp;510_268&amp;514_263&amp;460_402&amp;456 \u5bf9\u5e94\u56db\u4e2a\u89d2\u70b9\u53f3\u4e0b\u3001\u5de6\u4e0b\u3001\u5de6\u4e0a\u3001\u53f3\u4e0a<\/li><li>0_0_10_23_32_28_33 \u8f66\u724c\u53f7\uff0c\u6620\u5c04\u5173\u7cfb\u4e3a\uff1a<\/li><\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># \u7b2c\u4e00\u4f4d\nprovinces = [\"\u7696\", \"\u6caa\", \"\u6d25\", \"\u6e1d\", \"\u5180\", \"\u664b\", \"\u8499\", \"\u8fbd\", \"\u5409\", \"\u9ed1\", \"\u82cf\", \"\u6d59\", \"\u4eac\", \"\u95fd\", \"\u8d63\", \"\u9c81\", \"\u8c6b\", \"\u9102\", \"\u6e58\", \"\u7ca4\", \"\u6842\", \"\u743c\", \"\u5ddd\", \"\u8d35\", \"\u4e91\", \"\u85cf\", \"\u9655\", \"\u7518\", \"\u9752\", \"\u5b81\", \"\u65b0\", \"\u8b66\", \"\u5b66\", \"O\"]\n\nads = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'O']<\/pre>\n\n\n\n<p>166 \u4eae\u5ea6<\/p>\n\n\n\n<p>2 \u6a21\u7cca\u5ea6<\/p>\n\n\n\n<p>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<\/p>\n\n\n\n<p>\u6211\u8fd9\u91cc\u4f7f\u7528\u7684\u6570\u636e\u96c6\u662f\u5176\u4e2d\u7684 ccpd_base\uff08\u90fd\u662f\u84dd\u724c\uff0cCCPD 2020 \u4e2d\u662f\u7eff\u724c\uff09\uff0c 190k \u5f20\u7528\u4f5c\u8bad\u7ec3\u96c6\uff0c\u5269\u4f59\u7684\u7ea6 10k \u5f20\u7528\u4f5c\u9a8c\u8bc1\u96c6\u6d4b\u8bd5\u8c03\u6574\u53c2\u6570\u3002\u5df2\u6253\u5305\u4e3a ccpd_base.tar.bz2<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"168\" height=\"177\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/image-10.png\" alt=\"\" class=\"wp-image-5642 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 168px; --smush-placeholder-aspect-ratio: 168\/177;\" \/><\/figure>\n\n\n\n<p>CCPD \u6570\u636e\u96c6\u672c\u8eab\u7684\u6807\u6ce8\u548c YOLOv5 \u7684\u4e0d\u540c\uff0c\u5750\u6807\u548c\u957f\u5ea6\u90fd\u9700\u8981\u5f52\u4e00\u5316<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\u7c7b\u522b\u6807\u7b7e \u76ee\u6807\u4e2d\u5fc3x\u503c\/\u56fe\u50cf\u5bbd\u5ea6 \u76ee\u6807\u4e2d\u5fc3y\u503c\/\u56fe\u50cf\u9ad8\u5ea6 \u76ee\u6807\u5bbd\u5ea6\/\u56fe\u50cf\u5bbd\u5ea6 \u76ee\u6807\u9ad8\u5ea6\/\u56fe\u50cf\u9ad8\u5ea6<\/pre>\n\n\n\n<p>\u6211\u5199\u4e86\u4e00\u4e2a\u811a\u672c\uff0c\u53ef\u4ee5\u8fd0\u884c <strong>YOLO \u6807\u7b7e\u751f\u6210.py<\/strong> \u5f97\u5230 YOLOv5 \u8981\u6c42\u7684\u6807\u7b7e<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"663\" height=\"379\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/2022-05-08-18-49-24-\u7684\u5c4f\u5e55\u622a\u56fe.png\" alt=\"\" class=\"wp-image-5688 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/2022-05-08-18-49-24-\u7684\u5c4f\u5e55\u622a\u56fe.png 663w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/2022-05-08-18-49-24-\u7684\u5c4f\u5e55\u622a\u56fe-300x171.png 300w\" data-sizes=\"(max-width: 663px) 100vw, 663px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 663px; --smush-placeholder-aspect-ratio: 663\/379;\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center\"><strong>\u914d\u7f6e\u6587\u4ef6<\/strong><\/p>\n\n\n\n<p>\u521b\u5efa\u6587\u4ef6 <strong>data.yaml<\/strong>\uff0c\u5199\u5165\u6570\u636e\u96c6\u8def\u5f84\uff08\u76f8\u5bf9 train.py \u7684\u8def\u5f84\uff09\u548c\u76ee\u6807\u6807\u7b7e\u7c7b\u522b<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">train: ..\/ccpd_base\/images\/train\nval: ..\/ccpd_base\/images\/val\n\nnc: 1  # \u8981\u8bc6\u522b\u7684\u76ee\u6807\u79cd\u7c7b\u6570\nnames: ['license-plate']  # \u8981\u8bc6\u522b\u7684\u76ee\u6807\u540d<\/pre>\n\n\n\n<p class=\"has-text-align-center\"><strong>\u8bad\u7ec3<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>&#8211;batch \u6307\u5b9a\u4e00\u6b21\u5904\u7406\u7684\u6570\u636e\u91cf\uff0c\u6839\u636e\u663e\u5b58\u5927\u5c0f\u800c\u5b9a\u3002\u53ef\u4ee5\u81ea\u884c\u5c1d\u8bd5\uff0c\u5982\u679c\u663e\u5b58\u4e0d\u591f\u4f1a\u62a5\u9519\u7684\uff08AttributeError: &#8216;NoneType&#8217; object has no attribute &#8216;_free_weak_ref&#8217;\uff09\u3002<\/li><li>&#8211;epoch \u8bad\u7ec3\u591a\u5c11\u6b21<\/li><li>&#8211;data \u6307\u5b9a\u914d\u7f6e\u6587\u4ef6\u8def\u5f84<\/li><li>&#8211;weights \u6307\u5b9a\u4f7f\u7528\u7684<a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/ultralytics\/yolov5\/releases\" data-type=\"URL\" data-id=\"https:\/\/github.com\/ultralytics\/yolov5\/releases\" target=\"_blank\">\u9884\u8bad\u7ec3\u6743\u91cd\u6587\u4ef6<\/a>\uff08\u53ef\u4ee5\u81ea\u52a8\u5728\u7ebf\u4e0b\u8f7d\u6700\u65b0\u7684\uff09<\/li><\/ul>\n\n\n\n<p>n\u3001s\u3001m\u3001l\u3001x \u987a\u5e8f\u7cbe\u786e\u5ea6\u8d8a\u6765\u8d8a\u9ad8\uff0c\u4f46\u662f\u8ba1\u7b97\u91cf\u8d8a\u6765\u8d8a\u5927\uff0c\u5219\u901f\u5ea6\u8d8a\u6765\u8d8a\u6162\uff0c\u9700\u8981\u6839\u636e\u81ea\u5df1\u7684\u5e94\u7528\u573a\u666f\u8fdb\u884c\u9009\u62e9\u3002\u6211\u8fd9\u91cc\u662f\u8981\u5728\u5c0f\u578b\u8ba1\u7b97\u673a\u677f\u4e0a\u90e8\u7f72\uff0c\u56e0\u6b64\u8ba1\u7b97\u91cf\u662f\u9996\u8981\u8003\u8651\u7684\uff0c\u6240\u4ee5\u9009\u62e9\u8ba1\u7b97\u91cf\u6700\u5c0f\u7684 n \u6a21\uff08YOLOv5n.pt\uff09\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/image-7.png\" alt=\"\u6b64\u56fe\u7247\u7684alt\u5c5e\u6027\u4e3a\u7a7a\uff1b\u6587\u4ef6\u540d\u4e3aimage-7.png\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 808px; --smush-placeholder-aspect-ratio: 808\/813;\" \/><\/figure>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">python3 yolov5\/train.py --img 640 --batch 8 --epoch 3 --data data.yaml --weights yolov5n.pt<\/pre>\n\n\n\n<p>190k \u5f20\u56fe\u7247\uff0c\u8bad\u7ec3\u8fd8\u662f\u5f88\u8017\u65f6\u7684\uff0c\u5728\u6211\u7b14\u8bb0\u672c\u4e0a\u8dd1\u4e86\u4e00\u5929\u65f6\u95f4\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"674\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/image-11-1024x674.png\" alt=\"\" class=\"wp-image-5646 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/image-11-1024x674.png 1024w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/image-11-300x197.png 300w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/image-11-768x506.png 768w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/image-11.png 1498w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/674;\" \/><\/figure>\n\n\n\n<p>\u8bad\u7ec3\u751f\u6210\u7684\u6587\u4ef6\u5728 <strong>yolov5\/runs\/train<\/strong> \u76ee\u5f55\u4e0b<\/p>\n\n\n\n<p>\u4e0b\u9762\u662f\u8bad\u7ec3\u96c6\u4e2d\u7684\u90e8\u5206\u56fe\u6807\u6ce8<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"1024\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/train_batch0-1024x1024.jpg\" alt=\"\" class=\"wp-image-5610 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/train_batch0-1024x1024.jpg 1024w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/train_batch0-300x300.jpg 300w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/train_batch0-150x150.jpg 150w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/train_batch0-768x768.jpg 768w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/train_batch0-1536x1536.jpg 1536w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/train_batch0.jpg 1920w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/1024;\" \/><\/figure>\n\n\n\n<p>\u5b8c\u6210\u8bad\u7ec3\u540e\uff0c\u4f1a\u7528\u9a8c\u8bc1\u96c6\u4e2d\u7684\u56fe\u7247\u8fdb\u884c\u6d4b\u8bd5\u5e76\u8c03\u6574\u53c2\u6570<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"612\" height=\"1017\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/2022-05-07-23-22-26-\u7684\u5c4f\u5e55\u622a\u56fe.png\" alt=\"\" class=\"wp-image-5658 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/2022-05-07-23-22-26-\u7684\u5c4f\u5e55\u622a\u56fe.png 612w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/2022-05-07-23-22-26-\u7684\u5c4f\u5e55\u622a\u56fe-181x300.png 181w\" data-sizes=\"(max-width: 612px) 100vw, 612px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 612px; --smush-placeholder-aspect-ratio: 612\/1017;\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center\"><strong>\u8f66\u724c\u5b9a\u4f4d<\/strong><\/p>\n\n\n\n<p>\u524d\u9762\u8bad\u7ec3\u5f97\u5230\u7684\u6743\u91cd\u6587\u4ef6\u5728 weights \u76ee\u5f55\u4e2d\uff0c\u4e00\u4e2a\u662f best.pt\uff0c \u53e6\u5916\u4e00\u4e2a\u662f last.pt\uff0c\u5e94\u8be5\u662f\u6307\u6548\u679c\u6700\u597d\u7684\u7684\u6a21\u578b\u548c\u6700\u65b0\u7684\u6a21\u578b\uff0c\u6211\u90fd\u7edf\u4e00\u7528 best.pt\u3002<\/p>\n\n\n\n<p>\u901a\u8fc7 YOLOv5 \u63d0\u4f9b\u7684 detect.py \u811a\u672c\u5c31\u53ef\u4ee5\u4f7f\u7528\u6a21\u578b\u8fdb\u884c\u9884\u6d4b<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># --weights \u6307\u5b9a\u6743\u91cd\u6587\u4ef6\u8def\u5f84\n# --source \u6307\u5b9a\u56fe\u7247\u6216\u8005\u89c6\u9891\u8def\u5f84\n# \u7ed3\u679c\u53ef\u4ee5\u5728 yolov5\/runs\/detect \u67e5\u770b\n\npython3 yolov5\/detect.py  --weights yolov5\/runs\/train\/exp\/weights\/best.pt --source 'ccpd_base\/images\/val\/0445977011495-90_90-100&amp;339_515&amp;479-510&amp;463_122&amp;469_124&amp;350_512&amp;344-0_0_4_15_32_29_32-50-19.jpg'<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"612\" height=\"1017\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/2022-05-07-23-26-16-\u7684\u5c4f\u5e55\u622a\u56fe.png\" alt=\"\" class=\"wp-image-5660 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/2022-05-07-23-26-16-\u7684\u5c4f\u5e55\u622a\u56fe.png 612w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/2022-05-07-23-26-16-\u7684\u5c4f\u5e55\u622a\u56fe-181x300.png 181w\" data-sizes=\"(max-width: 612px) 100vw, 612px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 612px; --smush-placeholder-aspect-ratio: 612\/1017;\" \/><\/figure>\n\n\n\n<p>detect.py \u53ef\u4ee5\u9884\u6d4b\u56fe\u50cf\u4e0a\u7684\u8f66\u724c\u5e76\u6807\u6ce8\u51fa\u6765\uff0c\u5e76\u4fdd\u5b58\u4e3a\u56fe\u7247\u3002\u4f46\u662f\u8fd9\u4e0d\u6ee1\u8db3\u8f66\u724c\u5b9a\u4f4d\u7684\u8981\u6c42\uff0c\u8f66\u724c\u5b9a\u4f4d\u662f\u8981\u63d0\u53d6\u4ec5\u542b\u8f66\u724c\u7684\u56fe\u50cf\u6570\u636e\uff0c\u6240\u4ee5\u8fd8\u662f\u5f97\u81ea\u5df1\u5199\u4ee3\u7801\u3002\u8fd0\u884c <strong>\u8f66\u724c\u5b9a\u4f4d.ipynb<\/strong> \u7b14\u8bb0\u672c\u53ef\u4ee5\u770b\u6548\u679c\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"912\" height=\"862\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/image-12.png\" alt=\"\" class=\"wp-image-5679 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/image-12.png 912w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/image-12-300x284.png 300w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/image-12-768x726.png 768w\" data-sizes=\"(max-width: 912px) 100vw, 912px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 912px; --smush-placeholder-aspect-ratio: 912\/862;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"413\" height=\"342\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/image-13.png\" alt=\"\" class=\"wp-image-5680 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/image-13.png 413w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/image-13-300x248.png 300w\" data-sizes=\"(max-width: 413px) 100vw, 413px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 413px; --smush-placeholder-aspect-ratio: 413\/342;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"420\" height=\"345\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/image-14.png\" alt=\"\" class=\"wp-image-5681 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/image-14.png 420w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/05\/image-14-300x246.png 300w\" data-sizes=\"(max-width: 420px) 100vw, 420px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 420px; --smush-placeholder-aspect-ratio: 420\/345;\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u53d1\u5e03\u4e8e\uff1ablog.iyatt.com \u672c\u6587\u8d44\u6e90\u6587\u4ef6\u4e0b\u8f7d\uff1ahttps:\/\/pan.baidu.com\/s\/1pj [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"zakra_page_container_layout":"customizer","zakra_page_sidebar_layout":"customizer","zakra_remove_content_margin":false,"zakra_sidebar":"customizer","zakra_transparent_header":"customizer","zakra_logo":0,"zakra_main_header_style":"default","zakra_menu_item_color":"","zakra_menu_item_hover_color":"","zakra_menu_item_active_color":"","zakra_menu_active_style":"","zakra_page_header":true,"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-5536","post","type-post","status-publish","format-standard","hentry","category-all"],"modified_by":"IYATT-yx","_links":{"self":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts\/5536","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5536"}],"version-history":[{"count":0,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts\/5536\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5536"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5536"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}