chao 3 weeks ago
parent
commit
c3858e07a6

+ 22 - 11
blockly/blocks/python/ai.js

@@ -8311,7 +8311,8 @@ class Edge:
 
 m = Edge()`;
     // ${degee} = camera.capture().resize(224,224)
-    var _code = `canvas = canvas.resize(224, 224, padding = 0)
+    var _code = `_canvas_x, _canvas_y = 48,8
+canvas = canvas.resize(224, 224, padding = 0)
 out = m.model.forward(canvas, quantize=True, layout="hwc")
 out = out.astype(np.float32).reshape(m.output_size)
 out = (np.ndarray.__abs__(out) * 255 / out.max()).astype(np.uint8)
@@ -8653,7 +8654,8 @@ class Number_recognition:
 
 number_recognition = Number_recognition()
 `;
-    var _code = `canvas = canvas.crop(48,8,224,224)
+    var _code = `_canvas_x, _canvas_y = 48,8
+canvas = canvas.crop(48,8,224,224)
 BOXES = number_recognition.digitalShowCanvas(canvas)
 `
     return _code;
@@ -9044,7 +9046,8 @@ Blockly.Python.ai_model_object_load = function (block) {
 
 ObjectRecognition = ObjectRecognition()
 `;
-    var _code = `canvas = canvas.crop(48,8,224,224)
+    var _code = `_canvas_x, _canvas_y = 48,8
+canvas = canvas.crop(48,8,224,224)
 BOXES = ObjectRecognition.objectRecognize(canvas)
 `
     return _code;
@@ -9424,7 +9427,8 @@ Blockly.Python.ai_model_Guesswork_load = function (block) {
 
 Mora = Mora()          
 `;
-    var _code = `canvas = canvas.crop(48,8,224,224)
+    var _code = `_canvas_x, _canvas_y = 48,8
+canvas = canvas.crop(48,8,224,224)
 BOXES = Mora.process(canvas)
 `
     return _code;
@@ -9698,7 +9702,8 @@ Blockly.Python.ai_model_face_recognition_load = function (block) {
 
 YoloFaceRecognize = YoloFaceRecognize()
 `;
-    var _code = `canvas = canvas.crop(48,8,224,224)
+    var _code = `_canvas_x, _canvas_y = 48,8
+canvas = canvas.crop(48,8,224,224)
 BOXES = YoloFaceRecognize.faceShowDetection(canvas)\n`
     return _code;
 }
@@ -10146,7 +10151,8 @@ Blockly.Python['ai_model_card_recognition_load'] = function (block) {
 LPRCARD  = LPR()
 `;
     // TODO: Assemble Python into code variable.
-    var code = `canvas = canvas.crop(48,8,224,224)
+    var code = `_canvas_x, _canvas_y = 48,8
+canvas = canvas.crop(48,8,224,224)
 BOXES = LPRCARD.process(canvas)
 `;
     return code;
@@ -10711,7 +10717,8 @@ Blockly.Python['face_recognition_load'] = function (block) {
 FACERECGNIZER = Face_Recognizer(0.5, 0.3, max_face_num = 4)
 
 `
-    var code = `canvas = canvas.crop(48, 8,224, 224)
+    var code = `_canvas_x, _canvas_y = 48,8
+canvas = canvas.crop(48, 8,224, 224)
 FACERECGNIZER.recognizeShowMessage(canvas)
 `;
     return code;
@@ -11302,7 +11309,8 @@ key_B = BUTTON(8)
 key_C = BUTTON(13)
 key_D = BUTTON(7)
 `
-    var code = `canvas = canvas.crop(48, 8, 224, 224)
+    var code = `_canvas_x, _canvas_y = 48,8
+canvas = canvas.crop(48, 8, 224, 224)
 if key_${_type}.is_pressed() and SELFLEARNCOUNT < SELFLEARN.class_num:
     while not (key_${_type}.is_pressed() == False):
             time.sleep(0.1)
@@ -11405,7 +11413,8 @@ Blockly.Blocks['ai_model_self_learning_class_verification'] = {
 };
 
 Blockly.Python['ai_model_self_learning_class_verification'] = function (block) {
-    var code = `canvas = canvas.crop(48, 8, 224, 224)
+    var code = `_canvas_x, _canvas_y = 48,8
+canvas = canvas.crop(48, 8, 224, 224)
 SELFLEARNidx, SELFLEARNdistance = SELFLEARN.classifier.predict(canvas)
 `;
     return code;
@@ -12635,7 +12644,8 @@ Blockly.Python['ai_model_customized_load_setup'] = function (block) {
 
 FaceYolo = Yolo()
 `;
-    var code = `canvas = canvas.crop(48,8,224,224)
+    var code = `_canvas_x, _canvas_y = 48,8
+canvas = canvas.crop(48,8,224,224)
 BOXES = FaceYolo.faceRecognizeShowResult(canvas)
 `;
     return code;
@@ -13975,7 +13985,8 @@ Blockly.Python['Numpy_Neural_Network_numpy_loading_model_fun'] = function (block
     return result   
 `
     // TODO: Assemble Python into code variable.
-    var code = `canvas = canvas.crop(48,8,224,224)
+    var code = `_canvas_x, _canvas_y = 48,8
+canvas = canvas.crop(48,8,224,224)
 GETNUMPYRESULT = numpyResult(canvas)
 if GETNUMPYRESULT != "":
     canvas.draw_string(0,0, (str(GETNUMPYRESULT)), scale = 3, color = (204,204,204) , thickness = 1)

+ 15 - 33
src/python/AI/numpyMnist识别.xml

@@ -1,43 +1,25 @@
 <xml xmlns="http://www.w3.org/1999/xhtml" type="IoT">
-  <block type="ai_lcd_showcarvas_set_cord" id="@IKjFN!)dQay$lDB,aW#" x="-80" y="40">
-    <value name="xy">
-      <block type="lcd_set_position" id="CBDNRCQ{QyKUsOb`~03f">
-        <value name="POSX">
-          <shadow type="math_number" id="s_%FL]-m@63}YoK6|7o~">
-            <field name="NUM">48</field>
-          </shadow>
-        </value>
-        <value name="POSY">
-          <shadow type="math_number" id="jkfhT?wq+CWr(vZ3juv^">
-            <field name="NUM">8</field>
-          </shadow>
-        </value>
-      </block>
-    </value>
+  <block type="Numpy_Neural_Network_init" id="vkZAbF*r$hiGs}4?4U3M" x="-80" y="88">
     <next>
-      <block type="Numpy_Neural_Network_init" id="vkZAbF*r$hiGs}4?4U3M">
+      <block type="Numpy_Neural_Network_numpy_loading_model" id="vg+O{|o8xca^Hzc8Cqgx">
+        <value name="class_input">
+          <block type="text" id="0Wa+eO*5Y)-Gq,Vy_tu~">
+            <field name="TEXT">/root/user/model/NN.pkl</field>
+          </block>
+        </value>
         <next>
-          <block type="Numpy_Neural_Network_numpy_loading_model" id="vg+O{|o8xca^Hzc8Cqgx">
-            <value name="class_input">
-              <block type="text" id="0Wa+eO*5Y)-Gq,Vy_tu~">
-                <field name="TEXT">/root/user/model/NN.pkl</field>
-              </block>
-            </value>
-            <next>
-              <block type="controls_repeat_forever" id="AOR9r+DS1`:!kj?-YWfl">
-                <statement name="DO">
-                  <block type="ai_camera_snapshot" id="Vck%afYBkA_BQ-K!u2,7">
+          <block type="controls_repeat_forever" id="AOR9r+DS1`:!kj?-YWfl">
+            <statement name="DO">
+              <block type="ai_camera_snapshot" id="Vck%afYBkA_BQ-K!u2,7">
+                <next>
+                  <block type="Numpy_Neural_Network_numpy_loading_model_fun" id="3@#hcv;uW!K%RE{xzljT">
                     <next>
-                      <block type="Numpy_Neural_Network_numpy_loading_model_fun" id="3@#hcv;uW!K%RE{xzljT">
-                        <next>
-                          <block type="ai_lcd_showcarvas_set_display" id="}ONfcx:G4|/n]Z?I1::W"></block>
-                        </next>
-                      </block>
+                      <block type="ai_lcd_showcarvas_set_display" id="}ONfcx:G4|/n]Z?I1::W"></block>
                     </next>
                   </block>
-                </statement>
+                </next>
               </block>
-            </next>
+            </statement>
           </block>
         </next>
       </block>

+ 8 - 26
src/python/AI/人脸检测.xml

@@ -1,33 +1,15 @@
 <xml xmlns="http://www.w3.org/1999/xhtml" type="IoT">
-  <block type="ai_lcd_showcarvas_set_cord" id="y@{b*WZh|fe+.miBi0+@" x="-61" y="10">
-    <value name="xy">
-      <block type="lcd_set_position" id="Dqg}xVvyGqRX0!-~lhO^">
-        <value name="POSX">
-          <shadow type="math_number" id="U2-:r]}#3|O9*Y?M%t72">
-            <field name="NUM">48</field>
-          </shadow>
-        </value>
-        <value name="POSY">
-          <shadow type="math_number" id="/3UMkRjN5ZxR9-!3YksA">
-            <field name="NUM">8</field>
-          </shadow>
-        </value>
-      </block>
-    </value>
-    <next>
-      <block type="controls_repeat_forever" id="G;eI?9/bLk8BCQx,uJ!a">
-        <statement name="DO">
-          <block type="ai_camera_snapshot" id="J,Z*r]C[vp%0I_#L(rXF">
+  <block type="controls_repeat_forever" id="G;eI?9/bLk8BCQx,uJ!a" x="-152" y="55">
+    <statement name="DO">
+      <block type="ai_camera_snapshot" id="J,Z*r]C[vp%0I_#L(rXF">
+        <next>
+          <block type="ai_model_face_recognition_load" id="yG0O]?M58_OGNL}x@*c:">
             <next>
-              <block type="ai_model_face_recognition_load" id="yG0O]?M58_OGNL}x@*c:">
-                <next>
-                  <block type="ai_lcd_showcarvas_set_display" id="G53S9xg,q:=U=lWRg95p"></block>
-                </next>
-              </block>
+              <block type="ai_lcd_showcarvas_set_display" id="G53S9xg,q:=U=lWRg95p"></block>
             </next>
           </block>
-        </statement>
+        </next>
       </block>
-    </next>
+    </statement>
   </block>
 </xml>

+ 28 - 46
src/python/AI/人脸识别.xml

@@ -1,57 +1,39 @@
 <xml xmlns="http://www.w3.org/1999/xhtml" type="IoT">
-  <block type="ai_lcd_showcarvas_set_cord" id="y@{b*WZh|fe+.miBi0+@" x="162" y="135">
-    <value name="xy">
-      <block type="lcd_set_position" id="Dqg}xVvyGqRX0!-~lhO^">
-        <value name="POSX">
-          <shadow type="math_number" id="U2-:r]}#3|O9*Y?M%t72">
-            <field name="NUM">48</field>
-          </shadow>
-        </value>
-        <value name="POSY">
-          <shadow type="math_number" id="/3UMkRjN5ZxR9-!3YksA">
-            <field name="NUM">8</field>
-          </shadow>
-        </value>
-      </block>
-    </value>
-    <next>
-      <block type="controls_repeat_forever" id="G;eI?9/bLk8BCQx,uJ!a">
-        <statement name="DO">
-          <block type="ai_camera_snapshot" id="D]zhBu@E6?h2n:)p,SWW">
-            <next>
-              <block type="face_recognition_load" id="nr7fbKdQsVfEXai[_#v]">
-                <value name="class_input">
-                  <block type="lists_create_with" id="o5@ID3l.9e,?$!m||G7(">
-                    <mutation items="3"></mutation>
-                    <value name="ADD0">
-                      <block type="text" id="%b)Qd3!yFegZ{*p=r,Ke">
-                        <field name="TEXT">Name1</field>
-                      </block>
-                    </value>
-                    <value name="ADD1">
-                      <block type="text" id="cesu]-`^=b#E/%@]?hL8">
-                        <field name="TEXT">Name2</field>
-                      </block>
-                    </value>
-                    <value name="ADD2">
-                      <block type="text" id="UY3d%xU($qHC1BCh^eA7">
-                        <field name="TEXT">Name3</field>
-                      </block>
-                    </value>
+  <block type="controls_repeat_forever" id="G;eI?9/bLk8BCQx,uJ!a" x="162" y="183">
+    <statement name="DO">
+      <block type="ai_camera_snapshot" id="D]zhBu@E6?h2n:)p,SWW">
+        <next>
+          <block type="face_recognition_load" id="nr7fbKdQsVfEXai[_#v]">
+            <value name="class_input">
+              <block type="lists_create_with" id="o5@ID3l.9e,?$!m||G7(">
+                <mutation items="3"></mutation>
+                <value name="ADD0">
+                  <block type="text" id="%b)Qd3!yFegZ{*p=r,Ke">
+                    <field name="TEXT">Name1</field>
                   </block>
                 </value>
-                <next>
-                  <block type="face_recognition_data_load" id="47(H/I_Lx,P99}aVU5?S">
-                    <next>
-                      <block type="ai_lcd_showcarvas_set_display" id="G53S9xg,q:=U=lWRg95p"></block>
-                    </next>
+                <value name="ADD1">
+                  <block type="text" id="cesu]-`^=b#E/%@]?hL8">
+                    <field name="TEXT">Name2</field>
+                  </block>
+                </value>
+                <value name="ADD2">
+                  <block type="text" id="UY3d%xU($qHC1BCh^eA7">
+                    <field name="TEXT">Name3</field>
                   </block>
+                </value>
+              </block>
+            </value>
+            <next>
+              <block type="face_recognition_data_load" id="47(H/I_Lx,P99}aVU5?S">
+                <next>
+                  <block type="ai_lcd_showcarvas_set_display" id="G53S9xg,q:=U=lWRg95p"></block>
                 </next>
               </block>
             </next>
           </block>
-        </statement>
+        </next>
       </block>
-    </next>
+    </statement>
   </block>
 </xml>

+ 35 - 53
src/python/AI/人脸采集.xml

@@ -1,67 +1,49 @@
 <xml xmlns="http://www.w3.org/1999/xhtml" type="IoT">
-  <block type="ai_lcd_showcarvas_set_cord" id="y@{b*WZh|fe+.miBi0+@" x="162" y="135">
-    <value name="xy">
-      <block type="lcd_set_position" id="Dqg}xVvyGqRX0!-~lhO^">
-        <value name="POSX">
-          <shadow type="math_number" id="U2-:r]}#3|O9*Y?M%t72">
-            <field name="NUM">48</field>
-          </shadow>
-        </value>
-        <value name="POSY">
-          <shadow type="math_number" id="/3UMkRjN5ZxR9-!3YksA">
-            <field name="NUM">8</field>
-          </shadow>
-        </value>
-      </block>
-    </value>
-    <next>
-      <block type="controls_repeat_forever" id="G;eI?9/bLk8BCQx,uJ!a">
-        <statement name="DO">
-          <block type="ai_camera_snapshot" id="O@VRo`bc^I/cF5n6}Op8">
-            <next>
-              <block type="face_recognition_load" id="nr7fbKdQsVfEXai[_#v]">
-                <value name="class_input">
-                  <block type="lists_create_with" id="o5@ID3l.9e,?$!m||G7(">
-                    <mutation items="3"></mutation>
-                    <value name="ADD0">
-                      <block type="text" id="%b)Qd3!yFegZ{*p=r,Ke">
-                        <field name="TEXT">Name1</field>
-                      </block>
-                    </value>
-                    <value name="ADD1">
-                      <block type="text" id="cesu]-`^=b#E/%@]?hL8">
-                        <field name="TEXT">Name2</field>
-                      </block>
-                    </value>
-                    <value name="ADD2">
-                      <block type="text" id="UY3d%xU($qHC1BCh^eA7">
-                        <field name="TEXT">Name3</field>
-                      </block>
-                    </value>
+  <block type="controls_repeat_forever" id="G;eI?9/bLk8BCQx,uJ!a" x="162" y="183">
+    <statement name="DO">
+      <block type="ai_camera_snapshot" id="O@VRo`bc^I/cF5n6}Op8">
+        <next>
+          <block type="face_recognition_load" id="nr7fbKdQsVfEXai[_#v]">
+            <value name="class_input">
+              <block type="lists_create_with" id="o5@ID3l.9e,?$!m||G7(">
+                <mutation items="3"></mutation>
+                <value name="ADD0">
+                  <block type="text" id="%b)Qd3!yFegZ{*p=r,Ke">
+                    <field name="TEXT">Name1</field>
                   </block>
                 </value>
+                <value name="ADD1">
+                  <block type="text" id="cesu]-`^=b#E/%@]?hL8">
+                    <field name="TEXT">Name2</field>
+                  </block>
+                </value>
+                <value name="ADD2">
+                  <block type="text" id="UY3d%xU($qHC1BCh^eA7">
+                    <field name="TEXT">Name3</field>
+                  </block>
+                </value>
+              </block>
+            </value>
+            <next>
+              <block type="face_recognition_if_face_new" id="SYI?4X^`j+~-_EAgN*}w">
+                <statement name="input">
+                  <block type="face_recognition_add" id="0c=C]fvgb6afQL$a_(7?">
+                    <field name="button_type">C</field>
+                  </block>
+                </statement>
                 <next>
-                  <block type="face_recognition_if_face_new" id="SYI?4X^`j+~-_EAgN*}w">
-                    <statement name="input">
-                      <block type="face_recognition_add" id="0c=C]fvgb6afQL$a_(7?">
-                        <field name="button_type">C</field>
-                      </block>
-                    </statement>
+                  <block type="face_recognition_remove" id="3S^9Ef//y*qxWsp;JY`%">
+                    <field name="button_type">D</field>
                     <next>
-                      <block type="face_recognition_remove" id="3S^9Ef//y*qxWsp;JY`%">
-                        <field name="button_type">D</field>
-                        <next>
-                          <block type="ai_lcd_showcarvas_set_display" id="G53S9xg,q:=U=lWRg95p"></block>
-                        </next>
-                      </block>
+                      <block type="ai_lcd_showcarvas_set_display" id="G53S9xg,q:=U=lWRg95p"></block>
                     </next>
                   </block>
                 </next>
               </block>
             </next>
           </block>
-        </statement>
+        </next>
       </block>
-    </next>
+    </statement>
   </block>
 </xml>

+ 11 - 29
src/python/AI/图片边缘检测.xml

@@ -1,38 +1,20 @@
 <xml xmlns="http://www.w3.org/1999/xhtml" type="IoT">
-  <block type="ai_lcd_showcarvas_set_cord" id="W7R|_~W5MK*6(A1*ncx(" x="185" y="286">
-    <value name="xy">
-      <block type="lcd_set_position" id="V@33YjROc@9OWD#E9cB5">
-        <value name="POSX">
-          <shadow type="math_number" id=";5SG63c|BdKrCug!r@5$">
-            <field name="NUM">48</field>
+  <block type="controls_repeat_forever" id="w-?2s^`xT,GQ0)%06pK%" x="185" y="334">
+    <statement name="DO">
+      <block type="v831_img_open" id="ZLR[.A$oepsRqaKb;u=^">
+        <value name="save_path">
+          <shadow type="text" id="08qI*1Fp2e!Bb;6]I1`J">
+            <field name="TEXT">/root/preset/img/cocorobo_logo.jpg</field>
           </shadow>
         </value>
-        <value name="POSY">
-          <shadow type="math_number" id="bA%|Dbq3+v?B(b5ikaLE">
-            <field name="NUM">8</field>
-          </shadow>
-        </value>
-      </block>
-    </value>
-    <next>
-      <block type="controls_repeat_forever" id="w-?2s^`xT,GQ0)%06pK%">
-        <statement name="DO">
-          <block type="v831_img_open" id="ZLR[.A$oepsRqaKb;u=^">
-            <value name="save_path">
-              <shadow type="text" id="08qI*1Fp2e!Bb;6]I1`J">
-                <field name="TEXT">/root/preset/img/cocorobo_logo.jpg</field>
-              </shadow>
-            </value>
+        <next>
+          <block type="ai_model_edge_loading" id="?i4iX/KRI:lv4u:Bt0y+">
             <next>
-              <block type="ai_model_edge_loading" id="?i4iX/KRI:lv4u:Bt0y+">
-                <next>
-                  <block type="ai_lcd_showcarvas_set_display" id="4qp70MjO0_xvqUa1nl3I"></block>
-                </next>
-              </block>
+              <block type="ai_lcd_showcarvas_set_display" id="4qp70MjO0_xvqUa1nl3I"></block>
             </next>
           </block>
-        </statement>
+        </next>
       </block>
-    </next>
+    </statement>
   </block>
 </xml>

+ 8 - 26
src/python/AI/实时边缘检测.xml

@@ -1,33 +1,15 @@
 <xml xmlns="http://www.w3.org/1999/xhtml" type="IoT">
-  <block type="ai_lcd_showcarvas_set_cord" id="W7R|_~W5MK*6(A1*ncx(" x="185" y="286">
-    <value name="xy">
-      <block type="lcd_set_position" id="V@33YjROc@9OWD#E9cB5">
-        <value name="POSX">
-          <shadow type="math_number" id=";5SG63c|BdKrCug!r@5$">
-            <field name="NUM">48</field>
-          </shadow>
-        </value>
-        <value name="POSY">
-          <shadow type="math_number" id="bA%|Dbq3+v?B(b5ikaLE">
-            <field name="NUM">8</field>
-          </shadow>
-        </value>
-      </block>
-    </value>
-    <next>
-      <block type="controls_repeat_forever" id="w-?2s^`xT,GQ0)%06pK%">
-        <statement name="DO">
-          <block type="ai_camera_snapshot" id="wL2j:v8FoCqc(j%HeN`%">
+  <block type="controls_repeat_forever" id="w-?2s^`xT,GQ0)%06pK%" x="185" y="334">
+    <statement name="DO">
+      <block type="ai_camera_snapshot" id="wL2j:v8FoCqc(j%HeN`%">
+        <next>
+          <block type="ai_model_edge_loading" id="?i4iX/KRI:lv4u:Bt0y+">
             <next>
-              <block type="ai_model_edge_loading" id="?i4iX/KRI:lv4u:Bt0y+">
-                <next>
-                  <block type="ai_lcd_showcarvas_set_display" id="4qp70MjO0_xvqUa1nl3I"></block>
-                </next>
-              </block>
+              <block type="ai_lcd_showcarvas_set_display" id="4qp70MjO0_xvqUa1nl3I"></block>
             </next>
           </block>
-        </statement>
+        </next>
       </block>
-    </next>
+    </statement>
   </block>
 </xml>

+ 8 - 26
src/python/AI/数字识别.xml

@@ -1,33 +1,15 @@
 <xml xmlns="http://www.w3.org/1999/xhtml" type="IoT">
-  <block type="ai_lcd_showcarvas_set_cord" id="y@{b*WZh|fe+.miBi0+@" x="-61" y="10">
-    <value name="xy">
-      <block type="lcd_set_position" id="Dqg}xVvyGqRX0!-~lhO^">
-        <value name="POSX">
-          <shadow type="math_number" id="U2-:r]}#3|O9*Y?M%t72">
-            <field name="NUM">48</field>
-          </shadow>
-        </value>
-        <value name="POSY">
-          <shadow type="math_number" id="/3UMkRjN5ZxR9-!3YksA">
-            <field name="NUM">8</field>
-          </shadow>
-        </value>
-      </block>
-    </value>
-    <next>
-      <block type="controls_repeat_forever" id="G;eI?9/bLk8BCQx,uJ!a">
-        <statement name="DO">
-          <block type="ai_camera_snapshot" id="j347H5)v3H6q|BmULab`">
+  <block type="controls_repeat_forever" id="G;eI?9/bLk8BCQx,uJ!a" x="-61" y="58">
+    <statement name="DO">
+      <block type="ai_camera_snapshot" id="j347H5)v3H6q|BmULab`">
+        <next>
+          <block type="ai_model_digital_init_loding" id="VlAG+T}#c`V@7mUg(1M$">
             <next>
-              <block type="ai_model_digital_init_loding" id="VlAG+T}#c`V@7mUg(1M$">
-                <next>
-                  <block type="ai_lcd_showcarvas_set_display" id="G53S9xg,q:=U=lWRg95p"></block>
-                </next>
-              </block>
+              <block type="ai_lcd_showcarvas_set_display" id="G53S9xg,q:=U=lWRg95p"></block>
             </next>
           </block>
-        </statement>
+        </next>
       </block>
-    </next>
+    </statement>
   </block>
 </xml>

+ 8 - 26
src/python/AI/物体检测.xml

@@ -1,33 +1,15 @@
 <xml xmlns="http://www.w3.org/1999/xhtml" type="IoT">
-  <block type="ai_lcd_showcarvas_set_cord" id="y@{b*WZh|fe+.miBi0+@" x="-61" y="10">
-    <value name="xy">
-      <block type="lcd_set_position" id="Dqg}xVvyGqRX0!-~lhO^">
-        <value name="POSX">
-          <shadow type="math_number" id="U2-:r]}#3|O9*Y?M%t72">
-            <field name="NUM">48</field>
-          </shadow>
-        </value>
-        <value name="POSY">
-          <shadow type="math_number" id="/3UMkRjN5ZxR9-!3YksA">
-            <field name="NUM">8</field>
-          </shadow>
-        </value>
-      </block>
-    </value>
-    <next>
-      <block type="controls_repeat_forever" id="G;eI?9/bLk8BCQx,uJ!a">
-        <statement name="DO">
-          <block type="ai_camera_snapshot" id="P7WS$RQ,7RL^7;XD*BIm">
+  <block type="controls_repeat_forever" id="G;eI?9/bLk8BCQx,uJ!a" x="-61" y="58">
+    <statement name="DO">
+      <block type="ai_camera_snapshot" id="P7WS$RQ,7RL^7;XD*BIm">
+        <next>
+          <block type="ai_model_object_load" id="8_zc^xBa#U]5n=uKM@2Y">
             <next>
-              <block type="ai_model_object_load" id="8_zc^xBa#U]5n=uKM@2Y">
-                <next>
-                  <block type="ai_lcd_showcarvas_set_display" id="G53S9xg,q:=U=lWRg95p"></block>
-                </next>
-              </block>
+              <block type="ai_lcd_showcarvas_set_display" id="G53S9xg,q:=U=lWRg95p"></block>
             </next>
           </block>
-        </statement>
+        </next>
       </block>
-    </next>
+    </statement>
   </block>
 </xml>

+ 8 - 26
src/python/AI/猜拳手势识别.xml

@@ -1,33 +1,15 @@
 <xml xmlns="http://www.w3.org/1999/xhtml" type="IoT">
-  <block type="ai_lcd_showcarvas_set_cord" id="y@{b*WZh|fe+.miBi0+@" x="162" y="135">
-    <value name="xy">
-      <block type="lcd_set_position" id="Dqg}xVvyGqRX0!-~lhO^">
-        <value name="POSX">
-          <shadow type="math_number" id="U2-:r]}#3|O9*Y?M%t72">
-            <field name="NUM">48</field>
-          </shadow>
-        </value>
-        <value name="POSY">
-          <shadow type="math_number" id="/3UMkRjN5ZxR9-!3YksA">
-            <field name="NUM">8</field>
-          </shadow>
-        </value>
-      </block>
-    </value>
-    <next>
-      <block type="controls_repeat_forever" id="G;eI?9/bLk8BCQx,uJ!a">
-        <statement name="DO">
-          <block type="ai_camera_snapshot" id="C@W}L4@7@epqRxC-.9gO">
+  <block type="controls_repeat_forever" id="G;eI?9/bLk8BCQx,uJ!a" x="162" y="183">
+    <statement name="DO">
+      <block type="ai_camera_snapshot" id="C@W}L4@7@epqRxC-.9gO">
+        <next>
+          <block type="ai_model_Guesswork_load" id="deLqc%(IfPNQbA_U%=IA">
             <next>
-              <block type="ai_model_Guesswork_load" id="deLqc%(IfPNQbA_U%=IA">
-                <next>
-                  <block type="ai_lcd_showcarvas_set_display" id="G53S9xg,q:=U=lWRg95p"></block>
-                </next>
-              </block>
+              <block type="ai_lcd_showcarvas_set_display" id="G53S9xg,q:=U=lWRg95p"></block>
             </next>
           </block>
-        </statement>
+        </next>
       </block>
-    </next>
+    </statement>
   </block>
 </xml>

+ 66 - 84
src/python/AI/自学习.xml

@@ -1,109 +1,91 @@
 <xml xmlns="http://www.w3.org/1999/xhtml" type="IoT">
-  <block type="ai_lcd_showcarvas_set_cord" id="W7R|_~W5MK*6(A1*ncx(" x="21" y="-125">
-    <value name="xy">
-      <block type="lcd_set_position" id="V@33YjROc@9OWD#E9cB5">
-        <value name="POSX">
-          <shadow type="math_number" id=";5SG63c|BdKrCug!r@5$">
-            <field name="NUM">48</field>
-          </shadow>
+  <block type="ai_model_self_learning_load" id="B*nlVloQm8d;X?nRczp#" x="21" y="-77">
+    <value name="class_input">
+      <block type="lists_create_with" id="y(op6$e/xn{U~9e3j8{y">
+        <mutation items="3"></mutation>
+        <value name="ADD0">
+          <block type="text" id="`_IHjPepx7y~5v$|@Kr+">
+            <field name="TEXT">Object 1 Name</field>
+          </block>
         </value>
-        <value name="POSY">
-          <shadow type="math_number" id="bA%|Dbq3+v?B(b5ikaLE">
-            <field name="NUM">8</field>
-          </shadow>
+        <value name="ADD1">
+          <block type="text" id="yV9GeA|/n8+P|YW]E^G,">
+            <field name="TEXT">Object 2 Name</field>
+          </block>
+        </value>
+        <value name="ADD2">
+          <block type="text" id="dY2P#+s/tb|oIf7*lair">
+            <field name="TEXT">Object 3 Name</field>
+          </block>
         </value>
       </block>
     </value>
     <next>
-      <block type="ai_model_self_learning_load" id="B*nlVloQm8d;X?nRczp#">
-        <value name="class_input">
-          <block type="lists_create_with" id="y(op6$e/xn{U~9e3j8{y">
-            <mutation items="3"></mutation>
-            <value name="ADD0">
-              <block type="text" id="`_IHjPepx7y~5v$|@Kr+">
-                <field name="TEXT">Object 1 Name</field>
-              </block>
-            </value>
-            <value name="ADD1">
-              <block type="text" id="yV9GeA|/n8+P|YW]E^G,">
-                <field name="TEXT">Object 2 Name</field>
-              </block>
-            </value>
-            <value name="ADD2">
-              <block type="text" id="dY2P#+s/tb|oIf7*lair">
-                <field name="TEXT">Object 3 Name</field>
-              </block>
-            </value>
+      <block type="variables_set" id="/;mCyjS_H:7Ji1|M_M(q">
+        <field name="VAR">str_display</field>
+        <value name="VALUE">
+          <shadow type="math_number" id=",E{:e{.NH|~E%m)4}@]0">
+            <field name="NUM">0</field>
+          </shadow>
+          <block type="text" id="c+OdM`@_@UpoAAFv:dOE">
+            <field name="TEXT">按C键添加类别,按D键進行学习</field>
           </block>
         </value>
         <next>
-          <block type="variables_set" id="/;mCyjS_H:7Ji1|M_M(q">
-            <field name="VAR">str_display</field>
-            <value name="VALUE">
-              <shadow type="math_number" id=",E{:e{.NH|~E%m)4}@]0">
-                <field name="NUM">0</field>
-              </shadow>
-              <block type="text" id="c+OdM`@_@UpoAAFv:dOE">
-                <field name="TEXT">按C键添加类别,按D键進行学习</field>
-              </block>
-            </value>
-            <next>
-              <block type="controls_repeat_forever" id="pqagRq6*P%eDslmV%kJ.">
-                <statement name="DO">
-                  <block type="ai_camera_snapshot" id="8o^#u6z)L!gA12wvrpK{">
-                    <next>
-                      <block type="ai_lcd_textcarvas" id="nnSV:VW,N:!VUnb`8vx/">
-                        <value name="POSA">
-                          <block type="lcd_set_position" id="L{Q`p60%Yx}t5+7p.e%H">
-                            <value name="POSX">
-                              <shadow type="math_number" id="~|C}(%aA9pKP0,8N~Vz@">
-                                <field name="NUM">0</field>
-                              </shadow>
-                            </value>
-                            <value name="POSY">
-                              <shadow type="math_number" id="|p#/_P;5`0A9?Z/=fGtJ">
-                                <field name="NUM">0</field>
-                              </shadow>
-                            </value>
-                          </block>
-                        </value>
-                        <value name="CONTENT">
-                          <shadow type="text" id="KT6[TPX=8Gm+aGq}68qS">
-                            <field name="TEXT"></field>
+          <block type="controls_repeat_forever" id="pqagRq6*P%eDslmV%kJ.">
+            <statement name="DO">
+              <block type="ai_camera_snapshot" id="8o^#u6z)L!gA12wvrpK{">
+                <next>
+                  <block type="ai_lcd_textcarvas" id="nnSV:VW,N:!VUnb`8vx/">
+                    <value name="POSA">
+                      <block type="lcd_set_position" id="L{Q`p60%Yx}t5+7p.e%H">
+                        <value name="POSX">
+                          <shadow type="math_number" id="~|C}(%aA9pKP0,8N~Vz@">
+                            <field name="NUM">0</field>
                           </shadow>
-                          <block type="variables_get" id="]R^|csr2LvlZV4BDc=W@">
-                            <field name="VAR">str_display</field>
-                          </block>
-                        </value>
-                        <value name="COLOR">
-                          <block type="lcd_set_color" id="s1eU7UuW]/L^*e#56$5x">
-                            <field name="COLOR">#ff0000</field>
-                          </block>
                         </value>
-                        <value name="Scale">
-                          <shadow type="math_number" id="8.cY{ejjV8z_Oy#]E}E2">
-                            <field name="NUM">1</field>
+                        <value name="POSY">
+                          <shadow type="math_number" id="|p#/_P;5`0A9?Z/=fGtJ">
+                            <field name="NUM">0</field>
                           </shadow>
                         </value>
+                      </block>
+                    </value>
+                    <value name="CONTENT">
+                      <shadow type="text" id="KT6[TPX=8Gm+aGq}68qS">
+                        <field name="TEXT"></field>
+                      </shadow>
+                      <block type="variables_get" id="]R^|csr2LvlZV4BDc=W@">
+                        <field name="VAR">str_display</field>
+                      </block>
+                    </value>
+                    <value name="COLOR">
+                      <block type="lcd_set_color" id="s1eU7UuW]/L^*e#56$5x">
+                        <field name="COLOR">#ff0000</field>
+                      </block>
+                    </value>
+                    <value name="Scale">
+                      <shadow type="math_number" id="8.cY{ejjV8z_Oy#]E}E2">
+                        <field name="NUM">1</field>
+                      </shadow>
+                    </value>
+                    <next>
+                      <block type="ai_model_self_learning_add_class" id="p7;?Ei}/hAQY`h]bj@m!">
+                        <field name="button_type">C</field>
                         <next>
-                          <block type="ai_model_self_learning_add_class" id="p7;?Ei}/hAQY`h]bj@m!">
-                            <field name="button_type">C</field>
+                          <block type="ai_model_self_learning_picture" id="4S;FcCInEg*iXPxFE7!d">
+                            <field name="button_type">D</field>
                             <next>
-                              <block type="ai_model_self_learning_picture" id="4S;FcCInEg*iXPxFE7!d">
-                                <field name="button_type">D</field>
-                                <next>
-                                  <block type="ai_lcd_showcarvas_set_display" id="5%$VU]Wc+Di=y[*4,?u9"></block>
-                                </next>
-                              </block>
+                              <block type="ai_lcd_showcarvas_set_display" id="5%$VU]Wc+Di=y[*4,?u9"></block>
                             </next>
                           </block>
                         </next>
                       </block>
                     </next>
                   </block>
-                </statement>
+                </next>
               </block>
-            </next>
+            </statement>
           </block>
         </next>
       </block>

+ 80 - 98
src/python/AI/自学习识别.xml

@@ -1,59 +1,87 @@
 <xml xmlns="http://www.w3.org/1999/xhtml" type="IoT">
-  <block type="ai_lcd_showcarvas_set_cord" id="W7R|_~W5MK*6(A1*ncx(" x="31" y="41">
-    <value name="xy">
-      <block type="lcd_set_position" id="V@33YjROc@9OWD#E9cB5">
-        <value name="POSX">
-          <shadow type="math_number" id=";5SG63c|BdKrCug!r@5$">
-            <field name="NUM">48</field>
-          </shadow>
+  <block type="ai_model_self_learning_recognize_load" id="dy69hGR*%gpr(xN$A6ck" x="31" y="89">
+    <value name="class_input">
+      <block type="lists_create_with" id="$Kl{eEGW*I=K*}J1N9S{">
+        <mutation items="3"></mutation>
+        <value name="ADD0">
+          <block type="text" id="zUUc,KiW]$kI`/ftp38y">
+            <field name="TEXT">1</field>
+          </block>
+        </value>
+        <value name="ADD1">
+          <block type="text" id="?To9H[U`cx7TF_-T;lO+">
+            <field name="TEXT">2</field>
+          </block>
         </value>
-        <value name="POSY">
-          <shadow type="math_number" id="bA%|Dbq3+v?B(b5ikaLE">
-            <field name="NUM">8</field>
-          </shadow>
+        <value name="ADD2">
+          <block type="text" id="4OTYzj(|(:vq5d%5x40L">
+            <field name="TEXT">3</field>
+          </block>
         </value>
       </block>
     </value>
     <next>
-      <block type="ai_model_self_learning_recognize_load" id="dy69hGR*%gpr(xN$A6ck">
-        <value name="class_input">
-          <block type="lists_create_with" id="$Kl{eEGW*I=K*}J1N9S{">
-            <mutation items="3"></mutation>
-            <value name="ADD0">
-              <block type="text" id="zUUc,KiW]$kI`/ftp38y">
-                <field name="TEXT">1</field>
-              </block>
-            </value>
-            <value name="ADD1">
-              <block type="text" id="?To9H[U`cx7TF_-T;lO+">
-                <field name="TEXT">2</field>
-              </block>
-            </value>
-            <value name="ADD2">
-              <block type="text" id="4OTYzj(|(:vq5d%5x40L">
-                <field name="TEXT">3</field>
-              </block>
-            </value>
-          </block>
-        </value>
-        <next>
-          <block type="controls_repeat_forever" id="pqagRq6*P%eDslmV%kJ.">
-            <statement name="DO">
-              <block type="ai_camera_snapshot" id="Z.aG;c;UPeo:d~r_}p%w">
+      <block type="controls_repeat_forever" id="pqagRq6*P%eDslmV%kJ.">
+        <statement name="DO">
+          <block type="ai_camera_snapshot" id="Z.aG;c;UPeo:d~r_}p%w">
+            <next>
+              <block type="ai_model_self_learning_class_verification" id="AihW1:gB/^[:BwlE~045">
                 <next>
-                  <block type="ai_model_self_learning_class_verification" id="AihW1:gB/^[:BwlE~045">
+                  <block type="ai_lcd_textcarvas" id="3*k1H#[8AQDn;$?yhE$^">
+                    <value name="POSA">
+                      <block type="lcd_set_position" id="]OM$,XXbSEBIQakLD!c8">
+                        <value name="POSX">
+                          <shadow type="math_number" id="@*j);_R8+3Cos#/Zm:AV">
+                            <field name="NUM">0</field>
+                          </shadow>
+                        </value>
+                        <value name="POSY">
+                          <shadow type="math_number" id="un|4caegvgDUv$2xQt6j">
+                            <field name="NUM">0</field>
+                          </shadow>
+                        </value>
+                      </block>
+                    </value>
+                    <value name="CONTENT">
+                      <shadow type="text" id="KT6[TPX=8Gm+aGq}68qS">
+                        <field name="TEXT"></field>
+                      </shadow>
+                      <block type="text_join" id="*q@)3$tjD4%8#qKQSCX%">
+                        <mutation items="2"></mutation>
+                        <value name="ADD0">
+                          <block type="text" id="1CA.M7M,ACS`R?Cu{tK0">
+                            <field name="TEXT">识别名称:</field>
+                          </block>
+                        </value>
+                        <value name="ADD1">
+                          <block type="ai_model_self_learning_result" id="E]o?W*!?,~B6}]mB!7jc">
+                            <field name="TYPE">X</field>
+                          </block>
+                        </value>
+                      </block>
+                    </value>
+                    <value name="COLOR">
+                      <block type="lcd_set_color" id="PxiF+JU.q-Hw!$M;nCo|">
+                        <field name="COLOR">#ff0000</field>
+                      </block>
+                    </value>
+                    <value name="Scale">
+                      <shadow type="math_number" id="z15zT_X2j3-MNA_;nG(n">
+                        <field name="NUM">1</field>
+                      </shadow>
+                    </value>
                     <next>
-                      <block type="ai_lcd_textcarvas" id="3*k1H#[8AQDn;$?yhE$^">
+                      <block type="ai_lcd_textcarvas" id="|Cpa_SPKfI]a:FEa?KJl">
                         <value name="POSA">
-                          <block type="lcd_set_position" id="]OM$,XXbSEBIQakLD!c8">
+                          <block type="lcd_set_position" id="e6:g9BjP|`V0Va_@WI^^">
                             <value name="POSX">
-                              <shadow type="math_number" id="@*j);_R8+3Cos#/Zm:AV">
+                              <shadow type="math_number" id=")V~Y7BWL`z%-OpH.=,nt">
                                 <field name="NUM">0</field>
                               </shadow>
                             </value>
                             <value name="POSY">
-                              <shadow type="math_number" id="un|4caegvgDUv$2xQt6j">
-                                <field name="NUM">0</field>
+                              <shadow type="math_number" id="dP|J5*~;)$0_Gp#LE/rQ">
+                                <field name="NUM">50</field>
                               </shadow>
                             </value>
                           </block>
@@ -62,87 +90,41 @@
                           <shadow type="text" id="KT6[TPX=8Gm+aGq}68qS">
                             <field name="TEXT"></field>
                           </shadow>
-                          <block type="text_join" id="*q@)3$tjD4%8#qKQSCX%">
+                          <block type="text_join" id="7:UUa{kU0#UxO+s:J:C%">
                             <mutation items="2"></mutation>
                             <value name="ADD0">
-                              <block type="text" id="1CA.M7M,ACS`R?Cu{tK0">
-                                <field name="TEXT">识别名称:</field>
+                              <block type="text" id="ig4Oof~))fz^6iWD#*U3">
+                                <field name="TEXT">置信度:</field>
                               </block>
                             </value>
                             <value name="ADD1">
-                              <block type="ai_model_self_learning_result" id="E]o?W*!?,~B6}]mB!7jc">
-                                <field name="TYPE">X</field>
+                              <block type="ai_model_self_learning_result" id="J,#+S4NVSoqieX+e]cX`">
+                                <field name="TYPE">Y</field>
                               </block>
                             </value>
                           </block>
                         </value>
                         <value name="COLOR">
-                          <block type="lcd_set_color" id="PxiF+JU.q-Hw!$M;nCo|">
+                          <block type="lcd_set_color" id=")5YK*))7;:(-GmbR+@xE">
                             <field name="COLOR">#ff0000</field>
                           </block>
                         </value>
                         <value name="Scale">
-                          <shadow type="math_number" id="z15zT_X2j3-MNA_;nG(n">
+                          <shadow type="math_number" id="Z_`dX$F5tIar[$[LoDPq">
                             <field name="NUM">1</field>
                           </shadow>
                         </value>
                         <next>
-                          <block type="ai_lcd_textcarvas" id="|Cpa_SPKfI]a:FEa?KJl">
-                            <value name="POSA">
-                              <block type="lcd_set_position" id="e6:g9BjP|`V0Va_@WI^^">
-                                <value name="POSX">
-                                  <shadow type="math_number" id=")V~Y7BWL`z%-OpH.=,nt">
-                                    <field name="NUM">0</field>
-                                  </shadow>
-                                </value>
-                                <value name="POSY">
-                                  <shadow type="math_number" id="dP|J5*~;)$0_Gp#LE/rQ">
-                                    <field name="NUM">50</field>
-                                  </shadow>
-                                </value>
-                              </block>
-                            </value>
-                            <value name="CONTENT">
-                              <shadow type="text" id="KT6[TPX=8Gm+aGq}68qS">
-                                <field name="TEXT"></field>
-                              </shadow>
-                              <block type="text_join" id="7:UUa{kU0#UxO+s:J:C%">
-                                <mutation items="2"></mutation>
-                                <value name="ADD0">
-                                  <block type="text" id="ig4Oof~))fz^6iWD#*U3">
-                                    <field name="TEXT">置信度:</field>
-                                  </block>
-                                </value>
-                                <value name="ADD1">
-                                  <block type="ai_model_self_learning_result" id="J,#+S4NVSoqieX+e]cX`">
-                                    <field name="TYPE">Y</field>
-                                  </block>
-                                </value>
-                              </block>
-                            </value>
-                            <value name="COLOR">
-                              <block type="lcd_set_color" id=")5YK*))7;:(-GmbR+@xE">
-                                <field name="COLOR">#ff0000</field>
-                              </block>
-                            </value>
-                            <value name="Scale">
-                              <shadow type="math_number" id="Z_`dX$F5tIar[$[LoDPq">
-                                <field name="NUM">1</field>
-                              </shadow>
-                            </value>
-                            <next>
-                              <block type="ai_lcd_showcarvas_set_display" id="5%$VU]Wc+Di=y[*4,?u9"></block>
-                            </next>
-                          </block>
+                          <block type="ai_lcd_showcarvas_set_display" id="5%$VU]Wc+Di=y[*4,?u9"></block>
                         </next>
                       </block>
                     </next>
                   </block>
                 </next>
               </block>
-            </statement>
+            </next>
           </block>
-        </next>
+        </statement>
       </block>
     </next>
   </block>

+ 42 - 60
src/python/AI/自定义训练识别.xml

@@ -1,69 +1,51 @@
 <xml xmlns="http://www.w3.org/1999/xhtml" type="IoT">
-  <block type="ai_lcd_showcarvas_set_cord" id="y@{b*WZh|fe+.miBi0+@" x="162" y="135">
-    <value name="xy">
-      <block type="lcd_set_position" id="Dqg}xVvyGqRX0!-~lhO^">
-        <value name="POSX">
-          <shadow type="math_number" id="U2-:r]}#3|O9*Y?M%t72">
-            <field name="NUM">48</field>
-          </shadow>
-        </value>
-        <value name="POSY">
-          <shadow type="math_number" id="/3UMkRjN5ZxR9-!3YksA">
-            <field name="NUM">8</field>
-          </shadow>
-        </value>
-      </block>
-    </value>
-    <next>
-      <block type="controls_repeat_forever" id="G;eI?9/bLk8BCQx,uJ!a">
-        <statement name="DO">
-          <block type="ai_camera_snapshot" id="q=$%4QcsZLB.G7QE%?U8">
-            <next>
-              <block type="ai_model_customized_load_setup" id="MC;*H#QbcZUiS;+CoQge">
-                <field name="model_path">autologistics</field>
-                <value name="class_input">
-                  <block type="lists_create_with" id="%X7=Bz+x4b0oc~_)XD|Q">
-                    <mutation items="6"></mutation>
-                    <value name="ADD0">
-                      <block type="text" id="8E:}w7sLAPU-2{:cYiVP">
-                        <field name="TEXT">load</field>
-                      </block>
-                    </value>
-                    <value name="ADD1">
-                      <block type="text" id="%ZK^roKAzM.R8OkcIdTK">
-                        <field name="TEXT">unload</field>
-                      </block>
-                    </value>
-                    <value name="ADD2">
-                      <block type="text" id="NA*w_[cNx.2%BqPYas8_">
-                        <field name="TEXT">left</field>
-                      </block>
-                    </value>
-                    <value name="ADD3">
-                      <block type="text" id="FFCUwLnQ*:Sj,SS1_Kb(">
-                        <field name="TEXT">right</field>
-                      </block>
-                    </value>
-                    <value name="ADD4">
-                      <block type="text" id="z|o:rhz36C~$ow5^hl:]">
-                        <field name="TEXT">forward</field>
-                      </block>
-                    </value>
-                    <value name="ADD5">
-                      <block type="text" id="KLv0#D,[:e|K;+uM=2;u">
-                        <field name="TEXT">stop</field>
-                      </block>
-                    </value>
+  <block type="controls_repeat_forever" id="G;eI?9/bLk8BCQx,uJ!a" x="162" y="183">
+    <statement name="DO">
+      <block type="ai_camera_snapshot" id="q=$%4QcsZLB.G7QE%?U8">
+        <next>
+          <block type="ai_model_customized_load_setup" id="MC;*H#QbcZUiS;+CoQge">
+            <field name="model_path">autologistics</field>
+            <value name="class_input">
+              <block type="lists_create_with" id="%X7=Bz+x4b0oc~_)XD|Q">
+                <mutation items="6"></mutation>
+                <value name="ADD0">
+                  <block type="text" id="8E:}w7sLAPU-2{:cYiVP">
+                    <field name="TEXT">load</field>
+                  </block>
+                </value>
+                <value name="ADD1">
+                  <block type="text" id="%ZK^roKAzM.R8OkcIdTK">
+                    <field name="TEXT">unload</field>
+                  </block>
+                </value>
+                <value name="ADD2">
+                  <block type="text" id="NA*w_[cNx.2%BqPYas8_">
+                    <field name="TEXT">left</field>
+                  </block>
+                </value>
+                <value name="ADD3">
+                  <block type="text" id="FFCUwLnQ*:Sj,SS1_Kb(">
+                    <field name="TEXT">right</field>
+                  </block>
+                </value>
+                <value name="ADD4">
+                  <block type="text" id="z|o:rhz36C~$ow5^hl:]">
+                    <field name="TEXT">forward</field>
+                  </block>
+                </value>
+                <value name="ADD5">
+                  <block type="text" id="KLv0#D,[:e|K;+uM=2;u">
+                    <field name="TEXT">stop</field>
                   </block>
                 </value>
-                <next>
-                  <block type="ai_lcd_showcarvas_set_display" id="G53S9xg,q:=U=lWRg95p"></block>
-                </next>
               </block>
+            </value>
+            <next>
+              <block type="ai_lcd_showcarvas_set_display" id="G53S9xg,q:=U=lWRg95p"></block>
             </next>
           </block>
-        </statement>
+        </next>
       </block>
-    </next>
+    </statement>
   </block>
 </xml>

+ 8 - 26
src/python/AI/车牌识别.xml

@@ -1,33 +1,15 @@
 <xml xmlns="http://www.w3.org/1999/xhtml" type="IoT">
-  <block type="ai_lcd_showcarvas_set_cord" id="y@{b*WZh|fe+.miBi0+@" x="162" y="135">
-    <value name="xy">
-      <block type="lcd_set_position" id="Dqg}xVvyGqRX0!-~lhO^">
-        <value name="POSX">
-          <shadow type="math_number" id="U2-:r]}#3|O9*Y?M%t72">
-            <field name="NUM">48</field>
-          </shadow>
-        </value>
-        <value name="POSY">
-          <shadow type="math_number" id="/3UMkRjN5ZxR9-!3YksA">
-            <field name="NUM">8</field>
-          </shadow>
-        </value>
-      </block>
-    </value>
-    <next>
-      <block type="controls_repeat_forever" id="G;eI?9/bLk8BCQx,uJ!a">
-        <statement name="DO">
-          <block type="ai_camera_snapshot" id="%is5fNMB1Ng@N@rr~UY8">
+  <block type="controls_repeat_forever" id="G;eI?9/bLk8BCQx,uJ!a" x="162" y="183">
+    <statement name="DO">
+      <block type="ai_camera_snapshot" id="%is5fNMB1Ng@N@rr~UY8">
+        <next>
+          <block type="ai_model_card_recognition_load" id="/8X_(`IplzCsGdw=O0#l">
             <next>
-              <block type="ai_model_card_recognition_load" id="/8X_(`IplzCsGdw=O0#l">
-                <next>
-                  <block type="ai_lcd_showcarvas_set_display" id="G53S9xg,q:=U=lWRg95p"></block>
-                </next>
-              </block>
+              <block type="ai_lcd_showcarvas_set_display" id="G53S9xg,q:=U=lWRg95p"></block>
             </next>
           </block>
-        </statement>
+        </next>
       </block>
-    </next>
+    </statement>
   </block>
 </xml>