Files
mixly3/boards/default/micropython_k210_mixgoai/examples/8q3qF8AndRKY.mix
2024-07-23 20:47:22 +08:00

1 line
15 KiB
XML

<xml version="Mixly 2.0 Beta11" board="MixGo AI" xmlns="http://www.w3.org/1999/xhtml"><block type="factory_block_notes" id="K.Y.F,-Z[mme_Y]Sctj?" x="-314" y="-99"><field name="VALUE">AI_口罩识别_加载SD卡模型并对口罩进行检测</field><next><block type="camera_init" id="kPBL$5{b=lu4@:dC-qY+" inline="true"><value name="key1"><shadow type="mode" id="+9sFfrefeC-Y6=!77tlE"><field name="flag">sensor.RGB565</field></shadow></value><value name="key2"><shadow type="size" id="r?J`e~0C7hcnDt`V$@6e"><field name="flag">sensor.QVGA</field></shadow></value><value name="key3"><shadow type="on_off" id="*t`sy-5zJ[{LW(=Df6N("><field name="flag">1</field></shadow></value><next><block type="lcd_init" id="`W-Xw`GW|92D=B0EZ$ql" inline="true"><value name="freq"><shadow type="math_number" id="n|*]ZjI[12wrLE;wXeCe"><field name="NUM">15000000</field></shadow></value><value name="color"><shadow type="math_number" id="#)Wd!Vi`xlR7c@;71~[+"><field name="NUM">0x0000</field></shadow></value><next><block type="tuple_anchor" id="A8vA_|t$)[gAemZ)!,Hg"><field name="VAR">anchor</field><field name="TEXT">0.1606, 0.3562, 0.4712, 0.9568, 0.9877, 1.9108, 1.8761, 3.5310, 3.4423, 5.6823</field><next><block type="KPU_load1" id="3]gHAJJRCj;Li|#*76ic"><value name="SUB"><shadow type="variables_get" id="Jrx!!t8GCH9RLMOfMakX"><field name="VAR">task</field></shadow></value><value name="path"><shadow type="text" id="Fe#M|xnUGe)RWF!D3d,V"><field name="TEXT">/sd/masks.kmodel</field></shadow></value><next><block type="KPU_init_yolo2" id="j0$dq*mwB!=uy?;=:NPU" inline="true"><value name="SUB"><shadow type="variables_get" id="RhIknjc/yDyYw/u{.-j."><field name="VAR">task</field></shadow></value><value name="threshold"><shadow type="math_number" id="]8[z%`2H}w;ejOdBOi|J"><field name="NUM">0.5</field></shadow></value><value name="nms_value"><shadow type="math_number" id=";nNSh-2h[=WKli/t,t$r"><field name="NUM">0.3</field></shadow></value><value name="anchor_num"><shadow type="math_number" id="=ZWVJxUCD:WG-ug{zKBj"><field name="NUM">5</field></shadow></value><value name="anchor"><shadow type="factory_block_return" id="8lU${E5v:lo@LJ~VdW8z"><field name="VALUE">anchor</field></shadow></value><next><block type="controls_whileUntil" id="vw.N0YMjF1H3aF{VszMY"><field name="MODE">WHILE</field><value name="BOOL"><shadow type="logic_boolean" id="t?;);3,~3Lq,MC5yg`vC"><field name="BOOL">TRUE</field></shadow></value><statement name="DO"><block type="variables_set" id="vXrHp9~v%c7oq4r7[z;B"><field name="VAR">img</field><value name="VALUE"><block type="camera_snapshot" id="-0mp7s=3se?$0M*m;P=*"></block></value><next><block type="variables_set" id="Mg;#pIFG*[Cni~v_GM4m"><field name="VAR">code</field><value name="VALUE"><block type="KPU_run_yolo2" id="$Q-PVB}:GGrUxcnu:qW_"><value name="SUB"><shadow type="variables_get" id="d[yYNi(.?.tF$hk%d6A)"><field name="VAR">task</field></shadow></value><value name="VAR"><shadow xmlns="http://www.w3.org/1999/xhtml" type="variables_get"><field name="VAR">image</field></shadow><block type="variables_get" id="qQ;pfrXL4i7$HMB}y;i:"><field name="VAR">img</field></block></value></block></value><next><block type="controls_if" id=".I7)mmP(e#MfQZq{Iv8H"><value name="IF0"><block type="variables_get" id="iP*(!O!),0.LWGsqeM[="><field name="VAR">code</field></block></value><statement name="DO0"><block type="controls_forEach" id="BIB4Ow`jJYVT0[.a;VL*"><value name="LIST"><shadow xmlns="http://www.w3.org/1999/xhtml" type="list_many_input"><field name="CONTENT">0,1,2,3</field></shadow><block type="variables_get" id="aL.j_h!fW_-~w419-wr7"><field name="VAR">code</field></block></value><value name="VAR"><shadow type="variables_get" id="|}d*CWxMA#bB|J`yQs^u"><field name="VAR">item</field></shadow></value><statement name="DO"><block type="variables_set" id="faSu{P(R9{3-PNb4?nO}"><field name="VAR">value</field><value name="VALUE"><block type="text_to_number" id="B@cQud2t;0gj2Vtx/$(u"><field name="TOWHAT">float</field><value name="VAR"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text"><field name="TEXT">123</field></shadow><block type="KPU_analysis" id="RwuC=xTcVwZcHmx:f2/R"><field name="key">value</field><value name="VAR"><shadow xmlns="http://www.w3.org/1999/xhtml" type="variables_get"><field name="VAR">yolo2</field></shadow><block type="variables_get" id="T-wN=wLK(ZUs2K4moJR."><field name="VAR">item</field></block></value></block></value></block></value><next><block type="variables_set" id="L_G5p(8~_5g#W]H*mXK("><field name="VAR">classID</field><value name="VALUE"><block type="text_to_number" id="5QH-$L#MZ?;?F:ae%e9f"><field name="TOWHAT">int</field><value name="VAR"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text"><field name="TEXT">123</field></shadow><block type="KPU_analysis" id="*xf_@QUGhJ}J^E2OI%39"><field name="key">classid</field><value name="VAR"><shadow xmlns="http://www.w3.org/1999/xhtml" type="variables_get"><field name="VAR">yolo2</field></shadow><block type="variables_get" id="4Vd3HgJwstS+}h:|H;3`"><field name="VAR">item</field></block></value></block></value></block></value><next><block type="controls_if" id="jS}_D.`V]-Dgcgr8X)5m"><mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation><value name="IF0"><block type="logic_operation" id="DVSa^.j:?LP`F+T_Hw+V"><field name="OP">AND</field><value name="A"><block type="logic_compare" id="!jAGX,6PW]|(_ew_/O6B"><field name="OP">EQ</field><value name="A"><block type="variables_get" id="sDE=70sT%4#_yvSN?KgE"><field name="VAR">classID</field></block></value><value name="B"><block type="math_number" id="5BR-JuTFBfDK%mlcRq,T"><field name="NUM">1</field></block></value></block></value><value name="B"><block type="logic_compare" id="q|s_GBcx1o!jge[Cod(1"><field name="OP">GT</field><value name="A"><block type="variables_get" id="Fz//r|#.XGHp29Mk7Zz="><field name="VAR">value</field></block></value><value name="B"><block type="math_number" id=":UR%du;2~4VZ4=bq{By%"><field name="NUM">0.65</field></block></value></block></value></block></value><statement name="DO0"><block type="variables_set" id="v-JgsfYKb|#@*Wezx7tZ"><field name="VAR">img</field><value name="VALUE"><block type="image_draw_rectangle" id="??K`lm#emHgpqQyG]qI]" inline="true"><value name="VAR"><shadow xmlns="http://www.w3.org/1999/xhtml" type="variables_get"><field name="VAR">image</field></shadow><block type="variables_get" id="d07b`~LE+W0kn3Z?@Ud("><field name="VAR">img</field></block></value><value name="LIST"><shadow xmlns="http://www.w3.org/1999/xhtml" type="list_many_input"><field name="CONTENT">10,20,30,40</field></shadow><block type="image_rect" id="qvZq3=-a0OgV-|1l4njI"><field name="key">rect</field><value name="VAR"><shadow xmlns="http://www.w3.org/1999/xhtml" type="variables_get"><field name="VAR">rect</field></shadow><block type="variables_get" id="V4rtO543(%]#S$wEKfd`"><field name="VAR">item</field></block></value></block></value><value name="color"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number"><field name="NUM">0xFFFF</field></shadow><block type="tuple_create_with_text3" id="x0Sm(3}Z5}je^U8zRKNQ"><field name="TEXT">0,255,0</field></block></value><value name="thi"><shadow type="math_number" id="_S9LV6$ffNc(Eb4#9q]4"><field name="NUM">1</field></shadow></value><value name="fil"><shadow type="true_false" id="%*L.C}fEF+wbW2+BmrS$"><field name="flag">0</field></shadow></value></block></value><next><block type="variables_set" id="dY:CRx0(pgZnlx^6Vz],"><field name="VAR">img</field><value name="VALUE"><block type="image_draw_string" id="-T)0cb_[$;(vCH^Fd76F" inline="true"><value name="VAR"><shadow xmlns="http://www.w3.org/1999/xhtml" type="variables_get"><field name="VAR">image</field></shadow><block type="variables_get" id="`xD,{(9U42l@1j$CFrIL"><field name="VAR">img</field></block></value><value name="x0"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number"><field name="NUM">0</field></shadow><block type="image_rect" id="AD(X#AXs_z#?V.%sDL=u"><field name="key">x</field><value name="VAR"><shadow xmlns="http://www.w3.org/1999/xhtml" type="variables_get"><field name="VAR">rect</field></shadow><block type="variables_get" id="}EXRWQ-AjoVPX{-GBT3I"><field name="VAR">item</field></block></value></block></value><value name="y0"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number"><field name="NUM">0</field></shadow><block type="math_arithmetic" id="yb4q7wsy*dpr:JC}2wqr"><field name="OP">MINUS</field><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number"><field name="NUM">1</field></shadow><block type="image_rect" id="sE*^8fhL10H}cUMMp`Lx"><field name="key">y</field><value name="VAR"><shadow xmlns="http://www.w3.org/1999/xhtml" type="variables_get"><field name="VAR">rect</field></shadow><block type="variables_get" id="O`HUG+DBYWZ9P)rc99b^"><field name="VAR">item</field></block></value></block></value><value name="B"><shadow type="math_number" id="{^XqX1him80L0:2]=[ri"><field name="NUM">18</field></shadow></value></block></value><value name="tex"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text"><field name="TEXT">MixPY</field></shadow><block type="text_format_noreturn" id="tXM9;wt8D;j~t7jqS7J}"><mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation><value name="VAR"><shadow type="text" id=")}!eb4b)aF^oqsSRX1d4"><field name="TEXT">mask:{}%</field></shadow></value><value name="ADD0"><block type="math_to_int" id="nN]w:%=QeD%?HB:Itj!U"><field name="OP">round</field><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number"><field name="NUM">0.998</field></shadow><block type="math_arithmetic" id="vMnaLlCuy7h@K~!=3=PA"><field name="OP">MULTIPLY</field><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number"><field name="NUM">1</field></shadow><block type="variables_get" id="c#!~L`qe8[{x,GZ_^TxM"><field name="VAR">value</field></block></value><value name="B"><shadow type="math_number" id="$1d@VHN/??uk=JaX^^]p"><field name="NUM">100</field></shadow></value></block></value></block></value></block></value><value name="color"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number"><field name="NUM">0xFFFF</field></shadow><block type="tuple_create_with_text3" id="=2$b!s_wS%`lOaDaE:-a"><field name="TEXT">0,255,0</field></block></value><value name="scale"><shadow type="math_number" id="dib0ESDG#+G.,Hnm-]Kr"><field name="NUM">2</field></shadow></value></block></value></block></next></block></statement><statement name="ELSE"><block type="variables_set" id=".{!f[f)c5-zPXq-ufd5S"><field name="VAR">img</field><value name="VALUE"><block type="image_draw_rectangle" id="F@vIoQ`CXGjsRw=1r8M^" inline="true"><value name="VAR"><shadow xmlns="http://www.w3.org/1999/xhtml" type="variables_get"><field name="VAR">image</field></shadow><block type="variables_get" id="*uJf80MVov=PbJ)wOB)A"><field name="VAR">img</field></block></value><value name="LIST"><shadow xmlns="http://www.w3.org/1999/xhtml" type="list_many_input"><field name="CONTENT">10,20,30,40</field></shadow><block type="image_rect" id="3bH$$:h~M6!mV}_.S/dL"><field name="key">rect</field><value name="VAR"><shadow xmlns="http://www.w3.org/1999/xhtml" type="variables_get"><field name="VAR">rect</field></shadow><block type="variables_get" id="lsf_YXzuM#2Wh=wTp_?v"><field name="VAR">item</field></block></value></block></value><value name="color"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number"><field name="NUM">0xFFFF</field></shadow><block type="tuple_create_with_text3" id="PK-=}%6!dkIYi3Mty`^c"><field name="TEXT">255,0,0</field></block></value><value name="thi"><shadow type="math_number" id="7%)3Z9y~*W6^|~Z1cUsV"><field name="NUM">1</field></shadow></value><value name="fil"><shadow type="true_false" id="6Ki0kS)@PyNI[+R3e^B?"><field name="flag">0</field></shadow></value></block></value><next><block type="variables_set" id="aI1]1`5wyS[H%ZR+kJS."><field name="VAR">img</field><value name="VALUE"><block type="image_draw_string" id="Xi#:iviUG~/.(lb[zSf(" inline="true"><value name="VAR"><shadow xmlns="http://www.w3.org/1999/xhtml" type="variables_get"><field name="VAR">image</field></shadow><block type="variables_get" id="{xfSZ@cN#@|-,u6y|l8/"><field name="VAR">img</field></block></value><value name="x0"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number"><field name="NUM">0</field></shadow><block type="image_rect" id="zAmMk`!W%b()*Bz)/i{A"><field name="key">x</field><value name="VAR"><shadow xmlns="http://www.w3.org/1999/xhtml" type="variables_get"><field name="VAR">rect</field></shadow><block type="variables_get" id="D8W[Z3/azSyg@o8e-m}d"><field name="VAR">item</field></block></value></block></value><value name="y0"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number"><field name="NUM">0</field></shadow><block type="math_arithmetic" id="`(tuFHSVXx.scGW3;hOk"><field name="OP">MINUS</field><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number"><field name="NUM">1</field></shadow><block type="image_rect" id="*R~x@~b;#O,Uwyre#sFf"><field name="key">y</field><value name="VAR"><shadow xmlns="http://www.w3.org/1999/xhtml" type="variables_get"><field name="VAR">rect</field></shadow><block type="variables_get" id="w/8gh.y$:UpJF[V*FrA$"><field name="VAR">item</field></block></value></block></value><value name="B"><shadow type="math_number" id="m93.L]91ch%?//-NF=qk"><field name="NUM">18</field></shadow></value></block></value><value name="tex"><shadow xmlns="http://www.w3.org/1999/xhtml" type="text"><field name="TEXT">MixPY</field></shadow><block type="text_format_noreturn" id="8mfxtxNt1j]#aq$P(BO)"><mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation><value name="VAR"><shadow type="text" id="I]PVhW/O{9=0k?ekn1qK"><field name="TEXT">no mask:{}%</field></shadow></value><value name="ADD0"><block type="math_to_int" id=".UpXuPi/QkAtjYP$vqLN"><field name="OP">round</field><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number"><field name="NUM">0.998</field></shadow><block type="math_arithmetic" id="|UPxIS%^|%M|a,w3[(Wo"><field name="OP">MULTIPLY</field><value name="A"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number"><field name="NUM">1</field></shadow><block type="variables_get" id="uDw;9%h[tX~JR!r1$qm{"><field name="VAR">value</field></block></value><value name="B"><shadow type="math_number" id="cUBBV[{PoU3bRK#$MDEP"><field name="NUM">100</field></shadow></value></block></value></block></value></block></value><value name="color"><shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number"><field name="NUM">0xFFFF</field></shadow><block type="tuple_create_with_text3" id="r,+mZTdxWZxzy0ND%35j"><field name="TEXT">255,0,0</field></block></value><value name="scale"><shadow type="math_number" id="bBfX4V^EEJMH)6S,a69t"><field name="NUM">2</field></shadow></value></block></value></block></next></block></statement></block></next></block></next></block></statement></block></statement><next><block type="lcd_display" id="eAQtYW^r:26SnNIrpSdn"><value name="img"><shadow xmlns="http://www.w3.org/1999/xhtml" type="factory_block_return"><field name="VALUE">image</field></shadow><block type="variables_get" id="@gsPnDRl?@-Zv(kLni,5"><field name="VAR">img</field></block></value></block></next></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block></xml>