{"id":1082223,"date":"2025-01-08T12:46:47","date_gmt":"2025-01-08T04:46:47","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1082223.html"},"modified":"2025-01-08T12:46:50","modified_gmt":"2025-01-08T04:46:50","slug":"%e5%a6%82%e4%bd%95%e7%94%a8%e5%9b%be%e5%83%8f%e5%a4%84%e7%90%86%e8%bf%9b%e8%a1%8c%e7%9b%ae%e6%a0%87%e6%a3%80%e6%b5%8bpython-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1082223.html","title":{"rendered":"\u5982\u4f55\u7528\u56fe\u50cf\u5904\u7406\u8fdb\u884c\u76ee\u6807\u68c0\u6d4bpython"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24183842\/71825003-6d37-44f7-9a2d-fb211df6e647.webp\" alt=\"\u5982\u4f55\u7528\u56fe\u50cf\u5904\u7406\u8fdb\u884c\u76ee\u6807\u68c0\u6d4bpython\" \/><\/p>\n<p><p> <strong>\u5982\u4f55\u7528\u56fe\u50cf\u5904\u7406\u8fdb\u884c\u76ee\u6807\u68c0\u6d4bPython<\/strong><\/p>\n<\/p>\n<p><p><strong>\u4f7f\u7528\u56fe\u50cf\u5904\u7406\u8fdb\u884c\u76ee\u6807\u68c0\u6d4b\u7684\u6838\u5fc3\u6b65\u9aa4\u5305\u62ec\u56fe\u50cf\u9884\u5904\u7406\u3001\u7279\u5f81\u63d0\u53d6\u3001\u76ee\u6807\u8bc6\u522b\u3001\u540e\u5904\u7406<\/strong>\u3002\u5176\u4e2d\uff0c\u56fe\u50cf\u9884\u5904\u7406\u53ef\u4ee5\u63d0\u9ad8\u56fe\u50cf\u8d28\u91cf\u3001\u7279\u5f81\u63d0\u53d6\u7528\u4e8e\u8bc6\u522b\u56fe\u50cf\u4e2d\u7684\u76ee\u6807\u7279\u5f81\u3001\u76ee\u6807\u8bc6\u522b\u901a\u8fc7<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u6216\u6df1\u5ea6\u5b66\u4e60\u7b97\u6cd5\u8fdb\u884c\u5206\u7c7b\u3001\u540e\u5904\u7406\u5219\u7528\u4e8e\u63d0\u9ad8\u68c0\u6d4b\u7cbe\u5ea6\u3002\u4e0b\u9762\u6211\u4eec\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u56fe\u50cf\u9884\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u56fe\u50cf\u9884\u5904\u7406\u662f\u56fe\u50cf\u5904\u7406\u7684\u57fa\u7840\u6b65\u9aa4\uff0c\u76ee\u7684\u662f\u63d0\u9ad8\u56fe\u50cf\u8d28\u91cf\uff0c\u4e3a\u540e\u7eed\u7684\u7279\u5f81\u63d0\u53d6\u548c\u76ee\u6807\u8bc6\u522b\u505a\u597d\u51c6\u5907\u3002\u5e38\u89c1\u7684\u56fe\u50cf\u9884\u5904\u7406\u64cd\u4f5c\u5305\u62ec\u7070\u5ea6\u5316\u3001\u53bb\u566a\u3001\u4e8c\u503c\u5316\u3001\u56fe\u50cf\u589e\u5f3a\u7b49\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u7070\u5ea6\u5316<\/strong><\/li>\n<\/ol>\n<p><p>\u7070\u5ea6\u5316\u662f\u5c06\u5f69\u8272\u56fe\u50cf\u8f6c\u6362\u4e3a\u7070\u5ea6\u56fe\u50cf\uff0c\u51cf\u5c11\u6570\u636e\u91cf\uff0c\u964d\u4f4e\u8ba1\u7b97\u590d\u6742\u5ea6\u3002\u5728OpenCV\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>cvtColor<\/code>\u51fd\u6570\u5c06\u5f69\u8272\u56fe\u50cf\u8f6c\u6362\u4e3a\u7070\u5ea6\u56fe\u50cf\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import cv2<\/p>\n<h2><strong>\u8bfb\u53d6\u56fe\u50cf<\/strong><\/h2>\n<p>image = cv2.imread(&#39;image.jpg&#39;)<\/p>\n<h2><strong>\u5c06\u56fe\u50cf\u8f6c\u6362\u4e3a\u7070\u5ea6\u56fe\u50cf<\/strong><\/h2>\n<p>gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u53bb\u566a<\/strong><\/li>\n<\/ol>\n<p><p>\u53bb\u566a\u662f\u6d88\u9664\u56fe\u50cf\u4e2d\u7684\u566a\u58f0\uff0c\u63d0\u9ad8\u56fe\u50cf\u8d28\u91cf\u3002\u5e38\u89c1\u7684\u53bb\u566a\u65b9\u6cd5\u6709\u5747\u503c\u6ee4\u6ce2\u3001\u9ad8\u65af\u6ee4\u6ce2\u3001\u4e2d\u503c\u6ee4\u6ce2\u7b49\u3002\u5728OpenCV\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>GaussianBlur<\/code>\u51fd\u6570\u8fdb\u884c\u9ad8\u65af\u6ee4\u6ce2\u53bb\u566a\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u9ad8\u65af\u6ee4\u6ce2\u53bb\u566a<\/p>\n<p>blurred_image = cv2.GaussianBlur(gray_image, (5, 5), 0)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"3\">\n<li><strong>\u4e8c\u503c\u5316<\/strong><\/li>\n<\/ol>\n<p><p>\u4e8c\u503c\u5316\u662f\u5c06\u56fe\u50cf\u8f6c\u6362\u4e3a\u9ed1\u767d\u56fe\u50cf\uff0c\u4fbf\u4e8e\u540e\u7eed\u7684\u76ee\u6807\u68c0\u6d4b\u3002\u5728OpenCV\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>threshold<\/code>\u51fd\u6570\u8fdb\u884c\u4e8c\u503c\u5316\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u4e8c\u503c\u5316<\/p>\n<p>_, binary_image = cv2.threshold(blurred_image, 127, 255, cv2.THRESH_BINARY)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u7279\u5f81\u63d0\u53d6<\/h3>\n<\/p>\n<p><p>\u7279\u5f81\u63d0\u53d6\u662f\u4ece\u56fe\u50cf\u4e2d\u63d0\u53d6\u76ee\u6807\u7684\u7279\u5f81\uff0c\u7528\u4e8e\u76ee\u6807\u8bc6\u522b\u3002\u5e38\u7528\u7684\u7279\u5f81\u63d0\u53d6\u65b9\u6cd5\u6709\u8fb9\u7f18\u68c0\u6d4b\u3001\u89d2\u70b9\u68c0\u6d4b\u3001\u5c3a\u5ea6\u4e0d\u53d8\u7279\u5f81\u53d8\u6362\uff08SIFT\uff09\u3001\u52a0\u901f\u9c81\u68d2\u7279\u5f81\uff08SURF\uff09\u7b49\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u8fb9\u7f18\u68c0\u6d4b<\/strong><\/li>\n<\/ol>\n<p><p>\u8fb9\u7f18\u68c0\u6d4b\u662f\u63d0\u53d6\u56fe\u50cf\u4e2d\u7684\u8fb9\u7f18\u7279\u5f81\uff0c\u5e38\u7528\u7684\u8fb9\u7f18\u68c0\u6d4b\u7b97\u6cd5\u6709Canny\u8fb9\u7f18\u68c0\u6d4b\u3002\u5728OpenCV\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>Canny<\/code>\u51fd\u6570\u8fdb\u884c\u8fb9\u7f18\u68c0\u6d4b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># Canny\u8fb9\u7f18\u68c0\u6d4b<\/p>\n<p>edges = cv2.Canny(binary_image, 100, 200)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u89d2\u70b9\u68c0\u6d4b<\/strong><\/li>\n<\/ol>\n<p><p>\u89d2\u70b9\u68c0\u6d4b\u662f\u63d0\u53d6\u56fe\u50cf\u4e2d\u7684\u89d2\u70b9\u7279\u5f81\uff0c\u5e38\u7528\u7684\u89d2\u70b9\u68c0\u6d4b\u7b97\u6cd5\u6709Harris\u89d2\u70b9\u68c0\u6d4b\u3002\u5728OpenCV\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>cornerHarris<\/code>\u51fd\u6570\u8fdb\u884c\u89d2\u70b9\u68c0\u6d4b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># Harris\u89d2\u70b9\u68c0\u6d4b<\/p>\n<p>corners = cv2.cornerHarris(binary_image, 2, 3, 0.04)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u76ee\u6807\u8bc6\u522b<\/h3>\n<\/p>\n<p><p>\u76ee\u6807\u8bc6\u522b\u662f\u5229\u7528\u673a\u5668\u5b66\u4e60\u6216\u6df1\u5ea6\u5b66\u4e60\u7b97\u6cd5\u5bf9\u63d0\u53d6\u7684\u7279\u5f81\u8fdb\u884c\u5206\u7c7b\uff0c\u4ece\u800c\u8bc6\u522b\u56fe\u50cf\u4e2d\u7684\u76ee\u6807\u3002\u5e38\u7528\u7684\u76ee\u6807\u8bc6\u522b\u7b97\u6cd5\u6709\u652f\u6301\u5411\u91cf\u673a\uff08SVM\uff09\u3001\u968f\u673a\u68ee\u6797\u3001\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\uff08CNN\uff09\u7b49\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u652f\u6301\u5411\u91cf\u673a\uff08SVM\uff09<\/strong><\/li>\n<\/ol>\n<p><p>\u652f\u6301\u5411\u91cf\u673a\u662f\u4e00\u79cd\u5e38\u7528\u7684\u5206\u7c7b\u7b97\u6cd5\uff0c\u9002\u7528\u4e8e\u5c0f\u89c4\u6a21\u6570\u636e\u96c6\u7684\u76ee\u6807\u8bc6\u522b\u3002\u5728scikit-learn\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>SVM<\/code>\u8fdb\u884c\u76ee\u6807\u8bc6\u522b\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from sklearn import svm<\/p>\n<h2><strong>\u521b\u5efaSVM\u6a21\u578b<\/strong><\/h2>\n<p>clf = svm.SVC()<\/p>\n<h2><strong>\u8bad\u7ec3\u6a21\u578b<\/strong><\/h2>\n<p>clf.fit(X_tr<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n, y_train)<\/p>\n<h2><strong>\u9884\u6d4b<\/strong><\/h2>\n<p>y_pred = clf.predict(X_test)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\uff08CNN\uff09<\/strong><\/li>\n<\/ol>\n<p><p>\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\u662f\u4e00\u79cd\u6df1\u5ea6\u5b66\u4e60\u7b97\u6cd5\uff0c\u9002\u7528\u4e8e\u5927\u89c4\u6a21\u6570\u636e\u96c6\u7684\u76ee\u6807\u8bc6\u522b\u3002\u5728Keras\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>Sequential<\/code>\u6a21\u578b\u521b\u5efa\u548c\u8bad\u7ec3\u5377\u79ef\u795e\u7ecf\u7f51\u7edc\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from keras.models import Sequential<\/p>\n<p>from keras.layers import Conv2D, MaxPooling2D, Flatten, Dense<\/p>\n<h2><strong>\u521b\u5efa\u6a21\u578b<\/strong><\/h2>\n<p>model = Sequential()<\/p>\n<h2><strong>\u6dfb\u52a0\u5377\u79ef\u5c42<\/strong><\/h2>\n<p>model.add(Conv2D(32, (3, 3), activation=&#39;relu&#39;, input_shape=(64, 64, 3)))<\/p>\n<h2><strong>\u6dfb\u52a0\u6c60\u5316\u5c42<\/strong><\/h2>\n<p>model.add(MaxPooling2D(pool_size=(2, 2)))<\/p>\n<h2><strong>\u6dfb\u52a0\u5c55\u5e73\u5c42<\/strong><\/h2>\n<p>model.add(Flatten())<\/p>\n<h2><strong>\u6dfb\u52a0\u5168\u8fde\u63a5\u5c42<\/strong><\/h2>\n<p>model.add(Dense(units=128, activation=&#39;relu&#39;))<\/p>\n<h2><strong>\u6dfb\u52a0\u8f93\u51fa\u5c42<\/strong><\/h2>\n<p>model.add(Dense(units=1, activation=&#39;sigmoid&#39;))<\/p>\n<h2><strong>\u7f16\u8bd1\u6a21\u578b<\/strong><\/h2>\n<p>model.compile(optimizer=&#39;adam&#39;, loss=&#39;binary_crossentropy&#39;, metrics=[&#39;accuracy&#39;])<\/p>\n<h2><strong>\u8bad\u7ec3\u6a21\u578b<\/strong><\/h2>\n<p>model.fit(X_train, y_train, epochs=25, batch_size=32)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u540e\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u540e\u5904\u7406\u662f\u63d0\u9ad8\u76ee\u6807\u68c0\u6d4b\u7cbe\u5ea6\u7684\u91cd\u8981\u6b65\u9aa4\uff0c\u5e38\u89c1\u7684\u540e\u5904\u7406\u65b9\u6cd5\u5305\u62ec\u975e\u6781\u5927\u503c\u6291\u5236\uff08NMS\uff09\u3001\u7f6e\u4fe1\u5ea6\u9608\u503c\u8fc7\u6ee4\u7b49\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u975e\u6781\u5927\u503c\u6291\u5236\uff08NMS\uff09<\/strong><\/li>\n<\/ol>\n<p><p>\u975e\u6781\u5927\u503c\u6291\u5236\u662f\u6d88\u9664\u91cd\u53e0\u6846\uff0c\u4fdd\u7559\u7f6e\u4fe1\u5ea6\u6700\u9ad8\u7684\u6846\u3002\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u81ea\u5b9a\u4e49\u51fd\u6570\u5b9e\u73b0\u975e\u6781\u5927\u503c\u6291\u5236\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>def non_max_suppression(boxes, scores, iou_threshold):<\/p>\n<p>    indices = np.argsort(scores)[::-1]<\/p>\n<p>    keep = []<\/p>\n<p>    while len(indices) &gt; 0:<\/p>\n<p>        current = indices[0]<\/p>\n<p>        keep.append(current)<\/p>\n<p>        indices = indices[1:]<\/p>\n<p>        rest_indices = []<\/p>\n<p>        for i in indices:<\/p>\n<p>            iou = compute_iou(boxes[current], boxes[i])<\/p>\n<p>            if iou &lt; iou_threshold:<\/p>\n<p>                rest_indices.append(i)<\/p>\n<p>        indices = rest_indices<\/p>\n<p>    return keep<\/p>\n<p>def compute_iou(box1, box2):<\/p>\n<p>    x1, y1, x2, y2 = box1<\/p>\n<p>    x1_, y1_, x2_, y2_ = box2<\/p>\n<p>    inter_x1 = max(x1, x1_)<\/p>\n<p>    inter_y1 = max(y1, y1_)<\/p>\n<p>    inter_x2 = min(x2, x2_)<\/p>\n<p>    inter_y2 = min(y2, y2_)<\/p>\n<p>    inter_area = max(0, inter_x2 - inter_x1 + 1) * max(0, inter_y2 - inter_y1 + 1)<\/p>\n<p>    box1_area = (x2 - x1 + 1) * (y2 - y1 + 1)<\/p>\n<p>    box2_area = (x2_ - x1_ + 1) * (y2_ - y1_ + 1)<\/p>\n<p>    iou = inter_area \/ float(box1_area + box2_area - inter_area)<\/p>\n<p>    return iou<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u7f6e\u4fe1\u5ea6\u9608\u503c\u8fc7\u6ee4<\/strong><\/li>\n<\/ol>\n<p><p>\u7f6e\u4fe1\u5ea6\u9608\u503c\u8fc7\u6ee4\u662f\u6839\u636e\u7f6e\u4fe1\u5ea6\u9608\u503c\u8fc7\u6ee4\u6389\u4f4e\u7f6e\u4fe1\u5ea6\u7684\u68c0\u6d4b\u6846\u3002\u5728\u76ee\u6807\u68c0\u6d4b\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u7f6e\u4fe1\u5ea6\u9608\u503c\u6765\u63d0\u9ad8\u68c0\u6d4b\u7cbe\u5ea6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\"># \u7f6e\u4fe1\u5ea6\u9608\u503c\u8fc7\u6ee4<\/p>\n<p>confidence_threshold = 0.5<\/p>\n<p>filtered_boxes = [box for box, score in zip(boxes, scores) if score &gt; confidence_threshold]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u7efc\u4e0a\u6240\u8ff0<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528\u56fe\u50cf\u5904\u7406\u8fdb\u884c\u76ee\u6807\u68c0\u6d4b\u4e3b\u8981\u5305\u62ec\u56fe\u50cf\u9884\u5904\u7406\u3001\u7279\u5f81\u63d0\u53d6\u3001\u76ee\u6807\u8bc6\u522b\u3001\u540e\u5904\u7406\u7b49\u6b65\u9aa4\u3002\u901a\u8fc7\u5bf9\u56fe\u50cf\u8fdb\u884c\u9884\u5904\u7406\uff0c\u63d0\u9ad8\u56fe\u50cf\u8d28\u91cf\uff0c\u63d0\u53d6\u76ee\u6807\u7279\u5f81\uff0c\u5229\u7528\u673a\u5668\u5b66\u4e60\u6216\u6df1\u5ea6\u5b66\u4e60\u7b97\u6cd5\u8fdb\u884c\u76ee\u6807\u8bc6\u522b\uff0c\u5e76\u901a\u8fc7\u540e\u5904\u7406\u63d0\u9ad8\u68c0\u6d4b\u7cbe\u5ea6\uff0c\u53ef\u4ee5\u5b9e\u73b0\u9ad8\u6548\u7684\u76ee\u6807\u68c0\u6d4b\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u7b97\u6cd5\u548c\u53c2\u6570\uff0c\u8fdb\u4e00\u6b65\u63d0\u9ad8\u76ee\u6807\u68c0\u6d4b\u7684\u6027\u80fd\u548c\u7cbe\u5ea6\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u9009\u62e9\u9002\u5408\u7684\u56fe\u50cf\u5904\u7406\u5e93\u8fdb\u884c\u76ee\u6807\u68c0\u6d4b\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u6709\u51e0\u4e2a\u6d41\u884c\u7684\u56fe\u50cf\u5904\u7406\u5e93\u53ef\u4ee5\u7528\u4e8e\u76ee\u6807\u68c0\u6d4b\uff0c\u5305\u62ecOpenCV\u3001TensorFlow\u3001PyTorch\u548cYOLO\u7b49\u3002\u9009\u62e9\u9002\u5408\u7684\u5e93\u9700\u8981\u8003\u8651\u9879\u76ee\u7684\u9700\u6c42\u3001\u6a21\u578b\u7684\u590d\u6742\u6027\u4ee5\u53ca\u4e2a\u4eba\u7684\u7f16\u7a0b\u7ecf\u9a8c\u3002OpenCV\u9002\u5408\u7b80\u5355\u7684\u5b9e\u65f6\u5904\u7406\uff0c\u800cTensorFlow\u548cPyTorch\u5219\u66f4\u9002\u5408\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b\u7684\u8bad\u7ec3\u548c\u90e8\u7f72\u3002<\/p>\n<p><strong>\u76ee\u6807\u68c0\u6d4b\u7684\u57fa\u672c\u6b65\u9aa4\u662f\u4ec0\u4e48\uff1f<\/strong><br \/>\u8fdb\u884c\u76ee\u6807\u68c0\u6d4b\u901a\u5e38\u5305\u62ec\u6570\u636e\u51c6\u5907\u3001\u6a21\u578b\u9009\u62e9\u3001\u8bad\u7ec3\u3001\u8bc4\u4f30\u548c\u90e8\u7f72\u7b49\u51e0\u4e2a\u6b65\u9aa4\u3002\u9996\u5148\uff0c\u9700\u8981\u6536\u96c6\u548c\u6807\u6ce8\u6570\u636e\u96c6\uff0c\u7136\u540e\u9009\u62e9\u5408\u9002\u7684\u7b97\u6cd5\u548c\u6a21\u578b\u8fdb\u884c\u8bad\u7ec3\u3002\u63a5\u4e0b\u6765\uff0c\u4f7f\u7528\u6d4b\u8bd5\u6570\u636e\u8bc4\u4f30\u6a21\u578b\u7684\u6027\u80fd\uff0c\u5e76\u6839\u636e\u7ed3\u679c\u8fdb\u884c\u8c03\u6574\u3002\u6700\u540e\uff0c\u5c06\u8bad\u7ec3\u597d\u7684\u6a21\u578b\u90e8\u7f72\u5230\u5b9e\u9645\u5e94\u7528\u4e2d\u3002<\/p>\n<p><strong>\u5982\u4f55\u63d0\u9ad8\u76ee\u6807\u68c0\u6d4b\u6a21\u578b\u7684\u51c6\u786e\u6027\uff1f<\/strong><br \/>\u63d0\u9ad8\u76ee\u6807\u68c0\u6d4b\u6a21\u578b\u51c6\u786e\u6027\u7684\u65b9\u6cd5\u6709\u5f88\u591a\u3002\u53ef\u4ee5\u901a\u8fc7\u6570\u636e\u589e\u5f3a\u6280\u672f\u589e\u52a0\u8bad\u7ec3\u6570\u636e\u7684\u591a\u6837\u6027\uff0c\u6bd4\u5982\u65cb\u8f6c\u3001\u7f29\u653e\u548c\u7ffb\u8f6c\u56fe\u50cf\u3002\u6b64\u5916\uff0c\u9009\u62e9\u5408\u9002\u7684\u635f\u5931\u51fd\u6570\u3001\u8c03\u6574\u5b66\u4e60\u7387\u4ee5\u53ca\u4f7f\u7528\u9884\u8bad\u7ec3\u6a21\u578b\u8fdb\u884c\u5fae\u8c03\u4e5f\u80fd\u663e\u8457\u63d0\u9ad8\u6a21\u578b\u7684\u6027\u80fd\u3002\u6301\u7eed\u76d1\u63a7\u548c\u8c03\u6574\u6a21\u578b\u7684\u53c2\u6570\u540c\u6837\u91cd\u8981\uff0c\u4ee5\u786e\u4fdd\u6700\u4f73\u7684\u68c0\u6d4b\u6548\u679c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5982\u4f55\u7528\u56fe\u50cf\u5904\u7406\u8fdb\u884c\u76ee\u6807\u68c0\u6d4bPython \u4f7f\u7528\u56fe\u50cf\u5904\u7406\u8fdb\u884c\u76ee\u6807\u68c0\u6d4b\u7684\u6838\u5fc3\u6b65\u9aa4\u5305\u62ec\u56fe\u50cf\u9884\u5904\u7406\u3001\u7279\u5f81\u63d0\u53d6\u3001\u76ee\u6807\u8bc6\u522b\u3001 [&hellip;]","protected":false},"author":3,"featured_media":1082227,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1082223"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1082223"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1082223\/revisions"}],"predecessor-version":[{"id":1082228,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1082223\/revisions\/1082228"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1082227"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1082223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1082223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1082223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}