-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathatom.xml
465 lines (241 loc) · 265 KB
/
atom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Aciano</title>
<subtitle>Aciano.top</subtitle>
<link href="https://aciano.top/atom.xml" rel="self"/>
<link href="https://aciano.top/"/>
<updated>2024-12-29T10:00:46.048Z</updated>
<id>https://aciano.top/</id>
<author>
<name>Aciano</name>
</author>
<generator uri="https://hexo.io/">Hexo</generator>
<entry>
<title>2024年度总结</title>
<link href="https://aciano.top/posts/2024-report/"/>
<id>https://aciano.top/posts/2024-report/</id>
<published>2024-12-29T04:23:58.000Z</published>
<updated>2024-12-29T10:00:46.048Z</updated>
<content type="html"><![CDATA[<h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><p>收到阿里云催续费域名的邮件时就知道快要过年了。怎么时间过得这么快呀,感觉写去年的年度总结还是在昨天。</p><p>回看今年的朋友圈和相册,总有种错觉,我这一年过得好不真实,看着那些在学校里参加活动的合照、去其他城市参加比赛的照片,</p><p>这些经历过的事情在我的脑海里如梦幻影,好像曾经发生过,就像昨天刚经历完一样;却又好像没发生过,让我不禁怀疑这些事情真的是今年经历过的吗?</p><p>可能是忙碌且充实的高中生活填满了我的生活罢,想总结一整年,却又因经历过的事情太多,多到不知从哪开始回忆。</p><p>转眼又是25年,但记忆仿佛还停留在23年…</p><h1 id="娱乐"><a href="#娱乐" class="headerlink" title="娱乐"></a>娱乐</h1><div class="gallery"> <div class="fj-gallery page_img_lazyload data" data-rowHeight="220" data-limit="10"> <span class="gallery-data">[{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/d1.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/d2.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/d3.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/d4.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/d5.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/d6.jpg","alt":""}]</span> </div><button class="gallery-load-more" style="opacity:0"> <span>加载更多</span> <i class="anzhiyufont anzhiyu-icon-arrow-down"></i> </button></div><h2 id="阅读"><a href="#阅读" class="headerlink" title="阅读"></a>阅读</h2><p>今年读了<code>32</code>本书,翻过近万页,也算是超额完成了去年设下的目标。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/d7.jpg" width="50%" height="50%"><p>比较喜欢《百年孤独》、《我与地坛》、《牛虻》、《森林、冰河和鲸》和《空之境界》这几本书。</p><p>以下摘录了一些当时读完后写下的感受和评价。</p><div class="tabs" id="test3"><ul class="nav-tabs"><button type="button" class="tab active" data-href="test3-1">百年孤独</button><button type="button" class="tab " data-href="test3-2">我与地坛</button><button type="button" class="tab " data-href="test3-3">牛虻</button><button type="button" class="tab " data-href="test3-4">森林、冰河和鲸</button></ul><div class="tab-contents"><div class="tab-item-content active" id="test3-1"><p>只是通读了一遍,便深深被吸引。</p><p>其实也没有网上说的那般如此难读,人名长是长了点而且重复,不过我觉得单看故事情节还是很容易分辨的。</p><p>以马孔多的整个社会变革看出了对历史的影射,虽然对拉美历史不够了解,不过从愚昧到进步大抵都是相同的吧,从开始的磁铁到冰块到金属再到火车等等,有一种上帝视角的感觉,比历史课本上令人更印象深刻。</p><p>许多事物都在不断重复,人名、社会、家族命运,都逃不出循环之轮,一种宿命感油然而生。</p><p>每一代人都有立体的形象,但都逃不掉几乎相同的命运,不过看完后还是没法很好的理解这种孤独,看出了何塞·阿尔卡蒂奥·布恩迪亚作为唯一进步和科学的开篇人最终只能沦落到无人理解被绑树上,上校战败晚年只能无奈做小金鱼度生最后被人淡忘,可能境界还不够,以后找时间再读多两遍。</p><p>魔幻现实主义太有意思了。</p></div><div class="tab-item-content" id="test3-2"><p>“但是太阳,它每时每刻都是夕阳也都是旭日。当它熄灭着走下山去收尽苍凉残照之际,正是它在另一面燃烧着爬上山巅布散烈烈朝辉之时。那一天,我也将沉静着走下山去,扶着我的拐杖。有一天,在某一处山洼里,势必会跑上来一个欢蹦的孩子,抱着他的玩具。</p><p>当然,那不是我。<br>但是,那不是我吗? ”</p><p>看完整书,感慨于作者对生命的思考和看法,初中时仅仅阅读过《秋天的怀念》,彼时还不能很好理解作者的思想感情,只是机械地抄写着老师给出的标准答案。现在,我想我有了新的理解。</p></div><div class="tab-item-content" id="test3-3"><p>蒙塔奈利祝圣时关于血液的描写以及与圣体对话、间插牛虻死亡的场景,情绪层层铺垫,给我留下了深刻印象。</p><p>故事中体现的爱情部分也很精彩,矛盾的心理和对立的情绪实在是震撼。</p></div><div class="tab-item-content" id="test3-4"><p>合上这本书时,我的心情久久不能平静。</p><p>作者清新脱俗的语言,虽然平淡,但狠狠地拨动了我的心弦。先说里面的摄影作品吧,极光、北极熊、花草树木、冰川以及对人的捕捉,太令我震撼了,仿佛跟随着作者的镜头完成了一次旅行,后来又上网搜索了下作者的其他摄影作品,连连惊叹。</p><p>文中对于渡鸦的传说故事、图腾柱的描写以及作者对于社会、环境的看法和态度都令我久久驻足和深思。</p><p>大爱此书,我也想去阿拉斯加看北极熊了呢。</p></div></div><div class="tab-to-top"><button type="button" aria-label="scroll to top"><i class="anzhiyufont anzhiyu-icon-arrow-up"></i></button></div></div><h2 id="电影"><a href="#电影" class="headerlink" title="电影"></a>电影</h2><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/d8.jpg" width="50%" height="50%"><p>今年看过的电影比较喜欢的有《三傻大闹宝莱坞》、《南海十三郎》、《怦然心动》和《钢琴家》。</p><p>专门写了篇影评:</p><div calss='anzhiyu-tag-link'><a class="tag-Link" target="_blank" href="https://aciano.top/posts/3idlots/"> <div class="tag-link-tips">引用站外地址</div> <div class="tag-link-bottom"> <div class="tag-link-left" style="background-image: url(https://aciano.top/favicon.ico);"></div> <div class="tag-link-right"> <div class="tag-link-title">《三傻大闹宝莱坞》——被片名耽误的好片</div> <div class="tag-link-sitename">一篇关于《三傻大闹宝莱坞》的影评,十分推荐这部好片!别被片名耽误啦。</div> </div> <i class="anzhiyufont anzhiyu-icon-angle-right"></i> </div> </a></div><p>《南海十三郎》看完之后感触也很深:</p><div class="tabs" id="test3"><ul class="nav-tabs no-default"><button type="button" class="tab " data-href="test3-1">点我看看</button></ul><div class="tab-contents"><div class="tab-item-content" id="test3-1"><p>许久之前就已听过南海十三郎的传奇名号,但并不知其具体身世,偶然间刷到关于这部电影的解说,被深深吸引,故找到原片认真观影。</p><p>作为一名城里长大的广东人,对粤剧只有偶尔在老家路过戏台驻足观赏一阵的模糊印象,从来不觉戏剧有何艺术所在,但这部电影改变了我的看法,如《帝女花》中的“落花满天蔽月光,借一杯附荐凤台上”;如剧中茶馆重逢中的“我再见恩师心中百般痛,仿似宝剑泥絮尘半封,昔日壮志与才气全告终,江中雪,泪影两朦胧。辜负伯牙琴,你莫个难自控,知音再复寻,俗世才未众”,配上粤语的音韵,很有魅力,加上情节的起伏不禁让人动情。</p><p>人生在世睇得清楚又点样,天才只会以悲剧收场,大喜大悲,人生无常,这才是真正的现实吧。</p></div></div><div class="tab-to-top"><button type="button" aria-label="scroll to top"><i class="anzhiyufont anzhiyu-icon-arrow-up"></i></button></div></div><p>还看了部超级大烂片《749局》,刚看了眼评分已经到3.3了,超级心疼我那四十多块钱啊。</p><h2 id="音乐"><a href="#音乐" class="headerlink" title="音乐"></a>音乐</h2><p>3月份的时候把音乐账号绑定到了家里的音箱上,然后我妈在家一直循环播放大悲咒,直接干到年度第一歌曲了😴</p><p>年度歌手连着3年还是Eason啊。</p><p>8月份放暑假的时候认真听了王菲的所有粤语专辑,发现了超多宝藏。</p><div class="gallery"> <div class="fj-gallery page_img_lazyload data" data-rowHeight="220" data-limit="10"> <span class="gallery-data">[{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/music1.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/music2.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/music3.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/music4.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/music5.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/music6.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/music7.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/music8.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/music9.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/music10.jpg","alt":""}]</span> </div><button class="gallery-load-more" style="opacity:0"> <span>加载更多</span> <i class="anzhiyufont anzhiyu-icon-arrow-down"></i> </button></div><h2 id="游戏"><a href="#游戏" class="headerlink" title="游戏"></a>游戏</h2><p>年初经过世荣哥的推荐(这段话好像在去年出现过),趁着寒假的宝贵时光,花60h推完了《梦灯花 Noctuary》,为此还认真写了篇体验:</p><div calss='anzhiyu-tag-link'><a class="tag-Link" target="_blank" href="https://aciano.top/posts/Noctuary/"> <div class="tag-link-tips">引用站外地址</div> <div class="tag-link-bottom"> <div class="tag-link-left" style="background-image: url(https://aciano.top/favicon.ico);"></div> <div class="tag-link-right"> <div class="tag-link-title">花开花满原,愿此梦不尽——《梦灯花 Noctuary》游戏体验</div> <div class="tag-link-sitename">一篇关于《梦灯花 Noctuary》的游戏评测,十分推荐这个游戏!冲就对啦。</div> </div> <i class="anzhiyufont anzhiyu-icon-angle-right"></i> </div> </a></div><p>另外玩了《使命召唤8:现代战争3》,不愧是经典。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/game.jpg" width="50%" height="50%"><h1 id="运动"><a href="#运动" class="headerlink" title="运动"></a>运动</h1><p>今年有记录的一共骑了<code>67.1</code>公里,骑行带来的感受真的与众不同,你可以选择慢下来,感受街边的宁静;也可以选择快起来,感受风儿从你耳边呼啸而过的刺激,放假如果有足够时间出去骑一圈真的可以放松掉在校学习的疲惫。</p><p>值得庆幸的是,今年市区修路少了很多,楼下的主干道因为去年重新铺过今年骑得非常舒服,滨湖后半段的小区也施工完了,可以完整地绕着滨湖骑完整的一圈了!</p><p>不过去年定下的目标:<code>尝试一次长距离的骑行(50km+)</code>,因为种种原因,好像没能成功实现呢。</p><p>曾经打算骑去雷州,差不多有50公里吧,不过后来意识到这也不是一段很轻松的事情,毕竟来回就100公里了啊喂,自己可能还没那个能力实现。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/sport1.jpg" width="50%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/sport2.jpg" width="50%" height="50%"><h1 id="比赛"><a href="#比赛" class="headerlink" title="比赛"></a>比赛</h1><p>今年参加了三个主要的比赛,最大的惊喜莫过于获得青创赛的专项奖<code>华南农业大学丁颖创新奖</code>,有2000元奖金,虽然<psw>扣除掉作品所用成本平摊下来分到的并不多...</psw>。</p><p>有幸在深圳结识一位同乡的学长,于是他盛情邀请我去深大逛一逛,浅尝了下大学饭堂,果然是好吃又不贵。他还叫来另外两个同在深大的高中同学,他们一起带我逛遍了两个校区,从下午逛到晚上,去了图书馆、体育场、物理实验室、演出厅还有宿舍哈哈哈。不得不说有钱的大学是不一样,配置有够豪华。</p><table><thead><tr><th>比赛名称</th><th>获奖情况</th></tr></thead><tbody><tr><td>第39届湛江经济开发区青少年科技创新大赛</td><td>科技创新成果 一等奖</td></tr><tr><td>第39届湛江市青少年科技创新大赛</td><td>科技创新成果 一等奖</td></tr><tr><td>第39届湛江市青少年科技创新大赛</td><td>第39届广东省青少年科技创新大赛湛江科技成果选推项目</td></tr><tr><td>第39届广东省青少年科技创新大赛</td><td>科技创新成果 三等奖</td></tr><tr><td>第39届广东省青少年科技创新大赛</td><td>华南农业大学丁颖创新奖</td></tr><tr><td>湛江市学生信息科技创新大赛</td><td>创意智造类 一等奖</td></tr><tr><td>粤澳学生信息科技创新大赛</td><td>创意智造类 二等奖</td></tr><tr><td>全国青少年劳动技能与智能设计大赛</td><td>银奖</td></tr><tr><td>全国版图知识竞赛</td><td>二等奖</td></tr></tbody></table><div class="gallery"> <div class="fj-gallery page_img_lazyload data" data-rowHeight="220" data-limit="10"> <span class="gallery-data">[{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/bisd1.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/bisd2.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/bisd3.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/bisd4.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/bisd5.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/bisd6.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/bisd7.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/bisd8.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/bisd9.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/bisd10.jpg","alt":""}]</span> </div><button class="gallery-load-more" style="opacity:0"> <span>加载更多</span> <i class="anzhiyufont anzhiyu-icon-arrow-down"></i> </button></div><h1 id="高中"><a href="#高中" class="headerlink" title="高中"></a>高中</h1><h2 id="杂谈"><a href="#杂谈" class="headerlink" title="杂谈"></a>杂谈</h2><p>去年写年度总结的时候正值分班后没多久,对新关系的处理非常迷茫,经过一年时间的相处,共同经历了排联、篮联、体育节和朗诵比赛等集体活动,和班上的同学玩得越来越好,大家的关系也越来越紧密和团结。</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024%E5%B9%B4%E5%BA%A6%E6%80%BB%E7%BB%93/20b1.jpg"></p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024%E5%B9%B4%E5%BA%A6%E6%80%BB%E7%BB%93/20b2.jpg"></p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024%E5%B9%B4%E5%BA%A6%E6%80%BB%E7%BB%93/20b3.jpg"></p><h1 id="生活"><a href="#生活" class="headerlink" title="生活"></a>生活</h1><p>年初寒假时通过三轮考核,成为了学校国旗护卫队的一名正式队员,后来通过竞选当上了队长。</p><p>经历过三届见面会和换届仪式后,我们26届接替了25届的使命,负责每周的升旗礼的升旗任务,同时顺利完成了市运会和体育节的升旗任务。</p><p>经历一年时间的磨合,咱们也算是实力大增,默契度直线上升,结识了一群有爱的队友们,一次次的训练和团建都让大家的羁绊越来越深。</p><p>很快27届也要组成一支队伍了,希望他们能好好学习动作,更好地继承我们吧!</p><p>当然最大的期望是明年的省赛一等奖。</p><div class="gallery"> <div class="fj-gallery page_img_lazyload data" data-rowHeight="220" data-limit="10"> <span class="gallery-data">[{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/gohu1.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/gohu2.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/gohu3.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/gohu4.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/gohu5.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/gohu6.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/gohu7.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/gohu8.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/gohu9.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/gohu10.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/gohu11.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/gohu12.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/gohu13.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.17/post/2024年度总结/gohu14.jpg","alt":""}]</span> </div><button class="gallery-load-more" style="opacity:0"> <span>加载更多</span> <i class="anzhiyufont anzhiyu-icon-arrow-down"></i> </button></div><h1 id="目标"><a href="#目标" class="headerlink" title="目标"></a>目标</h1><ul><li><p>年级排名进入前300名</p></li><li><p>数学及格</p></li><li><p>yzjbyibufavjwithvlg</p></li><li><p>多见几个许久未见的朋友</p></li></ul><h1 id="结语"><a href="#结语" class="headerlink" title="结语"></a>结语</h1><p>未完待续…</p><h1 id="补档"><a href="#补档" class="headerlink" title="补档"></a>补档</h1><p>今年学校把艺术节凑成元旦晚会搞,但偏偏要在31号晚上搞,还要被抓去当志愿者,不知道到时晚上十一点能回到家不?…</p><p>希望今年也能看到一些漂亮的烟花!</p><blockquote><p>部分数据来源于豆瓣、网易云音乐、微信、不背单词、华为运动健康</p></blockquote><blockquote><p>2024年12月29日写于湛江</p></blockquote>]]></content>
<summary type="html"><h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><p>收到阿里云催续费域名的邮件时就知道快要过年了。怎么时间过得这么快呀,感觉写去年的年度总结还是在昨天。</p>
<p>回看今年的朋友圈和相册,</summary>
<category term="个人文章" scheme="https://aciano.top/categories/%E4%B8%AA%E4%BA%BA%E6%96%87%E7%AB%A0/"/>
<category term="个人文章" scheme="https://aciano.top/tags/%E4%B8%AA%E4%BA%BA%E6%96%87%E7%AB%A0/"/>
</entry>
<entry>
<title>传护旗薪火,承青春华章|湛江市第二中学国旗护卫队招新!</title>
<link href="https://aciano.top/posts/guohu/"/>
<id>https://aciano.top/posts/guohu/</id>
<published>2024-09-01T04:23:58.000Z</published>
<updated>2024-09-08T05:21:02.074Z</updated>
<content type="html"><![CDATA[<h1 id="湛江市第二中学"><a href="#湛江市第二中学" class="headerlink" title="湛江市第二中学"></a>湛江市第二中学</h1><h1 id="国旗护卫队"><a href="#国旗护卫队" class="headerlink" title="国旗护卫队"></a>国旗护卫队</h1><h1 id="招新啦!"><a href="#招新啦!" class="headerlink" title="招新啦!"></a>招新啦!</h1><p>你是否渴望过,</p><p>成为升旗仪式中那份荣耀的传递者?</p><p>你是否梦想过,</p><p>让自己的青春与国家的荣耀紧密相连?</p><p>你是否憧憬过,</p><p>像三军仪仗队一样,身着旗服,护卫着五星红旗?</p><p>你是否向往过,</p><p>与一群志同道合的伙伴并肩作战?</p><hr><center>昂首阔步,铿锵有力</center><center>奋发向前,青春无悔</center><center>朝霞映照,国旗轻抚晨曦</center><center>暮色渐沉,汗水书写华章</center><center>以坚守与担当,护五星红旗迎风飘扬</center><center>这里就是—— 湛江市第二中学国旗护卫队 !</center><p><img src="https://bu.dusays.com/2024/09/08/66dd23c152e12.jpg" alt="1.jpg"></p><p><img src="https://bu.dusays.com/2024/09/08/66dd23c5c96c3.jpg" alt="2.jpg"></p><p>国旗护卫队,正是你实现梦想的舞台,</p><p>我们在这里,</p><p>用行动诠释对祖国的热爱,</p><p>用青春书写对国旗的敬意,</p><p>用汗水浇灌每一次升旗仪式的庄严与神圣,</p><p>用每一次国旗的缓缓上升,</p><p>见证我们对梦想的执着追求与不懈努力。</p><h1 id="一、队伍简介"><a href="#一、队伍简介" class="headerlink" title="一、队伍简介"></a>一、队伍简介</h1><p>湛江市第二中学国旗护卫队,隶属于校团委风纪部,以<strong>护卫国旗</strong>为己任,以<strong>弘扬爱国主义精神</strong>为目标,力求展现当代中学生<strong>热爱祖国,积极向上</strong>的精神风貌。是一支团结友爱,纪律严明,崇尚进步,有组织有纪律,充满活力和热血的队伍。</p><p>国旗护卫队的日常工作包括每周一早上升旗任务;国家重大节日、学校体育节、艺术节等大型活动的升旗仪式;代表学校参加各种外校和省、市级的大型比赛。</p><div class="gallery"> <div class="fj-gallery page_img_lazyload data" data-rowHeight="220" data-limit="10"> <span class="gallery-data">[{"url":"https://bu.dusays.com/2024/09/08/66dd23fe47d85.jpg","alt":"3-1.jpg"},{"url":"https://bu.dusays.com/2024/09/08/66dd23c06c06d.jpg","alt":"3-2.jpg"},{"url":"https://bu.dusays.com/2024/09/08/66dd23c36298b.jpg","alt":"3-3.jpg"},{"url":"https://bu.dusays.com/2024/09/08/66dd23c1e709e.jpg","alt":"3-4.jpg"}]</span> </div><button class="gallery-load-more" style="opacity:0"> <span>加载更多</span> <i class="anzhiyufont anzhiyu-icon-arrow-down"></i> </button></div><h1 id="二、队内荣誉"><a href="#二、队内荣誉" class="headerlink" title="二、队内荣誉"></a>二、队内荣誉</h1><div class="gallery"> <div class="fj-gallery page_img_lazyload data" data-rowHeight="220" data-limit="10"> <span class="gallery-data">[{"url":"https://bu.dusays.com/2024/09/08/66dd23c1a4196.jpg","alt":"4-1.jpg"},{"url":"https://bu.dusays.com/2024/09/08/66dd23c3c6381.jpg","alt":"4-2.jpg"}]</span> </div><button class="gallery-load-more" style="opacity:0"> <span>加载更多</span> <i class="anzhiyufont anzhiyu-icon-arrow-down"></i> </button></div><p><img src="https://bu.dusays.com/2024/09/08/66dd23c68a2bd.jpg" alt="5.jpg"></p><p><img src="https://bu.dusays.com/2024/09/08/66dd23c2c8d7d.jpg" alt="6.jpg"></p><p><img src="https://bu.dusays.com/2024/09/08/66dd23c8a22a8.jpg" alt="7.jpg"></p><p><img src="https://bu.dusays.com/2024/09/08/66dd23d208026.jpg" alt="8.jpg"></p><p>在2022年广东省学校国旗护卫队展示交流活动中,我校国旗护卫队获得了省二等奖;</p><p>在第三届广东省学校国防教育成果交流展示活动中,我校国旗护卫队以优异的表现,从来自广东省各地市区的54所高中学校代表队中脱颖而出,勇夺高中阶段学校国旗护卫队比赛<strong>决赛第一名</strong>!</p><h1 id="三、福利"><a href="#三、福利" class="headerlink" title="三、福利"></a>三、福利</h1><p>加入国护,你将收获——</p><ol><li><p>参与学校各类活动升旗仪式的机会;</p></li><li><p>参与省级国旗护卫队展示交流赛等比赛并获奖的机会;</p></li><li><p>由学校购置的定制旗服;</p></li><li><p>国护的正式队员,训练、升旗都可以获得志愿时长;</p></li><li><p>额外的入团名额;</p></li><li><p>高二将评选“优秀旗手”称号,可作为校级荣誉记录个人档案;</p></li><li><p>结识一群志同道合的伙伴,拥有坚强的意志和强健的体魄。</p></li></ol><h1 id="四、招新要求"><a href="#四、招新要求" class="headerlink" title="四、招新要求"></a>四、招新要求</h1><p>(1)热爱祖国,拥护中国共产党的领导;</p><p>(2)尊重并爱护国旗,遵守《中华人民共和国国旗法》;</p><p>(3)思想积极,意志坚定,品质优良,组织纪律性强,有集体荣誉感,具有崇高的使命感和奉献精神; </p><p>(4)身体健康,动作协调,无任何不适宜训练的疾病。男生身高不低于170cm,女生身高不低于160cm。</p><h1 id="五、写在最后"><a href="#五、写在最后" class="headerlink" title="五、写在最后"></a>五、写在最后</h1><p><img src="https://bu.dusays.com/2024/09/08/66dd23d51a7c3.jpg" alt="9.jpg"></p><script src="https://fast.wistia.com/embed/medias/49sf75bf21.jsonp" async></script><script src="https://fast.wistia.com/assets/external/E-v1.js" async></script><div class="wistia_responsive_padding" style="padding:56.67% 0 0 0;position:relative;"><div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;"><div class="wistia_embed wistia_async_49sf75bf21 seo=true videoFoam=true" style="height:100%;position:relative;width:100%"><div class="wistia_swatch" style="height:100%;left:0;opacity:0;overflow:hidden;position:absolute;top:0;transition:opacity 200ms;width:100%;"><img src="https://fast.wistia.com/embed/medias/49sf75bf21/swatch" style="filter:blur(5px);height:100%;object-fit:contain;width:100%;" alt="" aria-hidden="true" onload="this.parentNode.style.opacity=1;" /></div></div></div></div><script src="https://fast.wistia.com/embed/medias/opnpmpv7l6.jsonp" async></script><script src="https://fast.wistia.com/assets/external/E-v1.js" async></script><div class="wistia_responsive_padding" style="padding:56.25% 0 0 0;position:relative;"><div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;"><div class="wistia_embed wistia_async_opnpmpv7l6 seo=true videoFoam=true" style="height:100%;position:relative;width:100%"><div class="wistia_swatch" style="height:100%;left:0;opacity:0;overflow:hidden;position:absolute;top:0;transition:opacity 200ms;width:100%;"><img src="https://fast.wistia.com/embed/medias/opnpmpv7l6/swatch" style="filter:blur(5px);height:100%;object-fit:contain;width:100%;" alt="" aria-hidden="true" onload="this.parentNode.style.opacity=1;" /></div></div></div></div><hr><center>着一身荣光,撒青春汗水。</center><center>以我火红青春,谱写国旗礼赞,</center><center>以我热忱生命,捍卫国旗尊严。</center><center>赤诚如我国护,你我相知于国旗下。</center><center>湛江市第二中学国旗护卫队,期待你的加入!</center>]]></content>
<summary type="html"><h1 id="湛江市第二中学"><a href="#湛江市第二中学" class="headerlink" title="湛江市第二中学"></a>湛江市第二中学</h1><h1 id="国旗护卫队"><a href="#国旗护卫队" class="headerlink" ti</summary>
<category term="个人文章" scheme="https://aciano.top/categories/%E4%B8%AA%E4%BA%BA%E6%96%87%E7%AB%A0/"/>
<category term="个人文章" scheme="https://aciano.top/tags/%E4%B8%AA%E4%BA%BA%E6%96%87%E7%AB%A0/"/>
</entry>
<entry>
<title>批量下载网易云歌单歌曲和歌词</title>
<link href="https://aciano.top/posts/xzwyys/"/>
<id>https://aciano.top/posts/xzwyys/</id>
<published>2024-07-14T04:23:58.000Z</published>
<updated>2024-08-08T11:41:09.633Z</updated>
<content type="html"><![CDATA[<h1 id="歌词下载工具-ZonyLrcToolsX"><a href="#歌词下载工具-ZonyLrcToolsX" class="headerlink" title="歌词下载工具 ZonyLrcToolsX"></a>歌词下载工具 ZonyLrcToolsX</h1><div calss='anzhiyu-tag-link'><a class="tag-Link" target="_blank" href="https://github.com/real-zony/ZonyLrcToolsX"> <div class="tag-link-tips">引用站外地址</div> <div class="tag-link-bottom"> <div class="tag-link-left" style="background-image: url(https://img.tukuppt.com/png_preview/00/32/92/cXqzfc4Jhz.jpg);"></div> <div class="tag-link-right"> <div class="tag-link-title">GitHub - real-zony/ZonyLrcToolsX</div> <div class="tag-link-sitename">一个能够方便地下载歌词的小软件✨</div> </div> <i class="anzhiyufont anzhiyu-icon-angle-right"></i> </div> </a></div><p>把想要下载歌词的歌曲放在同一个文件夹。</p><ol><li><p>打开软件所在文件夹,在文件夹右键打开菜单,选择在终端中打开。</p></li><li><p>输入以下命令,歌词目录替换成歌曲所在文件夹路径,数字替换成下载线程数:</p></li></ol><figure class="highlight cmd"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">./ZonyLrcTools.Cli.exe download -d "歌曲目录" -l -n 数字</span><br></pre></td></tr></table></figure><ol start="3"><li>回车,开始下载,正常情况歌词会下载到歌曲所在文件夹。</li></ol><p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.13/post/%E6%89%B9%E9%87%8F%E4%B8%8B%E8%BD%BD%E7%BD%91%E6%98%93%E4%BA%91%E6%AD%8C%E5%8D%95%E6%AD%8C%E6%9B%B2%E5%92%8C%E6%AD%8C%E8%AF%8D/lrc.png" alt="lrc.png"></p><h1 id="Music-Download"><a href="#Music-Download" class="headerlink" title="Music_Download"></a>Music_Download</h1><div calss='anzhiyu-tag-link'><a class="tag-Link" target="_blank" href="https://github.com/Java-S12138/Music_Download"> <div class="tag-link-tips">引用站外地址</div> <div class="tag-link-bottom"> <div class="tag-link-left" style="background-image: url(https://img.tukuppt.com/png_preview/00/32/92/cXqzfc4Jhz.jpg);"></div> <div class="tag-link-right"> <div class="tag-link-title">GitHub - Music_Download✨</div> <div class="tag-link-sitename">Music_Download</div> </div> <i class="anzhiyufont anzhiyu-icon-angle-right"></i> </div> </a></div><p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.13/post/%E6%89%B9%E9%87%8F%E4%B8%8B%E8%BD%BD%E7%BD%91%E6%98%93%E4%BA%91%E6%AD%8C%E5%8D%95%E6%AD%8C%E6%9B%B2%E5%92%8C%E6%AD%8C%E8%AF%8D/download.png" alt="download.png"></p><h1 id="Music-Tag"><a href="#Music-Tag" class="headerlink" title="Music Tag"></a>Music Tag</h1><div calss='anzhiyu-tag-link'><a class="tag-Link" target="_blank" href="https://wwc.lanzouy.com/ik0lo0ae7bcf"> <div class="tag-link-tips">引用站外地址</div> <div class="tag-link-bottom"> <div class="tag-link-left" style="background-image: url(https://ts1.cn.mm.bing.net/th?id=ODLS.41ae9b13-83e4-411d-9d68-44ff16492160&w=32&h=32&qlt=90&pcl=fffffa&o=6&pid=1.2);"></div> <div class="tag-link-right"> <div class="tag-link-title">lanzou.com</div> <div class="tag-link-sitename">MusicTag v1.0.9.0.7z</div> </div> <i class="anzhiyufont anzhiyu-icon-angle-right"></i> </div> </a></div><p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.13/post/%E6%89%B9%E9%87%8F%E4%B8%8B%E8%BD%BD%E7%BD%91%E6%98%93%E4%BA%91%E6%AD%8C%E5%8D%95%E6%AD%8C%E6%9B%B2%E5%92%8C%E6%AD%8C%E8%AF%8D/tag.png" alt="tag.png"></p>]]></content>
<summary type="html">关于如何批量下载网易云歌单歌曲和歌词的教程。</summary>
<category term="PC" scheme="https://aciano.top/categories/PC/"/>
<category term="PC" scheme="https://aciano.top/tags/PC/"/>
</entry>
<entry>
<title>Python获取RGB和HSV值并框出对应颜色</title>
<link href="https://aciano.top/posts/rgbandhsv/"/>
<id>https://aciano.top/posts/rgbandhsv/</id>
<published>2024-05-26T04:23:58.000Z</published>
<updated>2024-06-01T17:23:58.000Z</updated>
<content type="html"><![CDATA[<h1 id="获取RGB值"><a href="#获取RGB值" class="headerlink" title="获取RGB值"></a>获取RGB值</h1><h2 id="使用PIL工具"><a href="#使用PIL工具" class="headerlink" title="使用PIL工具"></a>使用PIL工具</h2><figure class="highlight py"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">from</span> PIL <span class="keyword">import</span> Image</span><br><span class="line"></span><br><span class="line"><span class="comment"># 打开图像文件</span></span><br><span class="line">image = Image.<span class="built_in">open</span>(<span class="string">'../image/031301.png'</span>)</span><br><span class="line"></span><br><span class="line"><span class="comment"># 获取指定位置的像素颜色</span></span><br><span class="line">rgb = image.getpixel((<span class="number">100</span>, <span class="number">100</span>))</span><br><span class="line"></span><br><span class="line"><span class="built_in">print</span>(<span class="string">"RGB值为:"</span>, rgb)</span><br></pre></td></tr></table></figure><h2 id="使用OpenCV"><a href="#使用OpenCV" class="headerlink" title="使用OpenCV"></a>使用OpenCV</h2><figure class="highlight py"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> cv2</span><br><span class="line"></span><br><span class="line"><span class="comment"># 读取图像</span></span><br><span class="line">image = cv2.imread(<span class="string">'../image/031301.png'</span>)</span><br><span class="line"></span><br><span class="line"><span class="comment"># 获取指定位置的像素颜色</span></span><br><span class="line">(b, g, r) = image[<span class="number">100</span>, <span class="number">100</span>]</span><br><span class="line"></span><br><span class="line"><span class="built_in">print</span>(<span class="string">"RGB值为: ({}, {}, {})"</span>.<span class="built_in">format</span>(r, g, b))</span><br></pre></td></tr></table></figure><h1 id="转换为hsv值并计算上下限"><a href="#转换为hsv值并计算上下限" class="headerlink" title="转换为hsv值并计算上下限"></a>转换为hsv值并计算上下限</h1><figure class="highlight py"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 导入所需的库</span></span><br><span class="line"><span class="keyword">import</span> numpy <span class="keyword">as</span> np</span><br><span class="line"><span class="keyword">import</span> cv2</span><br><span class="line"><span class="comment"># 为颜色定义一个numpy.ndarray</span></span><br><span class="line">green = np.uint8([[[<span class="number">0</span>, <span class="number">255</span>, <span class="number">0</span>]]]) <span class="comment"># 在此插入要转换为HSV的BGR值</span></span><br><span class="line"><span class="comment"># 将颜色转换为HSV</span></span><br><span class="line">hsvGreen = cv2.cvtColor(green, cv2.COLOR_BGR2HSV)</span><br><span class="line"><span class="comment"># 显示颜色的值</span></span><br><span class="line"><span class="built_in">print</span>(<span class="string">"BGR of Green:"</span>, green)</span><br><span class="line"><span class="built_in">print</span>(<span class="string">"HSV of Green:"</span>, hsvGreen)</span><br><span class="line"><span class="comment"># 计算下限和上限</span></span><br><span class="line">lowerLimit = hsvGreen[<span class="number">0</span>][<span class="number">0</span>][<span class="number">0</span>] -<span class="number">10</span>, <span class="number">100</span>, <span class="number">100</span></span><br><span class="line">upperLimit = hsvGreen[<span class="number">0</span>][<span class="number">0</span>][<span class="number">0</span>] + <span class="number">10</span>, <span class="number">255</span>, <span class="number">255</span></span><br><span class="line"><span class="comment"># 显示下限和上限</span></span><br><span class="line"><span class="built_in">print</span>(<span class="string">"Lower Limit:"</span>, lowerLimit)</span><br><span class="line"><span class="built_in">print</span>(<span class="string">"Upper Limit"</span>, upperLimit)</span><br></pre></td></tr></table></figure><h1 id="获取图片某一点hsv值"><a href="#获取图片某一点hsv值" class="headerlink" title="获取图片某一点hsv值"></a>获取图片某一点hsv值</h1><figure class="highlight py"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> cv2</span><br><span class="line"> </span><br><span class="line"><span class="keyword">def</span> <span class="title function_">mouse_callback</span>(<span class="params">event, x, y, flags, param</span>):</span><br><span class="line"> <span class="keyword">if</span> event == cv2.EVENT_LBUTTONDOWN: <span class="comment"># 鼠标左击按下</span></span><br><span class="line"> <span class="comment"># 获取鼠标按下位置的hsv值</span></span><br><span class="line"> h, s, v = hsv[y, x]</span><br><span class="line"> <span class="built_in">print</span>(<span class="string">f'H:<span class="subst">{h}</span>, S:<span class="subst">{s}</span>, V:<span class="subst">{v}</span>'</span>)</span><br><span class="line"> </span><br><span class="line">img = cv2.imread(<span class="string">r'xxx.png'</span>) <span class="comment"># 加载图片</span></span><br><span class="line">hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) <span class="comment"># 将图片转为hsv</span></span><br><span class="line"> </span><br><span class="line">img_name = <span class="string">'image'</span></span><br><span class="line">cv2.namedWindow(img_name)</span><br><span class="line">cv2.setMouseCallback(img_name, mouse_callback) <span class="comment"># 设置鼠标回调</span></span><br><span class="line"> </span><br><span class="line">cv2.imshow(img_name, img) <span class="comment"># 展示图片</span></span><br><span class="line">cv2.waitKey(<span class="number">0</span>)</span><br></pre></td></tr></table></figure><p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.11/post/Python%E8%8E%B7%E5%8F%96RGB%E5%92%8CHSV%E5%80%BC%E5%B9%B6%E6%A1%86%E5%87%BA%E5%AF%B9%E5%BA%94%E9%A2%9C%E8%89%B2/click.gif" alt="click"></p><h1 id="识别并框出同种颜色的图形"><a href="#识别并框出同种颜色的图形" class="headerlink" title="识别并框出同种颜色的图形"></a>识别并框出同种颜色的图形</h1><figure class="highlight py"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> cv2</span><br><span class="line"><span class="keyword">import</span> numpy <span class="keyword">as</span> np</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">color</span>(<span class="params">lower, upper, name</span>):</span><br><span class="line"> Img = cv2.imread(<span class="string">'image/origin/all.png'</span>) <span class="comment"># 读入一幅图像</span></span><br><span class="line"></span><br><span class="line"> kernel_3 = np.ones((<span class="number">3</span>, <span class="number">3</span>), np.uint8) <span class="comment"># 3x3的卷积核</span></span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> Img <span class="keyword">is</span> <span class="keyword">not</span> <span class="literal">None</span>: <span class="comment"># 判断图片是否读入</span></span><br><span class="line"> HSV = cv2.cvtColor(Img, cv2.COLOR_BGR2HSV) <span class="comment"># 把BGR图像转换为HSV格式</span></span><br><span class="line"></span><br><span class="line"> <span class="comment"># mask是把HSV图片中在颜色范围内的区域变成白色,其他区域变成黑色</span></span><br><span class="line"> <span class="keyword">if</span> name == <span class="string">'red'</span>:</span><br><span class="line"> mask = cv2.inRange(HSV, lower[:<span class="number">3</span>], upper[:<span class="number">3</span>])</span><br><span class="line"> mask = mask + cv2.inRange(HSV, lower[<span class="number">3</span>:], upper[<span class="number">3</span>:])</span><br><span class="line"> <span class="keyword">else</span>:</span><br><span class="line"> mask = cv2.inRange(HSV, lower, upper)</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 下面四行是用卷积进行滤波</span></span><br><span class="line"> <span class="comment"># erode()函数可以对输入图像用特定结构元素进行腐蚀操作,该结构元素确定腐蚀操作过程中的邻域的形状,</span></span><br><span class="line"> <span class="comment"># 各点像素值将被替换为对应邻域上的最小值:</span></span><br><span class="line"> erosion = cv2.erode(mask, kernel_3, iterations=<span class="number">1</span>)</span><br><span class="line"> erosion = cv2.erode(erosion, kernel_3, iterations=<span class="number">1</span>)</span><br><span class="line"> <span class="comment"># dilate()函数可以对输入图像用特定结构元素进行膨胀操作,该结构元素确定膨胀操作过程中的邻域的形状,</span></span><br><span class="line"> <span class="comment"># 各点像素值将被替换为对应邻域上的最大值:</span></span><br><span class="line"> dilation = cv2.dilate(erosion, kernel_3, iterations=<span class="number">1</span>)</span><br><span class="line"> dilation = cv2.dilate(dilation, kernel_3, iterations=<span class="number">1</span>)</span><br><span class="line"></span><br><span class="line"> <span class="comment"># target是把原图中的非目标颜色区域去掉剩下的图像</span></span><br><span class="line"> cv2.bitwise_and(Img, Img, mask=dilation)</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 将滤波后的图像变成二值图像放在binary中</span></span><br><span class="line"> ret, binary = cv2.threshold(dilation, <span class="number">127</span>, <span class="number">255</span>, cv2.THRESH_BINARY)</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 在binary中发现轮廓,轮廓按照面积从小到大排列</span></span><br><span class="line"> contours, hierarchy = cv2.findContours(binary, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)</span><br><span class="line"> <span class="keyword">for</span> index, contour <span class="keyword">in</span> <span class="built_in">enumerate</span>(contours): <span class="comment"># 遍历所有的轮廓</span></span><br><span class="line"> x, y, w, h = cv2.boundingRect(contour) <span class="comment"># 将轮廓分解为识别对象的左上角坐标和宽、高</span></span><br><span class="line"> <span class="comment"># 在图像上画上矩形(图片、左上角坐标、右下角坐标、颜色、线条宽度)</span></span><br><span class="line"> cv2.rectangle(Img, (x, y), (x + w, y + h), (<span class="number">0</span>, <span class="number">255</span>,), <span class="number">3</span>)</span><br><span class="line"> <span class="comment"># 给识别对象写上标号</span></span><br><span class="line"> font = cv2.FONT_HERSHEY_SIMPLEX</span><br><span class="line"> cv2.putText(Img, name + <span class="built_in">str</span>(index+<span class="number">1</span>), (x - <span class="number">10</span>, y + <span class="number">10</span>), font, <span class="number">1</span>, (<span class="number">0</span>, <span class="number">0</span>, <span class="number">255</span>), <span class="number">2</span>) <span class="comment"># 加减10是调整字符位置</span></span><br><span class="line"></span><br><span class="line"> <span class="built_in">print</span>(name, <span class="string">'方块的数量是'</span>, <span class="built_in">len</span>(contours), <span class="string">'个'</span>) <span class="comment"># 终端输出目标数量</span></span><br><span class="line"></span><br><span class="line"> <span class="comment"># cv2.imshow('target', target)</span></span><br><span class="line"> <span class="comment"># cv2.imshow('Mask', mask)</span></span><br><span class="line"> <span class="comment"># cv2.imshow("prod", dilation)</span></span><br><span class="line"> cv2.namedWindow(<span class="string">'Img'</span>, <span class="number">0</span>)</span><br><span class="line"> cv2.imshow(<span class="string">'Img'</span>, Img)</span><br><span class="line"> cv2.imwrite(<span class="string">'./image/'</span> + name + <span class="string">'.png'</span>, Img) <span class="comment"># 将画上矩形的图形保存到当前目录</span></span><br><span class="line"></span><br><span class="line"> <span class="keyword">while</span> <span class="literal">True</span>:</span><br><span class="line"> key = cv2.waitKey(<span class="number">10</span>) & <span class="number">0xFF</span></span><br><span class="line"> <span class="keyword">if</span> key == <span class="number">27</span> <span class="keyword">or</span> cv2.getWindowProperty(<span class="string">'Img'</span>, cv2.WND_PROP_VISIBLE) < <span class="number">1.0</span>:</span><br><span class="line"> <span class="keyword">break</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> __name__ == <span class="string">'__main__'</span>:</span><br><span class="line"> <span class="comment"># 下面两个值是要识别的颜色范围</span></span><br><span class="line"> <span class="comment"># 要识别哪个颜色就取消以下哪部分的注释:color()</span></span><br><span class="line"> lower_yellow = np.array([<span class="number">20</span>, <span class="number">20</span>, <span class="number">20</span>]) <span class="comment"># 黄色的下限</span></span><br><span class="line"> upper_yellow = np.array([<span class="number">30</span>, <span class="number">255</span>, <span class="number">255</span>]) <span class="comment"># 黄色上限</span></span><br><span class="line"> <span class="comment"># color(lower_yellow, upper_yellow, 'yellow')</span></span><br><span class="line"></span><br><span class="line"> <span class="comment"># 红色需要特殊处理</span></span><br><span class="line"> lower_red = np.array([<span class="number">0</span>, <span class="number">43</span>, <span class="number">46</span>, <span class="number">156</span>, <span class="number">43</span>, <span class="number">46</span>]) <span class="comment"># 红色阈值下界</span></span><br><span class="line"> higher_red = np.array([<span class="number">10</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">180</span>, <span class="number">255</span>, <span class="number">255</span>]) <span class="comment"># 红色阈值上界</span></span><br><span class="line"> <span class="comment"># color(lower_red, higher_red, 'red')</span></span><br><span class="line"></span><br><span class="line"> lower_green = np.array([<span class="number">35</span>, <span class="number">110</span>, <span class="number">106</span>]) <span class="comment"># 绿色阈值下界</span></span><br><span class="line"> higher_green = np.array([<span class="number">77</span>, <span class="number">255</span>, <span class="number">255</span>]) <span class="comment"># 绿色阈值上界</span></span><br><span class="line"> <span class="comment"># color(lower_green, higher_green, 'green')</span></span><br><span class="line"></span><br><span class="line"> lower_blue = np.array([<span class="number">78</span>, <span class="number">43</span>, <span class="number">46</span>]) <span class="comment"># 蓝色阈值下界</span></span><br><span class="line"> upper_blue = np.array([<span class="number">110</span>, <span class="number">255</span>, <span class="number">255</span>]) <span class="comment"># 蓝色阈值下界</span></span><br><span class="line"> color(lower_blue, upper_blue, <span class="string">'blue'</span>)</span><br></pre></td></tr></table></figure><p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.11/post/Python%E8%8E%B7%E5%8F%96RGB%E5%92%8CHSV%E5%80%BC%E5%B9%B6%E6%A1%86%E5%87%BA%E5%AF%B9%E5%BA%94%E9%A2%9C%E8%89%B2/same.png" alt="same.png"></p><h1 id="识别并框出多种颜色"><a href="#识别并框出多种颜色" class="headerlink" title="识别并框出多种颜色"></a>识别并框出多种颜色</h1><figure class="highlight py"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> cv2</span><br><span class="line"><span class="keyword">import</span> numpy <span class="keyword">as</span> np</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">bitwise_or_fun</span>(<span class="params">masks</span>):</span><br><span class="line"> <span class="keyword">if</span> <span class="built_in">len</span>(masks) <= <span class="number">1</span>:</span><br><span class="line"> <span class="keyword">return</span></span><br><span class="line"> mask = cv2.bitwise_or(masks[<span class="number">0</span>], masks[<span class="number">1</span>])</span><br><span class="line"></span><br><span class="line"> <span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">2</span>, <span class="built_in">len</span>(masks)):</span><br><span class="line"> mask = cv2.bitwise_or(mask, masks[i])</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">color</span>(<span class="params">img</span>):</span><br><span class="line"> colors, lower_highers = get_params()</span><br><span class="line"> frame = cv2.imread(img) <span class="comment"># 读入一幅图像</span></span><br><span class="line"> font = cv2.FONT_HERSHEY_SIMPLEX</span><br><span class="line"> img_hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)</span><br><span class="line"></span><br><span class="line"> masks = []</span><br><span class="line"> <span class="keyword">for</span> index, lower_higher <span class="keyword">in</span> <span class="built_in">enumerate</span>(lower_highers):</span><br><span class="line"> lower_color = lower_higher[<span class="number">0</span>]</span><br><span class="line"> higher_color = lower_higher[<span class="number">1</span>]</span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> colors[index] == <span class="string">'red'</span>:</span><br><span class="line"> mask = cv2.inRange(img_hsv, lower_color[:<span class="number">3</span>], higher_color[:<span class="number">3</span>]) <span class="comment"># 可以认为是过滤出红色部分,获得红色的掩膜</span></span><br><span class="line"> mask = mask + cv2.inRange(img_hsv, lower_color[<span class="number">3</span>:], higher_color[<span class="number">3</span>:]) <span class="comment"># 可以认为是过滤出红色部分,获得红色的掩膜</span></span><br><span class="line"> <span class="keyword">else</span>:</span><br><span class="line"> mask = cv2.inRange(img_hsv, lower_color, higher_color)</span><br><span class="line"> mask = cv2.medianBlur(mask, <span class="number">7</span>) <span class="comment"># 中值滤波</span></span><br><span class="line"> masks.append(mask)</span><br><span class="line"></span><br><span class="line"> bitwise_or_fun(masks)</span><br><span class="line"> cntss = []</span><br><span class="line"> <span class="keyword">for</span> mask <span class="keyword">in</span> masks:</span><br><span class="line"> cnts, hierarchy = cv2.findContours(mask, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE) <span class="comment"># 轮廓检测</span></span><br><span class="line"> cntss.append(cnts)</span><br><span class="line"></span><br><span class="line"> <span class="keyword">for</span> (colorname, cnts) <span class="keyword">in</span> <span class="built_in">zip</span>(colors, cntss):</span><br><span class="line"> <span class="keyword">for</span> index, cnt <span class="keyword">in</span> <span class="built_in">enumerate</span>(cnts):</span><br><span class="line"> (x, y, w, h) = cv2.boundingRect(cnt) <span class="comment"># 该函数返回矩阵四个点</span></span><br><span class="line"> <span class="comment"># cv2.rectangle(frame, (x, y), (x + w, y + h), (0, 0, 0), 2) # 将检测到的颜色框起来</span></span><br><span class="line"> cv2.putText(frame, colorname + <span class="built_in">str</span>(index + <span class="number">1</span>), (x, y - <span class="number">5</span>), font, <span class="number">0.7</span>, (<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>), <span class="number">2</span>)</span><br><span class="line"> cv2.drawContours(frame, cnts, -<span class="number">1</span>, (<span class="number">0</span>, <span class="number">0</span>, <span class="number">0</span>), <span class="number">3</span>)</span><br><span class="line"> <span class="comment"># cv2.namedWindow('frame', 0)</span></span><br><span class="line"> cv2.imshow(<span class="string">'frame'</span>, frame)</span><br><span class="line"> cv2.imwrite(<span class="string">'image/frame.png'</span>, frame) <span class="comment"># 将画上矩形的图形保存到当前目录</span></span><br><span class="line"></span><br><span class="line"> <span class="keyword">while</span> <span class="literal">True</span>:</span><br><span class="line"> key = cv2.waitKey(<span class="number">10</span>) & <span class="number">0xFF</span></span><br><span class="line"> <span class="keyword">if</span> key == <span class="number">27</span> <span class="keyword">or</span> cv2.getWindowProperty(<span class="string">'frame'</span>, cv2.WND_PROP_VISIBLE) < <span class="number">1.0</span>:</span><br><span class="line"> <span class="keyword">break</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">get_params</span>():</span><br><span class="line"> <span class="comment"># 下面两个值是要识别的颜色范围</span></span><br><span class="line"> lower_yellow = np.array([<span class="number">20</span>, <span class="number">20</span>, <span class="number">20</span>]) <span class="comment"># 黄色的下限</span></span><br><span class="line"> upper_yellow = np.array([<span class="number">30</span>, <span class="number">255</span>, <span class="number">255</span>]) <span class="comment"># 黄色上限</span></span><br><span class="line"></span><br><span class="line"> <span class="comment"># 红色需要特殊处理</span></span><br><span class="line"> lower_red = np.array([<span class="number">0</span>, <span class="number">43</span>, <span class="number">46</span>, <span class="number">156</span>, <span class="number">43</span>, <span class="number">46</span>]) <span class="comment"># 红色阈值下界</span></span><br><span class="line"> higher_red = np.array([<span class="number">10</span>, <span class="number">255</span>, <span class="number">255</span>, <span class="number">180</span>, <span class="number">255</span>, <span class="number">255</span>]) <span class="comment"># 红色阈值上界</span></span><br><span class="line"></span><br><span class="line"> lower_green = np.array([<span class="number">35</span>, <span class="number">110</span>, <span class="number">106</span>]) <span class="comment"># 绿色阈值下界</span></span><br><span class="line"> higher_green = np.array([<span class="number">77</span>, <span class="number">255</span>, <span class="number">255</span>]) <span class="comment"># 绿色阈值上界</span></span><br><span class="line"></span><br><span class="line"> lower_blue = np.array([<span class="number">78</span>, <span class="number">43</span>, <span class="number">46</span>]) <span class="comment"># 蓝色阈值下界</span></span><br><span class="line"> upper_blue = np.array([<span class="number">110</span>, <span class="number">255</span>, <span class="number">255</span>]) <span class="comment"># 蓝色阈值下界</span></span><br><span class="line"></span><br><span class="line"> <span class="comment"># 下面两个值是要识别的颜色范围</span></span><br><span class="line"> lower_purple = np.array([<span class="number">125</span>, <span class="number">43</span>, <span class="number">46</span>]) <span class="comment"># 紫色的下限</span></span><br><span class="line"> upper_purple = np.array([<span class="number">155</span>, <span class="number">255</span>, <span class="number">255</span>]) <span class="comment"># 紫色上限</span></span><br><span class="line"></span><br><span class="line"> params = []</span><br><span class="line"> colors = []</span><br><span class="line"> params.append([lower_red, higher_red]);colors.append(<span class="string">'red'</span>) <span class="comment"># 不框出哪种颜色就注释掉哪一条</span></span><br><span class="line"> params.append([lower_yellow, upper_yellow]);colors.append(<span class="string">'yellow'</span>)</span><br><span class="line"> params.append([lower_green, higher_green]);colors.append(<span class="string">'green'</span>)</span><br><span class="line"> params.append([lower_blue, upper_blue]);colors.append(<span class="string">'blue'</span>)</span><br><span class="line"> params.append([lower_purple, upper_purple]);colors.append(<span class="string">'purple'</span>)</span><br><span class="line"></span><br><span class="line"> <span class="keyword">return</span> colors, params</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> __name__ == <span class="string">'__main__'</span>:</span><br><span class="line"> color(<span class="string">'./image/origin/all.png'</span>)</span><br></pre></td></tr></table></figure><p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.11/post/Python%E8%8E%B7%E5%8F%96RGB%E5%92%8CHSV%E5%80%BC%E5%B9%B6%E6%A1%86%E5%87%BA%E5%AF%B9%E5%BA%94%E9%A2%9C%E8%89%B2/difference.png" alt="difference"></p><h1 id="参考教程"><a href="#参考教程" class="headerlink" title="参考教程"></a>参考教程</h1><ul><li><p><a href="https://zhuanlan.zhihu.com/p/687695334?utm_id=0">Python教程:如何获取颜色的RGB值</a></p></li><li><p><a href="https://blog.csdn.net/AI333888/article/details/132513017">如何使用OpenCV Python查找颜色的HSV值</a></p></li><li><p><a href="https://blog.csdn.net/w77775292/article/details/129798028">python-opencv(cv2)实现获取图片某一个点的HSV值</a></p></li><li><p><a href="https://blog.csdn.net/weixin_44635198/article/details/128430627">OpenCV颜色识别</a></p></li></ul>]]></content>
<summary type="html">关于使用Python获取RGB和HSV值并框出对应颜色的详细代码。</summary>
<category term="人工智能" scheme="https://aciano.top/categories/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/"/>
<category term="人工智能" scheme="https://aciano.top/tags/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/"/>
</entry>
<entry>
<title>tflite模型转换为kmodel文件</title>
<link href="https://aciano.top/posts/tflite/"/>
<id>https://aciano.top/posts/tflite/</id>
<published>2024-05-26T04:23:58.000Z</published>
<updated>2024-06-01T17:23:58.000Z</updated>
<content type="html"><![CDATA[<h1 id="下载文件"><a href="#下载文件" class="headerlink" title="下载文件"></a>下载文件</h1><p>下载以下ncc工具压缩包:</p><div calss='anzhiyu-tag-link'><a class="tag-Link" target="_blank" href="https://www.lanzoub.com/i8eEM20ihnxe"> <div class="tag-link-tips">引用站外地址</div> <div class="tag-link-bottom"> <div class="tag-link-left" style="background-image: url(https://api.iowen.cn/favicon/www.lanzoub.com/i8eEM20ihnxe.png);"></div> <div class="tag-link-right"> <div class="tag-link-title">下载链接</div> <div class="tag-link-sitename">ncc工具压缩包</div> </div> <i class="anzhiyufont anzhiyu-icon-angle-right"></i> </div> </a></div><h1 id="方式1"><a href="#方式1" class="headerlink" title="方式1"></a>方式1</h1><p>解压后将tflite放入文件夹,并且新建一个名为<code>images</code>的文件夹,在里面放入几张训练集的图片。</p><p>接着打开cmd,cd到这个文件夹,运行以下命令:</p><figure class="highlight cmd"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ncc -i tflite -o k210model --dataset ./images ./[文件名].tflite ./[文件名].kmodel</span><br></pre></td></tr></table></figure><p>跑完后便得到了kmodel文件。</p><h1 id="方式2"><a href="#方式2" class="headerlink" title="方式2"></a>方式2</h1><p>若以上方式运行失败,可以尝试打开文件夹中的<code>NNCase_v0.1.0.exe</code></p><p>傻瓜式运行即可。</p><h1 id="参考"><a href="#参考" class="headerlink" title="参考"></a>参考</h1><div calss='anzhiyu-tag-link'><a class="tag-Link" target="_blank" href="https://github.com/kendryte/nncase"> <div class="tag-link-tips">引用站外地址</div> <div class="tag-link-bottom"> <div class="tag-link-left" style="background-image: url(https://api.iowen.cn/favicon/github.com/kendryte/nncase.png);"></div> <div class="tag-link-right"> <div class="tag-link-title">GitHub - kendryte/nncase</div> <div class="tag-link-sitename">Open deep learning compiler stack for Kendryte AI accelerators ✨</div> </div> <i class="anzhiyufont anzhiyu-icon-angle-right"></i> </div> </a></div>]]></content>
<summary type="html">关于如何将tflite模型转换为kmodel文件的方法。</summary>
<category term="人工智能" scheme="https://aciano.top/categories/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/"/>
<category term="人工智能" scheme="https://aciano.top/tags/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/"/>
</entry>
<entry>
<title>花开花满原,愿此梦不尽——《梦灯花 Noctuary》游戏体验</title>
<link href="https://aciano.top/posts/Noctuary/"/>
<id>https://aciano.top/posts/Noctuary/</id>
<published>2024-03-01T01:26:50.000Z</published>
<updated>2024-03-01T02:26:50.000Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" href="https://cdn.bili33.top/npm/aplayer@1.10/dist/APlayer.min.css"> <script src="https://cdn.bili33.top/npm/aplayer@1.10/dist/APlayer.min.js"></script> <script src="https://cdn.bili33.top/npm/meting@1.2/dist/Meting.min.js"></script> <h1 id="音乐"><a href="#音乐" class="headerlink" title="音乐"></a>音乐</h1><p>惯例,文章开头,先放上一首游戏里的插曲:《Phosphene -Cantonese》:</p> <div id="aplayer-eYSOeJVf" class="aplayer aplayer-tag-marker" style="margin-bottom: 20px;"> <pre class="aplayer-lrc-content"></pre> </div> <script> var ap = new APlayer({ element: document.getElementById("aplayer-eYSOeJVf"), narrow: false, autoplay: false, showlrc: false, music: { title: "Phosphene", author: "S9ryne", url: "https://aciano.top/img/Phosphene.mp3", pic: "https://cdn.bili33.top/npm/aciano-cdn@2.0.10/speak/header_schinese.jpg", lrc: "" } }); window.aplayers || (window.aplayers = []); window.aplayers.push(ap); </script><h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><img src="https://pic.imgdb.cn/item/65d097a29f345e8d0325e23f.jpg" width="80%" height="50%"><p>花了60个小时推完了(偏慢,主要是加载花费的时间太长),正常游玩时长应该在30h左右。</p><h1 id="游戏简介"><a href="#游戏简介" class="headerlink" title="游戏简介"></a>游戏简介</h1><p>《梦灯花Noctuary》是由Gratesca制作并发行的一款双主角文字冒险(AVG)兼动作角色扮演(ARPG)游戏。</p><p>本作讲述在一个名为“无夜原”如同童话般的世界中,两位少女光使怀揣着“成为保护大家的游园者”的梦想而努力着。玩家可以扮演光使女孩梦灯此夜与彩灯绚夜,游历童话般的世界;在吵吵闹闹的冒险日常中,逐步探寻一位从天而降的神秘少女的身世真相。随着调查的深入,两位光使也逐渐发现了这个世界端倪……</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.9/post/花开花满原,愿此梦不尽/book.png" width="80%" height="50%"><p>在“文字冒险”方面,《梦灯花Noctuary》专注于一条较长的故事线体验,但也设有复数分支结局,并采用了多语言文本和国粤双语的配音;在“清版过关”方面,除了包含流行动作游戏的基础要素,还有少量的养成要素和可自由搭配的“祝福花瓣”系统以拓展策略性。</p><p>国区原价108元,首周八折出售,折后86.4元。steam<code>特别好评</code>。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.9/post/花开花满原,愿此梦不尽/steam.png" width="80%" height="50%"><a class="btn-anzhiyu block center larger" href="https://aciano.top/posts/Noctuary#优秀的插画,配乐及粤语配音" title="点击跳过剧情部分"><i class="anzhiyufont anzhiyu-icon-circle-arrow-right"></i><span>点击跳过剧情部分</span></a><div class="tip info"><p>以下剧情部分涉及剧透请注意!</p></div><div class="tip info"><p>以下剧情部分涉及剧透请注意!</p></div><div class="tip info"><p>以下剧情部分涉及剧透请注意!</p></div><div class="tip info"><p>以下剧情部分涉及剧透请注意!</p></div><h1 id="庞大且完美的剧情"><a href="#庞大且完美的剧情" class="headerlink" title="庞大且完美的剧情"></a>庞大且完美的剧情</h1><p>本作剧情设定十分庞大,总共六章,58个主线和94个支线的故事情节撑起了一个完整的世界观,大量生词需要结合用语百科和深入的游玩才能略懂一二。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.9/post/花开花满原,愿此梦不尽/map.png" width="80%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.9/post/花开花满原,愿此梦不尽/word.png" width="80%" height="50%"><p>整篇故事围绕着两位女主而展开,粉红发色的少女“梦灯此夜”和黄色发色单马尾的少女“彩灯绚夜”,在前半段的章节她们二人是一对非常要好的搭档,性格迥异的她们共同怀揣着成为游园者的梦想。直到有一天,一位名为“月灯辉夜”的失忆光使出现在了她们的面前,似乎始终在隐瞒着什么。通过后续剧情的展开我们得知这只是这位“贤者”的梦境罢了。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.9/post/花开花满原,愿此梦不尽/huiye.png" width="80%" height="50%"><p>前两章剧情主要为两位女主通过训练逐渐成为游园者的日常 <del>(其实真的很长又无聊)</del> ,同时顺便让身处于外的玩家了解这个世界的基本情况。到了第三章剧情开始逐渐反转,梦境的主人“月灯辉夜”会让二人得知大量事与愿违的信息以及这个世界的真相,这里只是一个根据女主的意愿和期待展开的梦境世界。得到足够历练的她们决定返回现实,拯救世界——天暗了,梦醒了。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.9/post/花开花满原,愿此梦不尽/image.png" width="80%" height="50%"><p>回到现实世界的她们发现并不如梦里那般美好,“梦灯此夜”和“彩灯绚夜”不再是并肩作战的搭档,前者成为了光污染组织的副官,而后者成为了处于对立面的游园者队长。同时真实的世界没有阳光、陪伴此夜的流夜教官只是一个玩偶、漫夜和耀夜也成为了对立之面等等。游园者和光污染挑起了内战,暗兽潮出现的频率加快,光使数量逐渐减少,一场更大的阴谋逐渐浮出水面。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.9/post/花开花满原,愿此梦不尽/oppo.png" width="80%" height="50%"><p>长期隐居的贤者“影灯蚀夜”实际上才是真正的幕后黑手,她不惜杀死了自己的两位学生,为的是通过自己的手段提取出光使们的灵魂,使整个无夜原带入她所期望的梦境世界,创造出一个没有灾难和痛苦,完全美好的世界。以暗兽为友,蚀夜的学生“亡灯诱夜”得知真相后,临死前让灯灵带出了这一信息,光污染和游园者们也放下仇恨,合力面对共同的敌人。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.9/post/花开花满原,愿此梦不尽/wrong.png" width="80%" height="50%"><p>最后的决战中,此夜的身体被蚀夜夺舍,代表着仇恨的另一个人格与绚夜再一次地站在了对立面,辉夜的出现打破了僵局,此时到了玩家选择的时刻,是永远留在梦里、留在幻想的世界;亦是接受现实回到永夜的无夜原。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.9/post/花开花满原,愿此梦不尽/diff.png" width="80%" height="50%"><p>最后的最后,在众人的努力之下成功化解了这次危机。然而此时的无夜原仍是没有太阳、暗兽横行,众人再一次地找到了恢复太阳的答案,那就是——让“梦灯此夜”去代替前一位太阳“晴灯无夜”。</p><p>留给玩家选择的三条道路,也正好对应着三个结局。是让无夜继续沉睡,众人回归无夜原正常的生活,继续与暗兽为战;亦是此夜继承无夜的力量,重新照亮整个无夜原,但她只能陷入无穷无尽的黑暗之中,直至下一位继承者的出现;或许,还有一条新的道路可以选择……把无夜的力量,平等的分配给所有的光使,让每个人照亮世界。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.9/post/花开花满原,愿此梦不尽/wuye.png" width="80%" height="50%"><p>当然,真正美好的结局当然是第三种啦,虽然光使们得到无夜的力量后出现了不同程度的副作用,但也增强了自己的力量,此夜和绚夜能够继续搭档下去,无夜也成功苏醒继续陪伴辉夜,无夜原的童话也就到此结束了。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.9/post/花开花满原,愿此梦不尽/light.png" width="80%" height="50%"><p>在后期剧情的推进过程中,不断转折,同时有很多前期的铺垫回收,唯一吐槽的是被剧情创来创去(褒义),怎么后面不断有光使牺牲啊。</p><p>本作最出众的点在于对人物形象的塑造和刻画,通过大量的支线任务将29个角色塑造地有血有肉,对每一位角色的记忆都极为深刻,哪怕只是个配角。而我最喜欢的则是人造光使“幻灯醉夜”和技术官“长灯漫夜”,在不断的探索中醉夜终于找到了自己存在的意义,牺牲时很感人。最后结局的也是充满希望,照亮无夜原的不是一轮太阳,而且汇聚所有人的光,<code>光就是希望</code>。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.9/post/花开花满原,愿此梦不尽/zuiye.png" width="80%" height="50%"><blockquote><p>“生命的尊严,往往要大于苦难本身”。</p></blockquote><p>整篇故事逻辑性强且环环相扣,充分体现出编剧的各种想法,在对话中穿插了不少梗,读到的时候感觉特有趣,比如十八号遗迹船那给出的设计图不就是只龟吗、引用的鲁迅名言和对破解的看法,真的用心了。足够庞大和宏伟的世界观,总体的观感十分不错。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.9/post/花开花满原,愿此梦不尽/turtle.png" width="80%" height="50%"><h1 id="优秀的插画,配乐及粤语配音"><a href="#优秀的插画,配乐及粤语配音" class="headerlink" title="优秀的插画,配乐及粤语配音"></a>优秀的插画,配乐及粤语配音</h1><p>背景音乐相当有感觉,娓娓动听的感觉很舒服,日常剧情的音乐袅袅不绝,战斗的音乐别具特色,伤心紧张等剧情的音乐扣人心弦。(可惜没有上线音乐平台,不过steam有免费的ost)<a class="btn-anzhiyu outline" href="https://store.steampowered.com/app/2696340/_/?snr=1_5_9__405" title="梦灯花 Noctuary 游戏原声集"><i class="anzhiyufont anzhiyu-icon-circle-arrow-right"></i><span>梦灯花 Noctuary 游戏原声集</span></a></p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.9/post/花开花满原,愿此梦不尽/music.png" width="80%" height="50%"><p>来两首感受下:前者《Sweven》偏舒缓,后者《Asthenopia》偏激昂。</p> <div id="aplayer-MqhdABet" class="aplayer aplayer-tag-marker" style="margin-bottom: 20px;"> <pre class="aplayer-lrc-content"></pre> </div> <script> var ap = new APlayer({ element: document.getElementById("aplayer-MqhdABet"), narrow: false, autoplay: false, showlrc: false, music: { title: "Sweven -Strings", author: "Nhato", url: "https://aciano.top/img/Sweven -Strings.mp3", pic: "https://cdn.bili33.top/npm/aciano-cdn@2.0.10/speak/header_schinese.jpg", lrc: "" } }); window.aplayers || (window.aplayers = []); window.aplayers.push(ap); </script> <div id="aplayer-UgAkjBwP" class="aplayer aplayer-tag-marker" style="margin-bottom: 20px;"> <pre class="aplayer-lrc-content"></pre> </div> <script> var ap = new APlayer({ element: document.getElementById("aplayer-UgAkjBwP"), narrow: false, autoplay: false, showlrc: false, music: { title: "Asthenopia", author: "Bitman", url: "https://aciano.top/img/Asthenopia.mp3", pic: "https://cdn.bili33.top/npm/aciano-cdn@2.0.10/speak/header_schinese.jpg", lrc: "" } }); window.aplayers || (window.aplayers = []); window.aplayers.push(ap); </script><p>配音分为普通话和粤语配音,作为一名广东人自然要使用粤语配音啦(也是被吸引的主要原因),不同角色的配音自然生动且富有特色,情绪表现饱满,吹爆。唯一有点小不足,不是全文配音,只有关键剧情有配音,大部分时间都是在枯燥地看剧情,十分难受。</p><p>59张CG,44张背景图片诚意满满,画风精致且优秀,人物立绘下足了功夫,不同的神色和表情、华丽的衣服和色调能很好地反映出角色设定和形象,CG很精美简直可以每一张都当壁纸用。而UI和主界面的美术风格也很有特色,十分美观,OP和ED手绘风格恰到好处、细节满满。(有个小细节是在前三章时主界面为白天,而四五则为夜晚,最后通关后又变成了白天)</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.9/post/花开花满原,愿此梦不尽/cg.png" width="80%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.9/post/花开花满原,愿此梦不尽/data.png" width="80%" height="50%"><h1 id="华丽的战斗系统"><a href="#华丽的战斗系统" class="headerlink" title="华丽的战斗系统"></a>华丽的战斗系统</h1><p>虽然大家都在吐槽这个战斗系统,但我认为还是不错的。</p><p>技能的前摇和后摇很长会导致手感比较差。终极连携不能随着时间恢复,同时因为无法得知总战局的长度,不好判断使用技能的时机,经常遇到留着大招后面用呢,结果玩着玩着关卡已经通过了。</p><p>任务种类丰富,有常规的击败怪物、保护运输、收集材料、BOSS战斗,以及半跑酷关卡和半解谜关卡。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.9/post/花开花满原,愿此梦不尽/fight1.gif" width="80%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.9/post/花开花满原,愿此梦不尽/fight2.gif" width="80%" height="50%"><p>前期刚开始游玩会被这个战斗所惊艳到(可能是我很少玩RPG游戏的原因),碍于电脑性能太过垃圾,每次进入战争要加载10min+,只能怪自己了。</p><p>不过后期就略显枯燥乏味了点。不过游戏性还是挺高的,两位女主有着不同的攻击方式和流派,此夜注重远程和消耗,绚夜注重近战和快攻。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.9/post/花开花满原,愿此梦不尽/person.png" width="80%" height="50%"><p>搭配上祝福系统,通过支线完成任务从而获取对应角色的祝福(类似于技能)。每个祝福需要花费一定的COST点数,推动玩家完成支线获取花露以升级解锁更多的COST点。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.9/post/花开花满原,愿此梦不尽/flower1.png" width="80%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.9/post/花开花满原,愿此梦不尽/flower2.gif" width="80%" height="50%"><h1 id="缺点"><a href="#缺点" class="headerlink" title="缺点"></a>缺点</h1><p>开发组原话:“支线发布逻辑欠佳、战斗上手难度高(不过还好能调难度)、部分过场动画不能快进……”</p><h1 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h1><p>全女世界观下的冒险拯救世界的故事,但又会区别于普通的冒险故事,带来不一样的体验,万分推荐!</p><blockquote><p><a href="https://store.steampowered.com/app/2143680/_Noctuary/">Steam 上的 梦灯花 Noctuary</a> <a class="btn-anzhiyu outline" href="https://wavse.com/game/716" title="资源指路"><i class="anzhiyufont anzhiyu-icon-circle-arrow-right"></i><span>资源指路</span></a></p></blockquote><blockquote><p>同步发布于<a href="https://www.douban.com/review/15754617/">个人豆瓣</a></p></blockquote><blockquote><p>2024年2月17日 15:40 写于湛江</p></blockquote>]]></content>
<summary type="html">一篇关于《梦灯花 Noctuary》的游戏评测,十分推荐这个游戏!冲就对啦。</summary>
<category term="个人文章" scheme="https://aciano.top/categories/%E4%B8%AA%E4%BA%BA%E6%96%87%E7%AB%A0/"/>
<category term="游戏" scheme="https://aciano.top/tags/%E6%B8%B8%E6%88%8F/"/>
</entry>
<entry>
<title>使用GitHub Action自动部署Hexo博客</title>
<link href="https://aciano.top/posts/github-action/"/>
<id>https://aciano.top/posts/github-action/</id>
<published>2024-02-13T09:23:58.000Z</published>
<updated>2024-02-14T03:26:50.000Z</updated>
<content type="html"><![CDATA[<blockquote><p>本教程参照<a href="https://blog.anheyu.com/posts/asdx.html">安知鱼</a>和<a href="https://akilar.top/posts/f752c86d/">Akilar</a>的文章,稍作改动完成。</p></blockquote><h1 id="获取-Token"><a href="#获取-Token" class="headerlink" title="获取 Token"></a>获取 Token</h1><p>打开<a href="https://github.com/settings/tokens/new">New personal access token</a>,创建一个Token。</p><p>创建的 Token 名称随意,但必须勾选<code>repo</code>项 和<code>workflows</code>项,同时Expiration选择<code>no expiration</code></p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.7/post/%E4%BD%BF%E7%94%A8GitHub_Action%E8%87%AA%E5%8A%A8%E9%83%A8%E7%BD%B2Hexo%E5%8D%9A%E5%AE%A2/token.png"></p><div class="tip ref"> <p>创建完成后会显示Token,只会显示一次,请务必复制保存记录。否则遗忘则只能重新生成重新配置了。</p></div><h1 id="新建私有仓库"><a href="#新建私有仓库" class="headerlink" title="新建私有仓库"></a>新建私有仓库</h1><p>打开<a href="https://github.com/new">Create a new repository</a>,创建一个名为<code>Hexo-Source-Repo</code>的仓库并设置为<code>私有仓库</code>。</p><p>创建成功后复制仓库的ssh地址下面会用到。</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.7/post/%E4%BD%BF%E7%94%A8GitHub_Action%E8%87%AA%E5%8A%A8%E9%83%A8%E7%BD%B2Hexo%E5%8D%9A%E5%AE%A2/repo.png"></p><h1 id="配置-Github-Action"><a href="#配置-Github-Action" class="headerlink" title="配置 Github Action"></a>配置 Github Action</h1><p>在[Blogroot]下新建<code>.github</code>文件夹。然后在里面新建<code>workflows</code>文件夹,再在<code>workflows</code>文件夹内新建 autodeploy.yml,内容如下:</p><figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line"><span class="attr">name:</span> <span class="string">自动部署</span></span><br><span class="line"><span class="comment"># 当有改动推送到main分支时,启动Action</span></span><br><span class="line"><span class="attr">on:</span></span><br><span class="line"> <span class="attr">push:</span></span><br><span class="line"> <span class="attr">branches:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">main</span></span><br><span class="line"> <span class="attr">release:</span></span><br><span class="line"> <span class="attr">types:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="string">published</span></span><br><span class="line"></span><br><span class="line"><span class="attr">jobs:</span></span><br><span class="line"> <span class="attr">deploy:</span></span><br><span class="line"> <span class="attr">runs-on:</span> <span class="string">ubuntu-latest</span></span><br><span class="line"> <span class="attr">steps:</span></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">检查分支</span></span><br><span class="line"> <span class="attr">uses:</span> <span class="string">actions/checkout@v2</span></span><br><span class="line"> <span class="attr">with:</span></span><br><span class="line"> <span class="attr">ref:</span> <span class="string">main</span></span><br><span class="line"></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">安装</span> <span class="string">Node</span></span><br><span class="line"> <span class="attr">uses:</span> <span class="string">actions/setup-node@v1</span></span><br><span class="line"> <span class="attr">with:</span></span><br><span class="line"> <span class="attr">node-version:</span> <span class="string">"16.x"</span></span><br><span class="line"></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">安装</span> <span class="string">Hexo</span></span><br><span class="line"> <span class="attr">run:</span> <span class="string">|</span></span><br><span class="line"><span class="string"> export TZ='Asia/Shanghai'</span></span><br><span class="line"><span class="string"> npm install hexo-cli -g</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">缓存</span> <span class="string">Hexo</span></span><br><span class="line"> <span class="attr">id:</span> <span class="string">cache-npm</span></span><br><span class="line"> <span class="attr">uses:</span> <span class="string">actions/cache@v3</span></span><br><span class="line"> <span class="attr">env:</span></span><br><span class="line"> <span class="attr">cache-name:</span> <span class="string">cache-node-modules</span></span><br><span class="line"> <span class="attr">with:</span></span><br><span class="line"> <span class="attr">path:</span> <span class="string">node_modules</span></span><br><span class="line"> <span class="attr">key:</span> <span class="string">${{</span> <span class="string">runner.os</span> <span class="string">}}-build-${{</span> <span class="string">env.cache-name</span> <span class="string">}}-${{</span> <span class="string">hashFiles('**/package-lock.json')</span> <span class="string">}}</span></span><br><span class="line"> <span class="attr">restore-keys:</span> <span class="string">|</span></span><br><span class="line"><span class="string"> ${{ runner.os }}-build-${{ env.cache-name }}-</span></span><br><span class="line"><span class="string"> ${{ runner.os }}-build-</span></span><br><span class="line"><span class="string"> ${{ runner.os }}-</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">安装依赖</span></span><br><span class="line"> <span class="attr">if:</span> <span class="string">${{</span> <span class="string">steps.cache-npm.outputs.cache-hit</span> <span class="type">!=</span> <span class="string">'true'</span> <span class="string">}}</span></span><br><span class="line"> <span class="attr">run:</span> <span class="string">|</span></span><br><span class="line"><span class="string"> npm install --save</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">生成静态文件</span></span><br><span class="line"> <span class="attr">run:</span> <span class="string">|</span></span><br><span class="line"><span class="string"> hexo clean</span></span><br><span class="line"><span class="string"> hexo generate</span></span><br><span class="line"><span class="string"></span></span><br><span class="line"> <span class="bullet">-</span> <span class="attr">name:</span> <span class="string">部署到Github</span></span><br><span class="line"> <span class="attr">uses:</span> <span class="string">JamesIves/github-pages-deploy-action@v4</span></span><br><span class="line"> <span class="attr">with:</span></span><br><span class="line"> <span class="attr">token:</span> <span class="string">ghp_****************</span></span><br><span class="line"> <span class="attr">repository-name:</span> <span class="string">Amnesia-f/amnesia-f.github.io</span></span><br><span class="line"> <span class="attr">branch:</span> <span class="string">main</span></span><br><span class="line"> <span class="attr">folder:</span> <span class="string">public</span></span><br><span class="line"> <span class="attr">commit-message:</span> <span class="string">"$<span class="template-variable">{{ github.event.head_commit.message }}</span> Updated By Github Actions"</span></span><br><span class="line"></span><br></pre></td></tr></table></figure><div class="tip ref"> <p>其中token字段请替换为上面创建的,repository-name字段请替换为自己的原.io结尾的仓库名称</p></div><h1 id="重新设置远程仓库和分支"><a href="#重新设置远程仓库和分支" class="headerlink" title="重新设置远程仓库和分支"></a>重新设置远程仓库和分支</h1><h2 id="添加屏蔽项"><a href="#添加屏蔽项" class="headerlink" title="添加屏蔽项"></a>添加屏蔽项</h2><p>打开<code>[Blogroot]/.gitignore</code>,替换为以下内容:</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">.DS_Store</span><br><span class="line">Thumbs.db</span><br><span class="line">db.json</span><br><span class="line">*.log</span><br><span class="line">node_modules/</span><br><span class="line">public/</span><br><span class="line">.deploy*/</span><br><span class="line">.deploy_git*/</span><br><span class="line">.idea</span><br><span class="line">themes/anzhiyu/.git</span><br><span class="line"></span><br></pre></td></tr></table></figure><div class="tip ref"> <p>记得将最后一行的`anzhiyu`更换为自己使用的主题名称</p></div><h2 id="删除-git文件夹"><a href="#删除-git文件夹" class="headerlink" title="删除.git文件夹"></a>删除.git文件夹</h2><p>删除 <code>[Blogroot]/themes/anzhiyu/</code> 下的 <code>.git</code> 文件夹,原因是主题文件夹下的.git文件夹的存在会导致其被识别成子项目,从而无法被上传到源码仓库。</p><h2 id="运行指令"><a href="#运行指令" class="headerlink" title="运行指令"></a>运行指令</h2><p>在博客根目录下运行如下指令:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git init</span><br><span class="line">git remote add [此处替换为上文复制的ssh地址]</span><br><span class="line">git checkout -b main</span><br></pre></td></tr></table></figure><h2 id="提交源码"><a href="#提交源码" class="headerlink" title="提交源码"></a>提交源码</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">git add .</span><br><span class="line">git commit -m <span class="string">"github action update"</span></span><br><span class="line">git push origin main</span><br><span class="line"></span><br></pre></td></tr></table></figure><h1 id="检查部署"><a href="#检查部署" class="headerlink" title="检查部署"></a>检查部署</h1><p>打开新建的<code>Hexo-Source-Repo</code>仓库界面,点击上方菜单栏中的<code>Action</code>,点击<code>Deploy</code>,等待部署完成后若如下图所示所有项目都打钩即为部署成功!</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.7/post/%E4%BD%BF%E7%94%A8GitHub_Action%E8%87%AA%E5%8A%A8%E9%83%A8%E7%BD%B2Hexo%E5%8D%9A%E5%AE%A2/successful.png"></p><h1 id="享受自动部署"><a href="#享受自动部署" class="headerlink" title="享受自动部署"></a>享受自动部署</h1><p>打开你的vscode,每次对博客进行改动后,按下 <kbd>Ctrl</kbd> + <kbd>SHift</kbd> + <kbd>G</kbd> 即可打开源代码管理界面,</p><p>在Hexo一栏填入此次改动的关键信息后点击<code>提交</code>,再点击<code>同步更改</code>即可!</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.7/post/%E4%BD%BF%E7%94%A8GitHub_Action%E8%87%AA%E5%8A%A8%E9%83%A8%E7%BD%B2Hexo%E5%8D%9A%E5%AE%A2/push.png"></p><h1 id="参考文章"><a href="#参考文章" class="headerlink" title="参考文章"></a>参考文章</h1><div calss='anzhiyu-tag-link'><a class="tag-Link" target="_blank" href="https://blog.anheyu.com/posts/asdx.html"> <div class="tag-link-tips">引用站外地址</div> <div class="tag-link-bottom"> <div class="tag-link-left" style="background-image: url(https://npm.elemecdn.com/anzhiyu-blog-static@1.0.4/img/avatar.jpg);"></div> <div class="tag-link-right"> <div class="tag-link-title">使用 Github Action 自动部署 | 安知鱼</div> <div class="tag-link-sitename">这篇文章介绍了如何使用Github Action自动部署。文章提供了详细的步骤和代码示例,旨在帮助读者更好地了解和应用持续部署。</div> </div> <i class="anzhiyufont anzhiyu-icon-angle-right"></i> </div> </a></div><div calss='anzhiyu-tag-link'><a class="tag-Link" target="_blank" href="https://akilar.top/posts/f752c86d/"> <div class="tag-link-tips">引用站外地址</div> <div class="tag-link-bottom"> <div class="tag-link-left" style="background-image: url(https://cdn.bili33.top/npm/akilar-friends@latest/avatar/akilar.top.jpg);"></div> <div class="tag-link-right"> <div class="tag-link-title">使用Github Action实现全自动部署 | Akilar</div> <div class="tag-link-sitename">来自Akilar的一篇文章</div> </div> <i class="anzhiyufont anzhiyu-icon-angle-right"></i> </div> </a></div>]]></content>
<summary type="html">一篇关于介绍如何通过GitHub Action对Hexo博客进行自动部署的过程。通过此文章可以大大解放你的时间,将漫长的hexo g过程交给CI工作流完成。</summary>
<category term="Hexo博客" scheme="https://aciano.top/categories/Hexo%E5%8D%9A%E5%AE%A2/"/>
<category term="技巧" scheme="https://aciano.top/categories/Hexo%E5%8D%9A%E5%AE%A2/%E6%8A%80%E5%B7%A7/"/>
<category term="部署" scheme="https://aciano.top/tags/%E9%83%A8%E7%BD%B2/"/>
</entry>
<entry>
<title>《三傻大闹宝莱坞》——被片名耽误的好片</title>
<link href="https://aciano.top/posts/3idlots/"/>
<id>https://aciano.top/posts/3idlots/</id>
<published>2024-02-12T09:23:58.000Z</published>
<updated>2024-02-13T03:26:50.000Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" href="https://cdn.bili33.top/npm/aplayer@1.10/dist/APlayer.min.css"> <script src="https://cdn.bili33.top/npm/aplayer@1.10/dist/APlayer.min.js"></script> <script src="https://cdn.bili33.top/npm/meting@1.2/dist/Meting.min.js"></script> <h1 id="音乐"><a href="#音乐" class="headerlink" title="音乐"></a>音乐</h1><p>文章的开头,先放上一首我很喜欢的电影里的插曲:《Give Me Some Sunsine》:</p> <div id="aplayer-JYSelDqF" class="aplayer aplayer-tag-marker meting-tag-marker" data-id="5110133" data-server="netease" data-type="song" data-mode="circulation" data-autoplay="false" data-mutex="true" data-listmaxheight="1000px" data-preload="auto" data-theme="#555" ></div><h1 id="正文"><a href="#正文" class="headerlink" title="正文"></a>正文</h1><p>好久没有试过看完一部电影有这么强烈的欲望想要写下点什么的感觉了,这部《三傻大闹宝莱坞》虽然片名翻译不太吸引人,但实在不能被名字所误会,其中内容如果满分10分我个人愿意打9.5分。其中反映的社会问题、人际关系以及所体现的学习和人生态度都令我感触颇多。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.6/post/《三傻大闹宝莱坞》——被片名耽误的一部好片/1.jpg" width="80%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.6/post/《三傻大闹宝莱坞》——被片名耽误的一部好片/2.jpg" width="80%" height="50%"><p>首先作为一部喜剧,笑料及包袱的抖出自然而流畅,伏笔铺垫的回收令人赞叹,其中典型的譬如人生经验、太空钢笔、“消音器”随地小便被电、Rancho为使Raju苏醒所做出的努力、Rancho巧妙反驳教授并诱导其主动承认了自己迂腐等等。</p><p>镜头语言的设计上也很有特色,比如Raju跳楼时他的脚挂到台灯线,然后用台灯的运动代替了跳楼的场景,感觉比一跃而下震撼不少。比如利用无人机的黑白显示器拍到Joy Lobo自杀的场景,与先前众人为无人机升起的兴奋形成强烈反差。再比如每当镜头开始叙述Raju家时就转变为黑白镜头,与人物背景呼应展现出家庭贫困的窘境。这些镜头都让我印象深刻。</p><p>插曲很能反映人物心情,Joy Lobo在宿舍内自弹自唱那段真的泪目。(就是文章开头的那首歌啦)</p><p>剧情桥段的设计也跌宕起伏,扣人心弦,其中反映的友情、亲情和爱情也实在令人感动。</p><p>先说友情吧,Rancho、Raju和Farhan三傻的友情,Rancho直截了当点出其他两人学习上存在的问题并给出建议,帮助他们完成了自己的梦想,找寻到了真正的自我,当Raju面试成功和Farhan劝服父亲后与Rancho相聚的场景太令人感动了。同时Rancho和Farhan为了Raju的考试情愿潜入校长办公室偷试卷,这大概也是为何电影开头Farhan听到有Rancho的消息后宁愿犯法逼停飞机也要见到他的原因了。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.6/post/《三傻大闹宝莱坞》——被片名耽误的一部好片/4.jpg" width="80%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.6/post/《三傻大闹宝莱坞》——被片名耽误的一部好片/5.jpg" width="80%" height="50%"><p>亲情上以Farhan和他父母为代表,当Farhan跪下来向父亲真正吐露心声表明自己对摄像的热爱时,父亲的坚持也终于被动摇,愿意将笔记本电脑退换成摄像机给儿子。这般无声的支持给了Farhan无限前进的动力。</p><p>爱情就是Rancho和Pia啦就不多阐述了。</p><p>整部影片反映的社会现实问题也十分深刻,例如教育制度,贫富差距,高校自杀率,医疗状况等等。当然,重点是教育制度,填鸭式的学习,死记硬背公式概念是否真的有用?在全城暴雨交通堵塞和停电的情况下,校长面临女儿临产只能无能暴怒,然而不被校长认可的Rancho却能将所学实际应用,挽救了母女的生命,这也使校长转变了对Rancho的态度并认可了他。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.6/post/《三傻大闹宝莱坞》——被片名耽误的一部好片/3.jpg" width="80%" height="50%"><p>与此对应,通过Rancho之口提出了“追求卓越,成功就会出其不意的找上门”的人生哲学和求学态度(与我们老祖先“追求而不强求”的人生哲学有异曲同工之妙),反击了功利的教育动机和机械的教育制度。</p><p>最后,贴上一些我很喜欢的台词吧——</p><blockquote><p>“为什么要把缺点公之于重呢?好比你缺铁,医生会给你开补贴药,但不会到电视上说你缺铁。”</p></blockquote><blockquote><p>“知道我为什么第一名吗?因为我热爱机械,工程学就是我的兴趣所在,知道你的兴趣吗?这就是你的兴趣……跟工程学说拜拜,跟摄影业结婚,发挥你的才能,想想迈克尔杰克逊的爸爸硬逼他成为拳击手,拳王阿里的爸爸非要他去唱歌,想想后果多可怕?” </p></blockquote><blockquote><p>“因为你是懦夫,害怕未来,看看这个,戒指比手指头还多。为考试戴,为姐姐嫁妆戴,为工作戴……你这么害怕明天,怎么能过好今天?又怎么能专注于学业?两个怪兄弟,一个害怕,一个虚伪……”</p></blockquote><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.6/post/《三傻大闹宝莱坞》——被片名耽误的一部好片/6.jpg" width="80%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.6/post/《三傻大闹宝莱坞》——被片名耽误的一部好片/7.jpg" width="80%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.6/post/《三傻大闹宝莱坞》——被片名耽误的一部好片/8.jpg" width="80%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.6/post/《三傻大闹宝莱坞》——被片名耽误的一部好片/9.jpg" width="80%" height="50%"><blockquote><p>图源<a href="https://zhuanlan.zhihu.com/p/68308223">三傻大闹宝莱坞经典台词电影截图(中英双语)</a></p></blockquote><blockquote><p>同步发布于<a href="https://movie.douban.com/review/15738449/">个人豆瓣</a>上</p></blockquote><blockquote><p>2024年2月11日 17:38 写于湛江</p></blockquote><h1 id="正文之外"><a href="#正文之外" class="headerlink" title="正文之外"></a>正文之外</h1><p>第一次接触阿米尔·汗的电影是《摔跤吧!爸爸》,我就说怎么看着这个主角这么眼熟,同时意外的是他拍三傻的时候已经四十多岁了,但完全感觉不到什么异常啊。</p><p>歌舞和歌曲很有印度的味道。</p><p>“病毒”的扮演者博曼·伊拉尼的演技很好,将一个固执、迂腐、落后的校长形象刻画的十分生动。</p><p>但是这么一个形象其实也有优点,首先,他公正无私,他儿子考了他们学校三次,全被拒绝了。</p><p>而且他精力旺盛,老当益壮吧,不偏不倚、 双手写字、分秒必争。对学生要求严格,对自己要求更严格。</p><p>他去学校的工具是辆很老的自行车,没有公车和司机。</p><p>在他把太空笔交给男主,外孙出生后说让其以后去踢足球的那一刻,他终于放下了坚守了一辈子的固执。</p>]]></content>
<summary type="html">一篇关于《三傻大闹宝莱坞》的影评,十分推荐这部好片!别被片名耽误啦。</summary>
<category term="个人文章" scheme="https://aciano.top/categories/%E4%B8%AA%E4%BA%BA%E6%96%87%E7%AB%A0/"/>
<category term="电影" scheme="https://aciano.top/tags/%E7%94%B5%E5%BD%B1/"/>
</entry>
<entry>
<title>提取豆瓣数据并生成Hexo足迹页面</title>
<link href="https://aciano.top/posts/mouban/"/>
<id>https://aciano.top/posts/mouban/</id>
<published>2024-02-09T10:09:11.000Z</published>
<updated>2024-02-10T04:26:50.000Z</updated>
<content type="html"><![CDATA[<h1 id="唠嗑"><a href="#唠嗑" class="headerlink" title="唠嗑"></a>唠嗑</h1><p>快过年了,看着自己去年一共才发布了7篇文章,比我QQ动态一年更新的数量还要少,我知道不能再鸽了,于是刚好有这么一个需求,就简简单单水一篇教程吧。</p><h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><p>前段时间总觉得Hexo-douban插件实现的页面效果不合我的心意,于是上网找有没有其他展现豆瓣数据的方法,这时找到:<a href="https://meuicat.com/blog/42/#%E8%B6%B3%E8%BF%B9%E9%A1%B5">足迹页|爱吃肉的猫</a>,一整个屏幕占满加上大大的显示封面一下子捕获了我的心,于是照猫画虎操作一番后成功实现了原博主的效果,<a href="https://aciano.top/collect">效果预览</a>。</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.5/post/%E6%8F%90%E5%8F%96%E8%B1%86%E7%93%A3%E6%95%B0%E6%8D%AE%E5%B9%B6%E7%94%9F%E6%88%90Hexo%E8%B6%B3%E8%BF%B9%E9%A1%B5%E9%9D%A2/page.png"></p><p>由于这个页面是本地部署,需要自行创建数据,格式如下:</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.5/post/%E6%8F%90%E5%8F%96%E8%B1%86%E7%93%A3%E6%95%B0%E6%8D%AE%E5%B9%B6%E7%94%9F%E6%88%90Hexo%E8%B6%B3%E8%BF%B9%E9%A1%B5%E9%9D%A2/data.png"></p><p>可见一本书或一部电影需要填写名称、作者、封面等字段,我那总共加起来一百多条来自豆瓣上的数据一个个手动复制效率和速度也太慢了吧,同时有个问题,数据从哪来呢?从豆瓣复制吗,图片封面有防盗链,而且繁琐。</p><p>这时候发现了Hexo-douban插件的作者mythsman为插件写了个豆瓣数据提取服务<a href="https://github.com/mythsman/mouban">mouban</a>以供大家备份数据和使用,好了,这下路走通了。</p><p>为了解决上面提到的手动复制效率低的问题,萌生了写段python自动提取生成的想法,这篇文章应运而生。(我知道很水哎呀但是说不定能帮后来者省一点时间呢是吧,水就水点吧大家见谅不然可能今年都没新文章了[doge])</p><h1 id="mouban接口使用方法"><a href="#mouban接口使用方法" class="headerlink" title="mouban接口使用方法"></a>mouban接口使用方法</h1><p><code>&action=</code>后面可接<code>wish</code>、<code>do</code>、<code>collect</code>,分别对应“想读”、“在读”、“已读”。</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line"># 将 {your_douban_id} 改为你的豆瓣数字ID</span><br><span class="line"></span><br><span class="line"># 用户录入/更新</span><br><span class="line"></span><br><span class="line">https://mouban.mythsman.com/guest/check_user?id={your_douban_id}</span><br><span class="line"></span><br><span class="line"># 查询用户的读书评论</span><br><span class="line"></span><br><span class="line">https://mouban.mythsman.com/guest/user_book?id={your_douban_id}&action=collect</span><br><span class="line"></span><br><span class="line"># 查询用户的电影评论</span><br><span class="line"></span><br><span class="line">https://mouban.mythsman.com/guest/user_movie?id={your_douban_id}&action=collect</span><br><span class="line"></span><br><span class="line"># 查询用户的游戏评论</span><br><span class="line"></span><br><span class="line">https://mouban.mythsman.com/guest/user_game?id={your_douban_id}&action=collect</span><br><span class="line"></span><br><span class="line"># 查询用户的音乐评论</span><br><span class="line"></span><br><span class="line">https://mouban.mythsman.com/guest/user_song?id={your_douban_id}&action=collect</span><br><span class="line"></span><br></pre></td></tr></table></figure><h1 id="生成足迹页数据字段"><a href="#生成足迹页数据字段" class="headerlink" title="生成足迹页数据字段"></a>生成足迹页数据字段</h1><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line"><span class="keyword">import</span> requests</span><br><span class="line"><span class="keyword">import</span> json</span><br><span class="line"></span><br><span class="line">response = requests.get(<span class="string">'https://mouban.mythsman.com/guest/user_book?id=231261343&action=collect'</span>) <span class="comment"># 替换为你的mouban接口链接</span></span><br><span class="line">data = json.loads(response.text)</span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">remove_spaces_and_newlines</span>(<span class="params">input_string</span>):</span><br><span class="line"> input_string = input_string.replace(<span class="string">"-"</span>, <span class="string">"/"</span>)</span><br><span class="line"> <span class="keyword">return</span> input_string</span><br><span class="line"></span><br><span class="line">num = <span class="number">0</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">for</span> comment <span class="keyword">in</span> data[<span class="string">"result"</span>][<span class="string">"comment"</span>]:</span><br><span class="line"> douban_id = comment[<span class="string">"item"</span>][<span class="string">"douban_id"</span>]</span><br><span class="line"> title = comment[<span class="string">"item"</span>][<span class="string">"title"</span>]</span><br><span class="line"> author = comment[<span class="string">"item"</span>][<span class="string">"author"</span>]</span><br><span class="line"> mark_date = remove_spaces_and_newlines(comment[<span class="string">"mark_date"</span>])</span><br><span class="line"> rate = comment[<span class="string">"rate"</span>]</span><br><span class="line"> thumbnail = comment[<span class="string">"item"</span>][<span class="string">"thumbnail"</span>]</span><br><span class="line"> <span class="keyword">if</span> num == <span class="number">0</span>:</span><br><span class="line"> <span class="built_in">print</span>(<span class="string">f"- class_name: 📖 书籍清单\n class_desc: 静下来慢慢感受着,流淌的故事。\n link_list: \n - name: <span class="subst">{title}</span>\n score: <span class="subst">{rate}</span>\n premiere: <span class="subst">{author}</span>\n time: <span class="subst">{mark_date}</span>\n img: <span class="subst">{thumbnail}</span>\n link: https://book.douban.com/subject/<span class="subst">{douban_id}</span>/\n"</span>)</span><br><span class="line"> <span class="keyword">if</span> num != <span class="number">0</span>:</span><br><span class="line"> <span class="built_in">print</span>(<span class="string">f" - name: <span class="subst">{title}</span>\n score: <span class="subst">{rate}</span>\n premiere: <span class="subst">{author}</span>\n icon: fa-solid fa-book-bookmark\n time: <span class="subst">{mark_date}</span>\n img: <span class="subst">{thumbnail}</span>\n link: https://book.douban.com/subject/<span class="subst">{douban_id}</span>/\n"</span>)</span><br><span class="line"> num += <span class="number">1</span></span><br><span class="line"></span><br></pre></td></tr></table></figure><p>运行后在终端即可得到<code>collect.yml</code>中所需填写的数据了。</p><p>若需要生成电影/游戏的数据请自行替换<code>class_name</code>等数据。</p><h1 id="批量下载封面"><a href="#批量下载封面" class="headerlink" title="批量下载封面"></a>批量下载封面</h1><p>接口终归是别人的,图片链接能使用多久也是个未知数,还是保存至本地再上传到自己的图床稳定安全些。</p><blockquote><p>将<code>save_path</code>改成你要保存图片的本地文件夹路径,记得在文件名中加上<code>{num}</code>,这是图片序号。</p></blockquote><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line"><span class="keyword">import</span> requests</span><br><span class="line"><span class="keyword">import</span> json</span><br><span class="line"><span class="keyword">import</span> os</span><br><span class="line"></span><br><span class="line">num = <span class="number">0</span></span><br><span class="line">response = requests.get(<span class="string">'https://mouban.mythsman.com/guest/user_book?id=231261343&action=collect'</span>) <span class="comment"># 替换为你的mouban接口链接</span></span><br><span class="line">data = json.loads(response.text)</span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">remove_spaces_and_newlines</span>(<span class="params">input_string</span>):</span><br><span class="line"> input_string = input_string.replace(<span class="string">"-"</span>, <span class="string">"/"</span>)</span><br><span class="line"> <span class="keyword">return</span> input_string</span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">download_image</span>(<span class="params">url, save_path</span>):</span><br><span class="line"> response = requests.get(url)</span><br><span class="line"> <span class="keyword">if</span> response.status_code == <span class="number">200</span>:</span><br><span class="line"> <span class="keyword">with</span> <span class="built_in">open</span>(save_path, <span class="string">'wb'</span>) <span class="keyword">as</span> f:</span><br><span class="line"> f.write(response.content)</span><br><span class="line"> <span class="built_in">print</span>(<span class="string">f"图片已保存到 <span class="subst">{save_path}</span>"</span>)</span><br><span class="line"> <span class="keyword">else</span>:</span><br><span class="line"> <span class="built_in">print</span>(<span class="string">"下载失败"</span>)</span><br><span class="line"></span><br><span class="line"><span class="keyword">for</span> comment <span class="keyword">in</span> data[<span class="string">"result"</span>][<span class="string">"comment"</span>]:</span><br><span class="line"> num += <span class="number">1</span></span><br><span class="line"> save_path = <span class="string">f"E:/Users/Pictures/UbisoftConnect/image<span class="subst">{num}</span>.jpg"</span> <span class="comment"># 替换为你要保存图片的本地文件夹路径</span></span><br><span class="line"> download_image(comment[<span class="string">"item"</span>][<span class="string">"thumbnail"</span>], save_path)</span><br><span class="line"> </span><br></pre></td></tr></table></figure><p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.5/post/%E6%8F%90%E5%8F%96%E8%B1%86%E7%93%A3%E6%95%B0%E6%8D%AE%E5%B9%B6%E7%94%9F%E6%88%90Hexo%E8%B6%B3%E8%BF%B9%E9%A1%B5%E9%9D%A2/download.png"></p><h1 id="结语"><a href="#结语" class="headerlink" title="结语"></a>结语</h1><p>好啦,这么一篇水文章就结束啦,下次更新又不知道是什么时候咯。</p><p>快过年了,拜个早年,祝大家身体健康,心想事成!</p><p>And…</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.5/post/提取豆瓣数据并生成Hexo足迹页面/joy.jpg" width="50%" height="50%"><p>Goodbye ~ See you next time ~</p>]]></content>
<summary type="html">利用mouban提取豆瓣数据并生成Hexo博客足迹页面,展示读书和看过的电影等数据的教程。</summary>
<category term="Hexo博客" scheme="https://aciano.top/categories/Hexo%E5%8D%9A%E5%AE%A2/"/>
<category term="技巧" scheme="https://aciano.top/categories/Hexo%E5%8D%9A%E5%AE%A2/%E6%8A%80%E5%B7%A7/"/>
<category term="Hexo" scheme="https://aciano.top/tags/Hexo/"/>
</entry>
<entry>
<title>2023年度总结</title>
<link href="https://aciano.top/posts/2023-report/"/>
<id>https://aciano.top/posts/2023-report/</id>
<published>2023-12-30T04:23:58.000Z</published>
<updated>2024-08-08T11:41:09.633Z</updated>
<content type="html"><![CDATA[<h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><p>时间过得可真快,眨眼间一年时光便转瞬即逝。</p><p>以前从未尝试过写关于自己的年度总结,每至年末总是习惯于打开各大App查看现成的年度报告,每次看到那日积月累起来的数据量总是会惊叹一句:原来我看过这么多视频/电影/文章……</p><p>但这些数据好像并不能很好地体现出我的个人意志,于是也就萌生了自己写篇洋洋洒洒的个人年度总结的冲动啦,仪式感还是要有的!</p><h1 id="娱乐"><a href="#娱乐" class="headerlink" title="娱乐"></a>娱乐</h1><h2 id="阅读"><a href="#阅读" class="headerlink" title="阅读"></a>阅读</h2><p>今年共阅读了<code>41</code>本书,翻过了<code>10933</code>页的书籍,在豆瓣上写了短评<code>82</code>篇共<code>1554</code>字。</p><p>在小学乃至初中时都对阅读不太感兴趣,特别是初中12本名著看过的可谓屈指可数,主打的就是一个越是强迫要看的越是不想看。</p><p>到中考结束后那段暑假后态度发生了转变,因宅家无所事事开始重新捧起在书柜上蒙尘多年的<code>《巴黎圣母院》</code>,开始迷上了小说,后来慢慢把家里有的从前没读过的书都读了一遍,不够满足继续网购+泡书店不断读书,也接触了反乌托邦文学、法国文学、存在主义文学和大量的历史类书籍,由衷地体会到了阅读所带来的满足感和乐趣。</p><p>今年最喜欢的书当属奥威尔的<code>《一九八四》</code>,惊叹于奥威尔的想象力、洞察力与预言能力,看完之后令人不寒而栗,特别是第三部对温斯顿被折磨后的外貌及心理描写都让我有种喘不过气的感觉。</p><h2 id="电影"><a href="#电影" class="headerlink" title="电影"></a>电影</h2><p>今年共看了<code>12</code>部电影,好像不算很多,但是其中当属<code>《流浪地球2》</code>印象最深刻了,是今年唯一一部去了电影院观影的影片,期盼着2027年的球3会带给我们什么惊喜。</p><p>年度霸屏影人为<code>张国荣</code>,其中92版的<code>《家有喜事》</code>是今年看过最喜欢的喜剧了。</p><h2 id="音乐"><a href="#音乐" class="headerlink" title="音乐"></a>音乐</h2><p>今年共听了<code>6961</code>首歌,音乐陪伴度过了<code>1682</code>小时的时光,年度歌手还是和去年一样是Eason呀。</p><div class="gallery"> <div class="fj-gallery page_img_lazyload data" data-rowHeight="220" data-limit="10"> <span class="gallery-data">[{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.1/post/2023年度总结/music1.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.1/post/2023年度总结/music2.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.1/post/2023年度总结/music3.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.1/post/2023年度总结/music4.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.1/post/2023年度总结/music5.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.1/post/2023年度总结/music6.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.1/post/2023年度总结/music7.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.1/post/2023年度总结/music8.jpg","alt":""},{"url":"https://cdn.bili33.top/npm/aciano-cdn@2.0.1/post/2023年度总结/music9.jpg","alt":""}]</span> </div><button class="gallery-load-more" style="opacity:0"> <span>加载更多</span> <i class="anzhiyufont anzhiyu-icon-arrow-down"></i> </button></div><p>年度歌曲贡献给了<code>《琵琶行》</code>,一共听了76遍,很多朋友都不解,问我真的有这么爱琵琶行吗,都是泪啊😭为了背下这么长的文言文真是太不容易了,不过也发现了通过歌曲背诵古文是个不错的方法,赤壁赋也是这么背下来的,速度还挺快,而且相对没这么枯燥。</p><p>今年还入坑了音乐剧,很早以前就知道了《红与黑》有相应的音乐剧《摇滚红与黑》,阅读了原著后也去看了音乐剧,后来迷上了这种表演形式,陆陆续续看了《摇滚莫扎特》和《悲惨世界》,其中的歌曲都超级好听,壮大了我的法语歌单。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.1/post/2023年度总结/music10.jpg" width="50%" height="50%"><p>2023年5月29号在网易云成为音乐合伙人,白嫖了187天的黑胶会员,可惜高中后住校没办法每天完成评歌指标,痛失白嫖机会…</p><h2 id="游戏"><a href="#游戏" class="headerlink" title="游戏"></a>游戏</h2><p>年初经过世荣哥的推荐,大半夜玩《Doki Doki Literature Club》被吓得不轻,但初次接触并打开了galgame的大门。</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.1/post/2023%E5%B9%B4%E5%BA%A6%E6%80%BB%E7%BB%93/game.jpg" alt="game.jpg"></p><p>今年玩过的游戏属实不多,除了入坑音游《Phigros》<psw>和美少女万华镜系列</psw>外,似乎好像并没有怎么尝试新的游戏。</p><h1 id="运动"><a href="#运动" class="headerlink" title="运动"></a>运动</h1><p>今年最大的开销应该是买了台公路车,从中考完成后有记录的骑行一共有<code>152</code>公里,貌似不算太多,总感觉找不到很纯粹的适合骑车的路线,所以尚未尝试过长距离的骑行,期盼一下明年能够完成这个目标吧!</p><p>总的来说,每周住校返家后绕着市区骑一圈,去吹吹海风感受下人文气息,是一个非常放松的行为。</p><del>但是要吐槽!怎么政府你一到年底就开始修路修水管啊,主干道到处都施工,有时候还得骑上人行道或者机动车道通行,体验实在是不好。也不知道滨湖后半段那个小区施完工没有,总是有泥头车堵住骑大圈的路,好久没完整地绕着滨湖骑过完整的一圈了!</del><h1 id="比赛"><a href="#比赛" class="headerlink" title="比赛"></a>比赛</h1><p>今年最重要的事情当然是拿了<code>省一等奖</code>啦!</p><p>可惜的是奖状还没下来,以及由于是我们是第一组,当时直播还没准备好(悲),现在想回看一下自己的表现都没办法呢。</p><p>关于省赛的详细总结在上一篇文章中:</p><div calss='anzhiyu-tag-link'><a class="tag-Link" target="_blank" href="https://aciano.top/posts/3362/"> <div class="tag-link-tips">引用站外地址</div> <div class="tag-link-bottom"> <div class="tag-link-left" style="background-image: url(https://aciano.top/favicon.ico);"></div> <div class="tag-link-right"> <div class="tag-link-title">省赛总结・轻舟已过万重山</div> <div class="tag-link-sitename">关于参加2023年广东省科技劳动教育暨学生信息素养提升实践活动的个人总结</div> </div> <i class="anzhiyufont anzhiyu-icon-angle-right"></i> </div> </a></div><img src="https://cdn.bili33.top/npm/aciano-cdn@2.0.1/post/2023年度总结/sun.jpg" width="50%" height="50%"><h1 id="学业"><a href="#学业" class="headerlink" title="学业"></a>学业</h1><h2 id="初中"><a href="#初中" class="headerlink" title="初中"></a>初中</h2><p>顺利完成了初中的学习生涯,成为了一名高中生!中考考得并不太如意,因为部分优势科题目过于简单没能与别人拉开差距,差一点点去了一中吧,也算是有点小小遗憾呢,不过在哪都差不多啦,二中也挺不错的。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.19/speak/ervs1.png" width="50%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.19/speak/ervs2.png" width="50%" height="50%"><h2 id="高中"><a href="#高中" class="headerlink" title="高中"></a>高中</h2><h3 id="成绩"><a href="#成绩" class="headerlink" title="成绩"></a>成绩</h3><p>进入二中后依据中考成绩分到的班级是个普通班,不过咱原18班也是很厉害的,是所有普通班里排第一的存在。</p><p>期中考试完后进行分科,老师说我们是这几届来分班最早的一届了,以往都是要到高一下才分呢,不愧是李小锋。</p><p>不过早分班也有早分班的好处吧,课表能够根据选的科目重新编排优先级,不选的科目如生物,一周一节就很舒服不再需要花大量精力学那些科目。</p><p>重新分班后来到了实验班,不论是学习环境、师资还是身边的同学貌似都提升了一个档次,班主任重新整理了期中成绩放出来,三科成绩我都去到班级中下游了😶🌫️</p><table><thead><tr><th>考试</th><th>总分</th><th>排名</th><th>日期</th><th>语文</th><th>数学</th><th>英语</th><th>物理</th><th>化学</th><th>生物</th><th>政治</th><th>历史</th><th>地理</th></tr></thead><tbody><tr><td>入学考试</td><td>474</td><td>483</td><td>2023-09-22</td><td>97.5/878</td><td>88/1105</td><td>108/526</td><td>95/71</td><td>–</td><td>–</td><td>–</td><td>85.5/51</td><td>–</td></tr><tr><td>10月月考</td><td>740</td><td>597</td><td>2023-10-26</td><td>115.5/512</td><td>88/879</td><td>104.5/189</td><td>65/1099</td><td>84/582</td><td>76/847</td><td>71/636</td><td>72/671</td><td>68/840</td></tr><tr><td>期中考试</td><td>742</td><td>444</td><td>2023-11-27</td><td>109.5/87</td><td>79/1145</td><td>116.5/162</td><td>56/631</td><td>88/486</td><td>66/1254</td><td>74/338</td><td>76/443</td><td>77/375</td></tr><tr><td>期中考试</td><td>475</td><td>502</td><td>2024-04-25</td><td>109.5/242</td><td>51/1133</td><td>109.5/286</td><td>55/883</td><td>62/713</td><td>–</td><td>–</td><td>–</td><td>88/2</td></tr></tbody></table><p>数学和物理还是太差了,希望明年能提起来!</p><h3 id="杂谈"><a href="#杂谈" class="headerlink" title="杂谈"></a>杂谈</h3><p>分了班之后才觉之前班级的美好,虽然只有两个半月的相处却感觉感情胜过三年的初中同学。</p><p>学习组织的太极功夫扇表演在分班之后校运会又重新召集原班级,大家重新聚在一起聊天吐槽时有种言不可及的感觉。</p><p>现在来到新班级,大家都还没怎么认识,根本玩不开,不过这一切也就交由时间吧。</p><h3 id="生活"><a href="#生活" class="headerlink" title="生活"></a>生活</h3><p>在开学初报名参加了二中的国旗护卫队,一开始确实挺苦挺累,不过经过第一轮考核后,以后的训练都由衷地感觉到这个组织的魅力所在,师姐说国护一定是所有学生组织中最团结,最有凝聚力的那个,我深以为然。</p><p>看到师兄师姐们的友谊以及默契,共同训练时所体现出的毅力和放松玩游戏的轻松畅快,我知道我来对地方了。</p><p>高中三年若没有些集体活动参加点组织总感觉会少了些什么,总要给枯燥的学习生活中增添些许色彩吧!</p><p>希望学期末的考核能顺利通过,成为正式队员呢。</p><h1 id="目标"><a href="#目标" class="headerlink" title="目标"></a>目标</h1><ul><li><p>年级排名进入前200名</p></li><li><p>至少每个月读一本书</p></li><li><p>尝试一次长距离的骑行(50km+)</p></li><li><p>数学稳定100分以上</p></li><li><p>yzjbyibufavjwithvlg</p></li></ul><p>好像都是些看起来简单但又不太容易实现的事情呢。</p><h1 id="结语"><a href="#结语" class="headerlink" title="结语"></a>结语</h1><p>其实还有很多话想写下来,但是手一放到键盘上就不知道该敲下些什么文字啦。</p><p>突然想到,其实应该在年初就开始写年度总结,类似于每个月的大事记那样,这样到年末就有很多东西记录下来啦。</p><p>新的一年也没什么想祝自己的,就期盼自己能够活在当下,过好每一天吧!</p><h1 id="补档"><a href="#补档" class="headerlink" title="补档"></a>补档</h1><p>今年是第一次在外面跨年,吹着海风,看着烟花在眼前头顶绽放的感觉才有跨年的感觉嘛!</p><del>就是跨年倒计时结束后,根本找不到小绿回家,走了好大一段路,累。</del><p>最后的最后,就用一段烟花结束2023年吧!</p><script src="https://fast.wistia.com/embed/medias/3ffk37046k.jsonp" async></script><script src="https://fast.wistia.com/assets/external/E-v1.js" async></script><div class="wistia_responsive_padding" style="padding:56.25% 0 0 0;position:relative;"><div class="wistia_responsive_wrapper" style="height:100%;left:0;position:absolute;top:0;width:100%;"><div class="wistia_embed wistia_async_3ffk37046k seo=true videoFoam=true" style="height:100%;position:relative;width:100%"><div class="wistia_swatch" style="height:100%;left:0;opacity:0;overflow:hidden;position:absolute;top:0;transition:opacity 200ms;width:100%;"><img src="https://fast.wistia.com/embed/medias/3ffk37046k/swatch" style="filter:blur(5px);height:100%;object-fit:contain;width:100%;" alt="" aria-hidden="true" onload="this.parentNode.style.opacity=1;" /></div></div></div></div><blockquote><p>部分数据来源于豆瓣、网易云音乐、哔哩哔哩、QQ、Keep、小米运动健康、智学网</p></blockquote><blockquote><p>2023年12月31日写于湛江</p></blockquote>]]></content>
<summary type="html"><h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><p>时间过得可真快,眨眼间一年时光便转瞬即逝。</p>
<p>以前从未尝试过写关于自己的年度总结,每至年末总是习惯于打开各大App查看现成的年度</summary>
<category term="个人文章" scheme="https://aciano.top/categories/%E4%B8%AA%E4%BA%BA%E6%96%87%E7%AB%A0/"/>
<category term="个人文章" scheme="https://aciano.top/tags/%E4%B8%AA%E4%BA%BA%E6%96%87%E7%AB%A0/"/>
</entry>
<entry>
<title>VSCode配置C/C++环境</title>
<link href="https://aciano.top/posts/c/"/>
<id>https://aciano.top/posts/c/</id>
<published>2023-08-07T10:23:58.000Z</published>
<updated>2023-08-07T10:23:58.000Z</updated>
<content type="html"><![CDATA[<h1 id="安装VSCode"><a href="#安装VSCode" class="headerlink" title="安装VSCode"></a>安装VSCode</h1><p>本文不对安装VSCode展开阐述,请自行前往<a href="https://code.visualstudio.com/">VSCode</a>下载安装。</p><h1 id="安装MinGW编译器"><a href="#安装MinGW编译器" class="headerlink" title="安装MinGW编译器"></a>安装MinGW编译器</h1><p>前往<a href="https://sourceforge.net/projects/mingw-w64/files/">MinGW</a>下载编译器。</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.18/post/VSCode%E9%85%8D%E7%BD%AECC++%E7%8E%AF%E5%A2%83/install.png" alt="install.png"></p><p>将页面拉至下方,参考下表选择对应版本下载并解压即可。笔者选择为x86_64-win32-seh</p><table><thead><tr><th>名称</th><th>说明</th></tr></thead><tbody><tr><td>Version</td><td>最新版本</td></tr><tr><td>Architecture</td><td>x86_64 (64位) or i686 (32位)</td></tr><tr><td>Threads</td><td>posix (推荐) or win32</td></tr><tr><td>Exception</td><td>sjlj (32位) or seh (64位)</td></tr></tbody></table><h1 id="配置环境变量"><a href="#配置环境变量" class="headerlink" title="配置环境变量"></a>配置环境变量</h1><p>解压后,找到<code>bin</code>文件夹,右键复制文件夹路径,如<code>D:\mingw64\bin</code></p><p>打开设置,找到<code>系统-系统信息-高级系统设置</code>并进入:</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.18/post/VSCode%E9%85%8D%E7%BD%AECC++%E7%8E%AF%E5%A2%83/system.png" alt="system.png"></p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.18/post/VSCode%E9%85%8D%E7%BD%AECC++%E7%8E%AF%E5%A2%83/variable.png" alt="variable.png"></p><p>完成配置后打开cmd,输入<code>gcc -v</code>,出现如下信息时即为成功。</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.18/post/VSCode%E9%85%8D%E7%BD%AECC++%E7%8E%AF%E5%A2%83/gcc.png" alt="gcc.png"></p><h1 id="安装扩展"><a href="#安装扩展" class="headerlink" title="安装扩展"></a>安装扩展</h1><p>在左侧菜单栏选择扩展,搜索<code>c/c++</code>并安装:</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.18/post/VSCode%E9%85%8D%E7%BD%AECC++%E7%8E%AF%E5%A2%83/plugin.png" alt="plugin.png"></p><h1 id="配置VSCode的C语言环境"><a href="#配置VSCode的C语言环境" class="headerlink" title="配置VSCode的C语言环境"></a>配置VSCode的C语言环境</h1><p>按下<code>Ctrl+Shift+P</code>,输入<code>c/c++</code>,选择<code>c/c++:编辑配置(UI)</code>:</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.18/post/VSCode%E9%85%8D%E7%BD%AECC++%E7%8E%AF%E5%A2%83/%E9%85%8D%E7%BD%AE1.png" alt="配置1.png"></p><p>进入后找到红框对应选项,分别选<code>g++.exe</code>及<code>windows-gcc-x64</code>:</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.18/post/VSCode%E9%85%8D%E7%BD%AECC++%E7%8E%AF%E5%A2%83/%E9%85%8D%E7%BD%AE2.png" alt="配置2.png"></p><p>设置完成后,会出现一个<code>c_cpp_properties.json</code>文件,将里面的”compilerPath”字段改为bin文件夹中的g++.exe的路径,分隔符为\,如:D:\mingw64\bin\g++.exe</p><p>新建一个<code>hello.c</code>文件,写入以下内容:</p><figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string"><stdio.h></span></span></span><br><span class="line"><span class="type">int</span> <span class="title function_">main</span><span class="params">(<span class="type">void</span>)</span></span><br><span class="line">{</span><br><span class="line"> <span class="built_in">printf</span>(<span class="string">"hello world"</span>);</span><br><span class="line"> getchar();</span><br><span class="line">}</span><br></pre></td></tr></table></figure><h2 id="配置调试设置"><a href="#配置调试设置" class="headerlink" title="配置调试设置"></a>配置调试设置</h2><p>按下F5进行调试,选择<code>C++(GDB/LLDB)</code>,</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.18/post/VSCode%E9%85%8D%E7%BD%AECC++%E7%8E%AF%E5%A2%83/%E9%85%8D%E7%BD%AE4.png" alt="配置4.png"></p><p>便会在.vscode文件夹中自动生成launch.json文件,内容如下:</p><figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br></pre></td><td class="code"><pre><span class="line"><span class="punctuation">{</span></span><br><span class="line"> <span class="comment">// 使用 IntelliSense 了解相关属性。 </span></span><br><span class="line"> <span class="comment">// 悬停以查看现有属性的描述。</span></span><br><span class="line"> <span class="comment">// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387</span></span><br><span class="line"> <span class="attr">"version"</span><span class="punctuation">:</span> <span class="string">"0.2.0"</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">"configurations"</span><span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"></span><br><span class="line"> <span class="punctuation">{</span></span><br><span class="line"> <span class="attr">"name"</span><span class="punctuation">:</span> <span class="string">"(gdb) Launch"</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">"preLaunchTask"</span><span class="punctuation">:</span> <span class="string">"C/C++: g++.exe 生成活动文件"</span><span class="punctuation">,</span><span class="comment">//调试前执行的任务,就是之前配置的tasks.json中的label字段</span></span><br><span class="line"> <span class="attr">"type"</span><span class="punctuation">:</span> <span class="string">"cppdbg"</span><span class="punctuation">,</span><span class="comment">//配置类型,只能为cppdbg</span></span><br><span class="line"> <span class="attr">"request"</span><span class="punctuation">:</span> <span class="string">"launch"</span><span class="punctuation">,</span><span class="comment">//请求配置类型,可以为launch(启动)或attach(附加)</span></span><br><span class="line"> <span class="attr">"program"</span><span class="punctuation">:</span> <span class="string">"${fileDirname}\\${fileBasenameNoExtension}.exe"</span><span class="punctuation">,</span><span class="comment">//调试程序的路径名称</span></span><br><span class="line"> <span class="attr">"args"</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">]</span><span class="punctuation">,</span><span class="comment">//调试传递参数</span></span><br><span class="line"> <span class="attr">"stopAtEntry"</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">false</span></span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">"cwd"</span><span class="punctuation">:</span> <span class="string">"${workspaceFolder}"</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">"environment"</span><span class="punctuation">:</span> <span class="punctuation">[</span><span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">"externalConsole"</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">true</span></span><span class="punctuation">,</span><span class="comment">//true显示外置的控制台窗口,false显示内置终端</span></span><br><span class="line"> <span class="attr">"MIMode"</span><span class="punctuation">:</span> <span class="string">"gdb"</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">"miDebuggerPath"</span><span class="punctuation">:</span> <span class="string">"D:\\mingw64\\bin\\gdb.exe"</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">"setupCommands"</span><span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"> <span class="punctuation">{</span></span><br><span class="line"> <span class="attr">"description"</span><span class="punctuation">:</span> <span class="string">"Enable pretty-printing for gdb"</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">"text"</span><span class="punctuation">:</span> <span class="string">"-enable-pretty-printing"</span><span class="punctuation">,</span></span><br><span class="line"> <span class="attr">"ignoreFailures"</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">true</span></span></span><br><span class="line"> <span class="punctuation">}</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"> <span class="punctuation">}</span></span><br><span class="line"> <span class="punctuation">]</span></span><br><span class="line"><span class="punctuation">}</span></span><br></pre></td></tr></table></figure><blockquote><p>注意:需更改<code>miDebuggerPath</code>字段路径。</p></blockquote><h2 id="配置构建任务"><a href="#配置构建任务" class="headerlink" title="配置构建任务"></a>配置构建任务</h2><p>按下<code>Ctrl+Shift+P</code>调出命令面板,输入<code>tasks</code>,选择<code>Tasks:Configure Default Build Task</code>:</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.18/post/VSCode%E9%85%8D%E7%BD%AECC++%E7%8E%AF%E5%A2%83/%E9%85%8D%E7%BD%AE3.png" alt="配置3.png"></p><p>再选择<code>C/C++: g++.exe build active file</code></p><p>此时会出现一个名为tasks.json的配置文件,内容如下:</p><figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br></pre></td><td class="code"><pre><span class="line"><span class="punctuation">{</span></span><br><span class="line"><span class="attr">"version"</span><span class="punctuation">:</span> <span class="string">"2.0.0"</span><span class="punctuation">,</span></span><br><span class="line"><span class="attr">"tasks"</span><span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"><span class="punctuation">{</span></span><br><span class="line"><span class="attr">"type"</span><span class="punctuation">:</span> <span class="string">"cppbuild"</span><span class="punctuation">,</span></span><br><span class="line"><span class="attr">"label"</span><span class="punctuation">:</span> <span class="string">"C/C++: g++.exe 生成活动文件"</span><span class="punctuation">,</span></span><br><span class="line"><span class="attr">"command"</span><span class="punctuation">:</span> <span class="string">"D:\\mingw64\\bin\\g++.exe"</span><span class="punctuation">,</span></span><br><span class="line"><span class="attr">"args"</span><span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"><span class="string">"-fdiagnostics-color=always"</span><span class="punctuation">,</span></span><br><span class="line"><span class="string">"-g"</span><span class="punctuation">,</span></span><br><span class="line"><span class="string">"${file}"</span><span class="punctuation">,</span></span><br><span class="line"><span class="string">"-o"</span><span class="punctuation">,</span></span><br><span class="line"><span class="string">"${fileDirname}\\${fileBasenameNoExtension}.exe"</span></span><br><span class="line"><span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"><span class="attr">"options"</span><span class="punctuation">:</span> <span class="punctuation">{</span></span><br><span class="line"><span class="attr">"cwd"</span><span class="punctuation">:</span> <span class="string">"D:/mingw64/bin"</span></span><br><span class="line"><span class="punctuation">}</span><span class="punctuation">,</span></span><br><span class="line"><span class="attr">"problemMatcher"</span><span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line"><span class="string">"$gcc"</span></span><br><span class="line"><span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line"><span class="attr">"group"</span><span class="punctuation">:</span> <span class="punctuation">{</span></span><br><span class="line"><span class="attr">"kind"</span><span class="punctuation">:</span> <span class="string">"build"</span><span class="punctuation">,</span></span><br><span class="line"><span class="attr">"isDefault"</span><span class="punctuation">:</span> <span class="literal"><span class="keyword">true</span></span></span><br><span class="line"><span class="punctuation">}</span><span class="punctuation">,</span></span><br><span class="line"><span class="attr">"detail"</span><span class="punctuation">:</span> <span class="string">"编译器: D:/mingw64/bin/g++.exe"</span></span><br><span class="line"><span class="punctuation">}</span></span><br><span class="line"><span class="punctuation">]</span></span><br><span class="line"><span class="punctuation">}</span></span><br></pre></td></tr></table></figure><blockquote><p>注意:launch.json文件中的<code>preLaunchTask</code>字段需与tasks文件中的<code>label</code>字段一致。</p></blockquote><h1 id="完成"><a href="#完成" class="headerlink" title="完成"></a>完成</h1>]]></content>
<summary type="html">关于如何在VSCode配置C/C++环境的详细教程。</summary>
<category term="学习笔记" scheme="https://aciano.top/categories/%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/"/>
<category term="C" scheme="https://aciano.top/tags/C/"/>
</entry>
<entry>
<title>省赛总结·轻舟已过万重山</title>
<link href="https://aciano.top/posts/3362/"/>
<id>https://aciano.top/posts/3362/</id>
<published>2023-07-22T04:23:58.000Z</published>
<updated>2024-08-08T11:41:09.633Z</updated>
<content type="html"><![CDATA[<p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.18/post/%E7%9C%81%E8%B5%9B%E6%80%BB%E7%BB%93%C2%B7%E8%BD%BB%E8%88%9F%E5%B7%B2%E8%BF%87%E4%B8%87%E9%87%8D%E5%B1%B1/cover.jpg" alt="cover.jpg"></p><h1 id="轻舟已过万重山"><a href="#轻舟已过万重山" class="headerlink" title="轻舟已过万重山"></a>轻舟已过万重山</h1><p> 20号上午,天气微凉,空气中夹杂着朦胧的小雨。我们踏上了前往珠海参加省赛的路途。六个小时的颠簸车程,令抵达珠海的我头晕不已,到达酒店后倒头就睡。</p><p> 提交PPT、演练答辩,商讨细节,一晚时间很快便过。</p><p> 第二天醒来,我看着窗外,迎来了迷人的日出,也迎来了期待已久的省赛。进入会场后,我们马不停蹄地开始取套件、测试硬件、测试作品,商量答辩细节。很快,便轮到了我们。</p><p> 答辩完成后,我松了一口气,因为展示的过程很顺利,没有出现意外,同时三位评委中两位评委都没有提出问题,而问题也没有太过刁钻,很轻松地回答了过去。既然开了个好头,那接下来的技术测试我便要好好应对了。回到座位上的我心里暗暗想。</p><p> 时间在不知不觉中慢慢流逝,当来到午餐时间时,我正为解决了识别颜色并框出的题目而暗喜时,传来了不好的消息,貌似模型训练无法正常运转。我开始查看软件报错,都是些从未见过的信息,意识到这条路可能无法走通时,我开始寻找第二种实现方法,最后想到小方舟的自学习分类可以实现这个功能,便让梁嘉欣重新裁剪图片,而我写小方舟的代码,最后小方舟实现了分类功能,时间也刚好耗尽。</p><p> 盖上电脑,等待评委验收的时候是最煎熬的,脑中闪过所有的最坏结果,就如同中考收卷时的感受一模一样。</p><p> 第一题识别二维码很轻松拿到三十分,第二题的识别红色并框出形状在我意料之中,拿下三分。到了识别黄色时尝试几次都无法实现便果断跳过不浪费时间,可到再后面的同时提取两种颜色时我便傻了眼,根本没预料到这种情况,于是无法实现。再到第三题识别主板,要求同时框出并识别主板,小方舟的自学习属于目标分类,而题目要求目标检测,跑题,完毕三十三分。签名确认成绩完毕后心里霎时暗淡一大片,心里想着高开低走一等无望咯。</p><p> 在离开会场见到光宇老师那亲切的笑脸后,我的心顿时释然了一大半,既然我已尽力,剩下便交给天命吧。晚上回到酒店后,我开始不断复盘整个比赛过程,技术测试时浪费的时间,有硬件的受限,但更多是因自己技术的不足,假设我会Python实现的话,便不用花费时间等待k210板烧录固件,便能拿多几十分了。</p><p> 翌日,当我正漫无目的地欣赏着邮局里的优美邮票时,叶思铭走过来吐槽我:“你们拿了一等奖!怎么还板着个脸。”这时我才得知成绩,对于这个一等奖,似乎既在意料之中又在意料之外。</p><p> 回想起初一时为社团招新成员面试时,詹校让我回答给新成员的问题:你觉得加入社团参加比赛给你带来了什么?彼时的我回答了一个十分肤浅的答案:获奖可以上台领奖状,在学校里出名。我想我现在可以再次认真地回答这个问题了。通过这些经历,我改变了以往腼腆和不自信的表现,通过比赛的不断磨炼,我有了上台发言展示的勇气,可以在全班和全校前自信地发言,不再胆怯。通过这些经历,我激发了对计算机的热爱,找到了以后的目标。同时在社团活动中,我学到了很多不同方面的知识,结识了很多优秀的学长学姐们,他们都成为我的学习榜样。</p><p> 最后,要感谢学校为我提供良好的学习环境,使我不断得到成长和历练;感谢詹校、曾老师、黄光宇老师和黄惠娟老师的悉心教导;感谢我队友梁嘉欣的优秀配合,是你们使我走得越来越远。这是我第四次也是最后一次代表十七中参加省赛,已经毕业的我不会辜负母校及老师们的期望,继续前行。也感谢我自己的努力,一等奖的成绩为我初中生涯画上了一个完美的句号。</p><p> 回头看,轻舟已过万重山;向前看,前路漫漫亦灿灿。</p><blockquote><p>2023年7月22日写于珠海</p></blockquote>]]></content>
<summary type="html"><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.18/post/%E7%9C%81%E8%B5%9B%E6%80%BB%E7%BB%93%C2%B7%E8%BD%BB%E8%88%9F%E5%B7%B2%E8%BF%8</summary>
<category term="个人文章" scheme="https://aciano.top/categories/%E4%B8%AA%E4%BA%BA%E6%96%87%E7%AB%A0/"/>
<category term="个人文章" scheme="https://aciano.top/tags/%E4%B8%AA%E4%BA%BA%E6%96%87%E7%AB%A0/"/>
</entry>
<entry>
<title>使用Mx_Yolo_v3训练K210模型文件</title>
<link href="https://aciano.top/posts/k210/"/>
<id>https://aciano.top/posts/k210/</id>
<published>2023-07-20T02:23:58.000Z</published>
<updated>2023-07-20T02:23:58.000Z</updated>
<content type="html"><![CDATA[<h1 id="一、功能介绍"><a href="#一、功能介绍" class="headerlink" title="一、功能介绍"></a>一、功能介绍</h1><p>目前提供两种训练:</p><ul><li>目标分类: 识别图片所属的种类, 比如图中是苹果还是杯子, 没有坐标。 如下图,识别到了苹果,是苹果的概率为0.8</li></ul><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E8%8B%B9%E6%9E%9C%E7%9B%AE%E6%A0%87%E5%88%86%E7%B1%BB.png" alt="苹果目标分类.png"></p><ul><li>目标检测: 检测图片中物体的位置, 并且输出这个物体的坐标和物体大小(即框出认识的物体)。 如下图, 识别到了苹果, 并且框出了位置, 是苹果的概率为0.8</li></ul><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E8%8B%B9%E6%9E%9C%E7%9B%AE%E6%A0%87%E8%AF%86%E5%88%AB.png" alt="苹果目标识别.png"></p><h1 id="二、确定方案"><a href="#二、确定方案" class="headerlink" title="二、确定方案"></a>二、确定方案</h1><ol><li><p>首先确定要训练哪种模型。<br>在上面支持的模型中选择一个,如果不需要检测物体坐标, 用目标分类, 需要坐标则目标识别,<br>两者处理数据要做的工作和格式都不一样, 后者会复杂很多。</p></li><li><p>确定分类。 包括分类数量, 具体分类。 比如这里以识别红色小球和玩具为例:</p></li></ol><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E7%A1%AE%E5%AE%9A%E5%88%86%E7%B1%BB1.png" alt="确定分类1.png"><br><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E7%A1%AE%E5%AE%9A%E5%88%86%E7%B1%BB2.png" alt="确定分类2.png"></p><p>所以共两个分类: <code>ball</code> 和 <code>toy</code>, 我们也称之为<code>标签(label)</code>,</p><blockquote><p>注意!分类名(标签/label)只能使用英文字符和下划线</p></blockquote><ol start="3"><li>确定分辨率。 图片的分辨率也十分重要,不管是在采集、训练,还是使用时, 都需要十分注意, 稍不注意,模型可能就无法使用或者识别精度低。<br>以下为Maixhub目前支持的分辨率,其它分辨率将会训练失败:</li></ol><p>目标分类、目标检测: <code>224x224</code>(推荐)</p><p>确定采集数据集(这里就是所有图片的统称)数量。 即确定好每个分类的图片数量,方便后面采集图片快速准确进行,</p><h1 id="三、获取,处理数据集"><a href="#三、获取,处理数据集" class="headerlink" title="三、获取,处理数据集"></a>三、获取,处理数据集</h1><h2 id="1-采集数据"><a href="#1-采集数据" class="headerlink" title="1.采集数据"></a>1.采集数据</h2><ol><li><p>图片数据的采集可以使用任意的图片采集工具。某些特定的图片数据,可能需要用k210主控板的摄像头来拍摄,这样数据使用会比较准确。</p></li><li><p>手机拍照, 然后使用预处理工具处理成需要的分辨率</p></li><li><p>可以使用网络爬虫在网络上按名称爬取图片,在Mx_yolo_v3的“工具集”菜单中,使用图片爬取工具可以爬取需要的照片。</p></li></ol><blockquote><p>注:要把无效图片去除,否则会影响训练!</p></blockquote><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E6%95%B0%E6%8D%AE%E9%87%87%E9%9B%86%E7%88%AC%E8%99%AB.png" alt="数据采集爬虫.png"></p><p>得到图片数据后,将其导入电脑:</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E5%BE%97%E5%88%B0%E5%9B%BE%E7%89%87.png" alt="得到图片.png"></p><h2 id="2-处理图片分辨率"><a href="#2-处理图片分辨率" class="headerlink" title="2.处理图片分辨率"></a>2.处理图片分辨率</h2><p>打开<code>Image_tool.exe</code>软件,看到以下界面,点击<code>选择图像文件夹...</code>,选择存放采集照片的文件夹,设置分辨率为<code>224*224</code>。</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E6%89%93%E5%BC%80%E5%9B%BE%E7%89%87%E5%A4%84%E7%90%86%E8%BD%AF%E4%BB%B6.png" alt="打开图片处理软件.png"></p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E6%89%93%E5%BC%80%E6%96%87%E4%BB%B6%E5%A4%B9.png" alt="打开文件夹.png"></p><p>等待处理完毕后,即可得到<code>224*224</code>分辨率的图片:</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E5%A4%84%E7%90%86%E5%9B%BE%E7%89%87%E5%AE%8C%E6%88%90.png" alt="处理图片完成.png"></p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E5%A4%84%E7%90%86%E5%9B%BE%E7%89%87%E5%AE%8C%E6%88%901.png" alt="处理图片完成1.png"></p><h2 id="3-对图片进行更名"><a href="#3-对图片进行更名" class="headerlink" title="3.对图片进行更名"></a>3.对图片进行更名</h2><p>打开 拖把更名器 文件夹中的<code>xTools.exe</code></p><p>点击菜单栏中的<code>序号</code>,接下来按照下图步骤操作即可:</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E5%BA%8F%E5%8F%B7%E6%9B%B4%E5%90%8D.png" alt="序号更名.png"></p><p>应用更改后即可得到按照序号排列的文件名:</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E6%9B%B4%E5%90%8D%E5%AE%8C%E6%88%90.png" alt="更名完成.png"></p><h2 id="4-标注图片"><a href="#4-标注图片" class="headerlink" title="4.标注图片"></a>4.标注图片</h2><blockquote><p>此步骤仅<code>目标检测</code>需要操作!</p></blockquote><blockquote><p><code>目标分类</code>可跳过此步骤。</p></blockquote><p>新建一个<code>mask</code>文件夹,里面新建<code>images</code>和<code>xml</code>文件夹,将先前处理好的图片数据丢入<code>images</code>文件夹。</p><p>打开<code>LabelImg</code>软件:</p><ol><li>更改图片所在文件夹;</li><li>更改标签所在文件夹;</li></ol><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E6%A0%87%E6%B3%A8%E8%BD%AF%E4%BB%B6%E9%80%89%E6%8B%A9%E6%96%87%E4%BB%B6%E5%A4%B9.png" alt="标注软件选择文件夹.png"></p><ol><li>点击 <code>Create RectBox</code> 进行标注;</li><li>在图片上拖选出需要识别的标注部分;</li><li>输入<code>标签/label</code>名,点击OK;</li><li>点击 <code>Save</code> 保存;</li><li>点击<code>Next Images</code> 标注下一张图片;</li></ol><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E6%A0%87%E6%B3%A8%E8%BD%AF%E4%BB%B6%E6%A0%87%E6%B3%A8%E8%BF%87%E7%A8%8B.png" alt="标注软件标注过程.png"></p><p>到此数据集的处理和准备工作完毕,接下来就可以开始训练模型了!</p><h1 id="四、训练模型"><a href="#四、训练模型" class="headerlink" title="四、训练模型"></a>四、训练模型</h1><h2 id="1-目标分类"><a href="#1-目标分类" class="headerlink" title="1.目标分类"></a>1.目标分类</h2><h3 id="1-1-线上Maixhub平台"><a href="#1-1-线上Maixhub平台" class="headerlink" title="1.1 线上Maixhub平台"></a>1.1 线上Maixhub平台</h3><h4 id="打包数据集"><a href="#打包数据集" class="headerlink" title="打包数据集"></a>打包数据集</h4><p>将数据集按以下分支保存,</p><p>并将其压缩为<code>zip</code>文件:</p><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">datasets.zip</span><br><span class="line"> |</span><br><span class="line"> datasets</span><br><span class="line"> |</span><br><span class="line"> ----mask</span><br><span class="line"> | |</span><br><span class="line"> | ---<span class="number">0.</span>jpg</span><br><span class="line"> | |</span><br><span class="line"> | ---<span class="number">1.</span>jpg</span><br><span class="line"> | |</span><br><span class="line"> | ---<span class="number">2.</span>jpg</span><br><span class="line"> |</span><br><span class="line"> ----redbull</span><br><span class="line"> |</span><br><span class="line"> ---<span class="number">0.</span>jpg</span><br><span class="line"> |</span><br><span class="line"> ---<span class="number">1.</span>jpg</span><br></pre></td></tr></table></figure><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E6%89%93%E5%8C%85%E6%95%B0%E6%8D%AE%E9%9B%861.png" alt="打包数据集1.png"></p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E6%89%93%E5%8C%85%E6%95%B0%E6%8D%AE%E9%9B%862.png" alt="打包数据集2.png"></p><p>压缩文件命名为<code>datasets.zip</code>,注意大小不要超过20MB。</p><h4 id="训练过程"><a href="#训练过程" class="headerlink" title="训练过程"></a>训练过程</h4><p>打开Maixhub注册地址:<a href="https://www.maixhub.com/register">https://www.maixhub.com/register</a>,注册一个账号:</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E6%B3%A8%E5%86%8C%E5%B9%B3%E5%8F%B0.png" alt="注册平台.png"></p><blockquote><p>注册成功后记得去邮箱激活账号。</p></blockquote><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E6%BF%80%E6%B4%BB%E8%B4%A6%E5%8F%B7.png" alt="激活账号.png"></p><p>回到首页,点击网页顶部的<code>模型训练</code></p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E6%A8%A1%E5%9E%8B%E8%AE%AD%E7%BB%831.png" alt="模型训练1.png"></p><p>选择<code>物体分类</code>,点击 Next :</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E6%A8%A1%E5%9E%8B%E8%AE%AD%E7%BB%832.png" alt="模型训练2.png"></p><p>上传前面打包好的数据集:</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E6%A8%A1%E5%9E%8B%E8%AE%AD%E7%BB%833.jpg" alt="模型训练3.png"></p><p>上传完成后点击<code>Submit</code>,之后耐心等待即可:</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E6%A8%A1%E5%9E%8B%E8%AE%AD%E7%BB%834.png" alt="模型训练4.png"></p><p>等待一段时间训练完成后,来到此界面,点击 Download 下载训练好的模型文件:</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E6%A8%A1%E5%9E%8B%E8%AE%AD%E7%BB%835.png" alt="模型训练5.png"></p><p>下载回来得到以下文件,将其全部丢入K210板的sd卡中,上电之后即可实现简单的目标分类功能:</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E8%AE%AD%E7%BB%83%E7%BB%93%E6%9E%9C%E4%B8%8B%E8%BD%BD%E5%8E%8B%E7%BC%A9%E5%8C%85.png" alt="训练结果下载压缩包.png"></p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E5%88%86%E7%B1%BB%E8%AF%86%E5%88%AB%E6%95%88%E6%9E%9C1.jpg" alt="分类识别效果1.jpg"></p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E5%88%86%E7%B1%BB%E8%AF%86%E5%88%AB%E6%95%88%E6%9E%9C2.jpg" alt="分类识别效果2.jpg"></p><h3 id="1-2-线下Mx-Yolo-v3训练"><a href="#1-2-线下Mx-Yolo-v3训练" class="headerlink" title="1.2 线下Mx_Yolo_v3训练"></a>1.2 线下Mx_Yolo_v3训练</h3><h4 id="保存数据集"><a href="#保存数据集" class="headerlink" title="保存数据集"></a>保存数据集</h4><p>将数据集按以下分支保存,</p><p>线下训练无需打包为压缩包。</p><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">images</span><br><span class="line"> |</span><br><span class="line"> ----apples</span><br><span class="line"> | |</span><br><span class="line"> | ---<span class="number">0.</span>jpg</span><br><span class="line"> | |</span><br><span class="line"> | ---<span class="number">1.</span>jpg</span><br><span class="line"> | |</span><br><span class="line"> | ---<span class="number">2.</span>jpg</span><br><span class="line"> |</span><br><span class="line"> ----bananas</span><br><span class="line"> |</span><br><span class="line"> ---<span class="number">0.</span>jpg</span><br><span class="line"> |</span><br><span class="line"> ---<span class="number">1.</span>jpg</span><br></pre></td></tr></table></figure><h4 id="进行训练"><a href="#进行训练" class="headerlink" title="进行训练"></a>进行训练</h4><p>打开<code>Mxyolov3</code>,点击<code>图像分类</code></p><p>点击<code>选择</code>,选取到刚才调整好的<code>images</code>文件夹,再点击<code>提取</code>,此时正常来说可以显示出你的各label名称,比如我的是<code>apples,bananas</code>。</p><p>其他配置参数可以保持默认无需更改,如果需要更高的识别率可以调整训练次数的多少。</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/yolo%E5%9B%BE%E5%83%8F%E5%88%86%E7%B1%BB.png" alt="yolo图像分类.png"></p><p>点击开始训练,耐心等待一段时间即可。</p><p>跑完训练过程后,会出现两个结果图,关闭即可,等待信息栏出现over,end等字样即代表训练过程完成,会自动弹出存放模型文件的文件夹。</p><blockquote><p>需记录下此文件夹路径,后面需要用到,一般在Mx_yolo安装目录下的<code>Model_file</code>文件夹中。</p></blockquote><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/yolo%E5%9B%BE%E5%83%8F%E5%88%86%E7%B1%BB%E8%AE%AD%E7%BB%831.jpg" alt="yolo图像分类训练1.jpg"></p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/yolo%E5%9B%BE%E5%83%8F%E5%88%86%E7%B1%BB%E8%AE%AD%E7%BB%832.png" alt="yolo图像分类训练2.png"></p><h4 id="测试模型"><a href="#测试模型" class="headerlink" title="测试模型"></a>测试模型</h4><p>点击右上角的<code>测试模型</code>,选择刚才训练完毕后弹出的文件夹中的<code>weights.h5</code>文件,得到以下结果。</p><p>可以看到有关苹果的图片被标注上apples,说明模型可以正常使用。</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/yolo%E5%9B%BE%E5%83%8F%E5%88%86%E7%B1%BB%E6%B5%8B%E8%AF%95%E6%A8%A1%E5%9E%8B.jpg" alt="yolo图像分类测试模型.jpg"></p><h4 id="转换模型"><a href="#转换模型" class="headerlink" title="转换模型"></a>转换模型</h4><p>Mx_yolo_v3中训练出的模型无法直接在K210板上使用,需要转换为kmodel文件,</p><p>在软件中内置了模型转换软件,点击右上角的<code>转换模型</code>,进入以下界面:</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/yolo%E5%9B%BE%E5%83%8F%E5%88%86%E7%B1%BB%E6%A8%A1%E5%9E%8B%E8%BD%AC%E6%8D%A2.png" alt="yolo图像分类模型转换.png"></p><ol><li>模型输入路径选择刚才弹出的<code>Model_file</code>文件夹下的<code>weights.tflite</code>文件;</li><li>模型输出路径选择你需要导出的文件所在路径;</li><li>量化图片路径选择你的图片数据集。</li></ol><p>转换成功后即可放入sd卡在K210板中运行。</p><h2 id="2-目标检测"><a href="#2-目标检测" class="headerlink" title="2.目标检测"></a>2.目标检测</h2><h3 id="1-1-线上-Maixhub-平台"><a href="#1-1-线上-Maixhub-平台" class="headerlink" title="1.1 线上 Maixhub 平台"></a>1.1 线上 Maixhub 平台</h3><h4 id="打包数据集-1"><a href="#打包数据集-1" class="headerlink" title="打包数据集"></a>打包数据集</h4><p>新建一个<code>labels.txt</code>, 输入标记的标签, 每行一个, 比如这里:</p><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">ball</span><br><span class="line">toy</span><br></pre></td></tr></table></figure><p>这是必须的, 否则数据会无效。</p><p>然后目录结构如下:</p><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line">datasets.zip</span><br><span class="line"> |</span><br><span class="line"> datasets</span><br><span class="line"> |</span><br><span class="line"> ----images</span><br><span class="line"> | |</span><br><span class="line"> | |---<span class="number">0.</span>jpg</span><br><span class="line"> | |</span><br><span class="line"> | ---<span class="number">1.</span>jpg</span><br><span class="line"> |</span><br><span class="line"> |------xml</span><br><span class="line"> | |---<span class="number">0.</span>xml</span><br><span class="line"> | |</span><br><span class="line"> | |---<span class="number">1.</span>xml</span><br><span class="line"> |</span><br><span class="line"> ----labels.txt</span><br></pre></td></tr></table></figure><p>或者两级labelimg输出:</p><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br></pre></td><td class="code"><pre><span class="line">datasets.zip</span><br><span class="line"> |</span><br><span class="line"> datasets</span><br><span class="line"> |</span><br><span class="line"> |---images</span><br><span class="line"> | |</span><br><span class="line"> | ----ball</span><br><span class="line"> | | |</span><br><span class="line"> | | ---<span class="number">0.</span>jpg</span><br><span class="line"> | | |</span><br><span class="line"> | | ---<span class="number">1.</span>jpg</span><br><span class="line"> | |</span><br><span class="line"> | ----toy</span><br><span class="line"> | | |</span><br><span class="line"> | | ---<span class="number">0.</span>jpg</span><br><span class="line"> | ---pic0.jpg</span><br><span class="line"> |---xml</span><br><span class="line"> | |</span><br><span class="line"> | ----ball</span><br><span class="line"> | | |</span><br><span class="line"> | | ---<span class="number">0.</span>xml</span><br><span class="line"> | | |</span><br><span class="line"> | | ---<span class="number">1.</span>xml</span><br><span class="line"> | |</span><br><span class="line"> | ----toy</span><br><span class="line"> | | |</span><br><span class="line"> | | ---<span class="number">0.</span>xml</span><br><span class="line"> | ----pic0.xml</span><br><span class="line"> --labels.txt</span><br></pre></td></tr></table></figure><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/label%E6%96%87%E4%BB%B6.png" alt="label文件.png"></p><h4 id="训练过程-1"><a href="#训练过程-1" class="headerlink" title="训练过程"></a>训练过程</h4><p>目标检测与目标分类的线上训练过程完全相同,仅需更改为对应模式即可,</p><p>参考<code>四、 1. 1.1 训练过程</code>处步骤即可。</p><h3 id="1-2-线下-Mx-yolo-v3-训练"><a href="#1-2-线下-Mx-yolo-v3-训练" class="headerlink" title="1.2 线下 Mx_yolo_v3 训练"></a>1.2 线下 Mx_yolo_v3 训练</h3><p>打开软件,选择<code>目标识别</code></p><ol><li>选择网络为<code>Yolov2-K210</code>;</li><li>训练图片地址选择为你图片训练集的路径;</li><li>训练标签地址选择为你为图片标注后保存的xml文件路径;</li><li>点击<code>自动提取</code>,将提取出种类名称,即label;</li><li>点击<code>计算</code>,将自动计算出锚点,即author,后面会用到。</li><li>其他配置可保持默认不变,建议取消勾选数据校验,容易闪退。</li></ol><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/yolo%E7%9B%AE%E6%A0%87%E6%A3%80%E6%B5%8B%E7%95%8C%E9%9D%A2.jpg" alt="yolo目标检测界面.jpg"></p><p>点击<code>开始训练</code>即可;</p><p>等待训练完成后会出现类似于目标分类后的曲线图,关闭后再稍等片刻即可。</p><h4 id="模型转换"><a href="#模型转换" class="headerlink" title="模型转换"></a>模型转换</h4><p>此步骤与前面大同小异,参考<code>四、 1. 1.2 测试模型、转换模型</code>处步骤。</p><h1 id="五、上传程序"><a href="#五、上传程序" class="headerlink" title="五、上传程序"></a>五、上传程序</h1><h2 id="目标分类"><a href="#目标分类" class="headerlink" title="目标分类"></a>目标分类</h2><p>使用以下代码:</p><ol><li>需要在代码15行及70行修改引用的kmodel文件:<code>model_addr="/sd/fruit.kmodel"</code></li><li>需要在代码68行修改你的label名:<code>labels = ["apples", "bananas"]</code></li></ol><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> sensor, image, lcd, time</span><br><span class="line"><span class="keyword">import</span> KPU <span class="keyword">as</span> kpu</span><br><span class="line"><span class="keyword">import</span> gc, sys</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">lcd_show_except</span>(<span class="params">e</span>):</span><br><span class="line"> <span class="keyword">import</span> uio</span><br><span class="line"> err_str = uio.StringIO()</span><br><span class="line"> sys.print_exception(e, err_str)</span><br><span class="line"> err_str = err_str.getvalue()</span><br><span class="line"> img = image.Image(size=(<span class="number">224</span>,<span class="number">224</span>))</span><br><span class="line"> img.draw_string(<span class="number">0</span>, <span class="number">10</span>, err_str, scale=<span class="number">1</span>, color=(<span class="number">0xff</span>,<span class="number">0x00</span>,<span class="number">0x00</span>))</span><br><span class="line"> lcd.display(img)</span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">main</span>(<span class="params">labels = <span class="literal">None</span>, model_addr=<span class="string">"/sd/fruit.kmodel"</span>, sensor_window=(<span class="params"><span class="number">224</span>, <span class="number">224</span></span>), lcd_rotation=<span class="number">0</span>, sensor_hmirror=<span class="literal">False</span>, sensor_vflip=<span class="literal">False</span></span>):</span><br><span class="line"> sensor.reset()</span><br><span class="line"> sensor.set_pixformat(sensor.RGB565)</span><br><span class="line"> sensor.set_framesize(sensor.QVGA)</span><br><span class="line"> sensor.set_windowing(sensor_window)</span><br><span class="line"> sensor.set_hmirror(sensor_hmirror)</span><br><span class="line"> sensor.set_vflip(sensor_vflip)</span><br><span class="line"> sensor.run(<span class="number">1</span>)</span><br><span class="line"></span><br><span class="line"> lcd.init(<span class="built_in">type</span>=<span class="number">1</span>)</span><br><span class="line"> lcd.rotation(lcd_rotation)</span><br><span class="line"> lcd.clear(lcd.WHITE)</span><br><span class="line"></span><br><span class="line"> <span class="keyword">if</span> <span class="keyword">not</span> labels:</span><br><span class="line"> <span class="keyword">with</span> <span class="built_in">open</span>(<span class="string">'labels.txt'</span>,<span class="string">'r'</span>) <span class="keyword">as</span> f:</span><br><span class="line"> <span class="built_in">exec</span>(f.read())</span><br><span class="line"> <span class="keyword">if</span> <span class="keyword">not</span> labels:</span><br><span class="line"> <span class="built_in">print</span>(<span class="string">"no labels.txt"</span>)</span><br><span class="line"> img = image.Image(size=(<span class="number">320</span>, <span class="number">240</span>))</span><br><span class="line"> img.draw_string(<span class="number">90</span>, <span class="number">110</span>, <span class="string">"no labels.txt"</span>, color=(<span class="number">255</span>, <span class="number">0</span>, <span class="number">0</span>), scale=<span class="number">2</span>)</span><br><span class="line"> lcd.display(img)</span><br><span class="line"> <span class="keyword">return</span> <span class="number">1</span></span><br><span class="line"> <span class="keyword">try</span>:</span><br><span class="line"> img = image.Image(<span class="string">"startup.jpg"</span>)</span><br><span class="line"> lcd.display(img)</span><br><span class="line"> <span class="keyword">except</span> Exception:</span><br><span class="line"> img = image.Image(size=(<span class="number">320</span>, <span class="number">240</span>))</span><br><span class="line"> img.draw_string(<span class="number">90</span>, <span class="number">110</span>, <span class="string">"loading model..."</span>, color=(<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>), scale=<span class="number">2</span>)</span><br><span class="line"> lcd.display(img)</span><br><span class="line"></span><br><span class="line"> <span class="keyword">try</span>:</span><br><span class="line"> task = <span class="literal">None</span></span><br><span class="line"> task = kpu.load(model_addr)</span><br><span class="line"> <span class="keyword">while</span>(<span class="literal">True</span>):</span><br><span class="line"> img = sensor.snapshot()</span><br><span class="line"> t = time.ticks_ms()</span><br><span class="line"> fmap = kpu.forward(task, img)</span><br><span class="line"> t = time.ticks_ms() - t</span><br><span class="line"> plist=fmap[:]</span><br><span class="line"> pmax=<span class="built_in">max</span>(plist) </span><br><span class="line"> max_index=plist.index(pmax)</span><br><span class="line"> img.draw_string(<span class="number">0</span>,<span class="number">0</span>, <span class="string">"%.2f : %s"</span> %(pmax, labels[max_index].strip()), scale=<span class="number">2</span>, color=(<span class="number">255</span>, <span class="number">0</span>, <span class="number">0</span>))</span><br><span class="line"> img.draw_string(<span class="number">0</span>, <span class="number">200</span>, <span class="string">"t:%dms"</span> %(t), scale=<span class="number">2</span>, color=(<span class="number">255</span>, <span class="number">0</span>, <span class="number">0</span>))</span><br><span class="line"> lcd.display(img)</span><br><span class="line"> <span class="keyword">except</span> Exception <span class="keyword">as</span> e:</span><br><span class="line"> <span class="keyword">raise</span> e</span><br><span class="line"> <span class="keyword">finally</span>:</span><br><span class="line"> <span class="keyword">if</span> <span class="keyword">not</span> task <span class="keyword">is</span> <span class="literal">None</span>:</span><br><span class="line"> kpu.deinit(task)</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> __name__ == <span class="string">"__main__"</span>:</span><br><span class="line"> <span class="keyword">try</span>:</span><br><span class="line"> labels = [<span class="string">"apples"</span>, <span class="string">"bananas"</span>]</span><br><span class="line"> <span class="comment"># main(labels=labels, model_addr=0x300000)</span></span><br><span class="line"> main(labels=labels, model_addr=<span class="string">"/sd/fruit.kmodel"</span>)</span><br><span class="line"> <span class="keyword">except</span> Exception <span class="keyword">as</span> e:</span><br><span class="line"> sys.print_exception(e)</span><br><span class="line"> lcd_show_except(e)</span><br><span class="line"> <span class="keyword">finally</span>:</span><br><span class="line"> gc.collect()</span><br></pre></td></tr></table></figure><h2 id="目标检测"><a href="#目标检测" class="headerlink" title="目标检测"></a>目标检测</h2><p>根据实际情况修改即可:</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E7%9B%AE%E6%A0%87%E6%A3%80%E6%B5%8B%E4%BB%A3%E7%A0%81%E6%88%AA%E5%9B%BE.png" alt="目标检测代码截图.png"></p><h1 id="六、出错问题"><a href="#六、出错问题" class="headerlink" title="六、出错问题"></a>六、出错问题</h1><h2 id="1-内存不足"><a href="#1-内存不足" class="headerlink" title="1.内存不足"></a>1.内存不足</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">SYSCALL: Out of memory</span><br><span class="line"></span><br><span class="line">Traceback (most recent call last):</span><br><span class="line"> File <span class="string">"main.py"</span>, line <span class="number">24</span>, <span class="keyword">in</span> <module></span><br><span class="line">ValueError: [Maixduino]kpu: load error:<span class="number">2006</span>, ERR_NO_MEM: memory <span class="keyword">not</span> enough</span><br></pre></td></tr></table></figure><p>解决办法:刷mini固件,<a href="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/mini.bin">下载地址</a></p><h2 id="2-锚点错误"><a href="#2-锚点错误" class="headerlink" title="2.锚点错误"></a>2.锚点错误</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">File <span class="string">"main.py"</span>, line <span class="number">30</span>, <span class="keyword">in</span> <module></span><br><span class="line">ValueError: [MAIXPY]kpu: region_layer_init err!</span><br></pre></td></tr></table></figure><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E7%9B%AE%E6%A0%87%E5%88%86%E7%B1%BB%E9%94%9A%E7%82%B9%E9%94%99%E8%AF%AF.png" alt="目标分类锚点错误.png"></p><p>此问题为使用目标分类模型,但没有使用到锚点所报的错。</p><p>解决方法:参考上文提供的代码,使用Python纯代码编写程序。</p><h2 id="3-转换失败"><a href="#3-转换失败" class="headerlink" title="3.转换失败"></a>3.转换失败</h2><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/%E6%A8%A1%E5%9E%8B%E8%BD%AC%E6%8D%A2%E5%A4%B1%E8%B4%A5.jpg" alt="模型转换失败.jpg"></p><p>解决方法:无,更换电脑重试。</p><h1 id="七、下载资源"><a href="#七、下载资源" class="headerlink" title="七、下载资源"></a>七、下载资源</h1><ul><li><p>Mx_Yolo-v3安装包:<a href="https://www.aliyundrive.com/s/Vknz8mtKqMj">https://www.aliyundrive.com/s/Vknz8mtKqMj</a></p><blockquote><p>提取码zl04</p></blockquote></li><li><p>mini固件:<a href="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/%E4%BD%BF%E7%94%A8Mx_Yolo_v3%E8%AE%AD%E7%BB%83K210%E6%A8%A1%E5%9E%8B%E6%96%87%E4%BB%B6/mini.bin">下载地址</a></p></li><li><p>其他软件及代码等文件:<br>可以在评论区留下邮箱,网盘多有空间及文件类型限制,分享过于麻烦。</p></li></ul><h1 id="八、参考文档"><a href="#八、参考文档" class="headerlink" title="八、参考文档"></a>八、参考文档</h1><ul><li><p><a href="https://www.maixhub.com/ModelTrainingHelp_zh.html">Maixhub 模型训练平台使用说明</a></p></li><li><p><a href="https://mc.dfrobot.com.cn/thread-307935-1-1.html">博派史上最强K210板教程6——模型训练</a></p></li></ul>]]></content>
<summary type="html">详细介绍了使用Mx_Yolo_v3训练K210模型文件的过程,包括本地及线上训练的过程。</summary>
<category term="人工智能" scheme="https://aciano.top/categories/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/"/>
<category term="人工智能" scheme="https://aciano.top/tags/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/"/>
<category term="Yolo" scheme="https://aciano.top/tags/Yolo/"/>
</entry>
<entry>
<title>Python纯代码实现连接SIoT</title>
<link href="https://aciano.top/posts/73ac/"/>
<id>https://aciano.top/posts/73ac/</id>
<published>2023-07-17T09:23:58.000Z</published>
<updated>2023-07-17T09:24:58.000Z</updated>
<content type="html"><![CDATA[<blockquote><p>运行前请确保已安装 paho-mqtt 库,使用命令:<code>pip install paho-mqtt</code> 安装。</p></blockquote><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> paho.mqtt.client <span class="keyword">as</span> mqtt</span><br><span class="line"></span><br><span class="line"><span class="comment"># 定义SIOT服务器的连接信息</span></span><br><span class="line">broker = <span class="string">"192.168.88.108"</span> <span class="comment"># SIoT服务器的地址</span></span><br><span class="line">port = <span class="number">1883</span> <span class="comment"># SIOT服务器的端口号</span></span><br><span class="line">topic = <span class="string">"ai/G5"</span> <span class="comment"># 指定要发布到的主题</span></span><br><span class="line">username = <span class="string">"AIoT"</span></span><br><span class="line">password = <span class="string">"AIoT"</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 连接回调函数</span></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">on_connect</span>(<span class="params">client, userdata, flags, rc</span>):</span><br><span class="line"> <span class="built_in">print</span>(<span class="string">"Connected with result code "</span> + <span class="built_in">str</span>(rc))</span><br><span class="line"> <span class="comment"># 订阅主题(如果需要)</span></span><br><span class="line"> client.subscribe(topic)</span><br><span class="line"></span><br><span class="line"><span class="comment"># 发布消息的回调函数</span></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">on_publish</span>(<span class="params">client, userdata, mid</span>):</span><br><span class="line"> <span class="built_in">print</span>(<span class="string">"Message published"</span>)</span><br><span class="line"></span><br><span class="line"><span class="comment"># 创建MQTT客户端</span></span><br><span class="line">client = mqtt.Client()</span><br><span class="line">client.username_pw_set(username, password)</span><br><span class="line"></span><br><span class="line"><span class="comment"># 设置连接和发布消息的回调函数</span></span><br><span class="line">client.on_connect = on_connect</span><br><span class="line">client.on_publish = on_publish</span><br><span class="line"></span><br><span class="line"><span class="comment"># 连接到SIOT服务器</span></span><br><span class="line">client.connect(broker, port, <span class="number">60</span>)</span><br><span class="line"></span><br><span class="line"><span class="comment"># 待发布的数据</span></span><br><span class="line">data = <span class="string">"hello-from mind+"</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 发布数据到主题</span></span><br><span class="line">client.publish(topic, data)</span><br><span class="line"></span><br><span class="line"><span class="comment"># 保持通信</span></span><br><span class="line">client.loop_forever()</span><br></pre></td></tr></table></figure><p>请自行更改<code>broker</code>、<code>port</code>、<code>topic</code>、<code>username</code>、<code>password</code>及<code>data</code>等字段。</p>]]></content>
<summary type="html">关于使用Python实现连接SIoT的详细代码。</summary>
<category term="IoT物联网" scheme="https://aciano.top/categories/IoT%E7%89%A9%E8%81%94%E7%BD%91/"/>
<category term="SIoT" scheme="https://aciano.top/tags/SIoT/"/>
</entry>
<entry>
<title>论如何将视频导出为图片及批量对文件进行更名</title>
<link href="https://aciano.top/posts/1b30/"/>
<id>https://aciano.top/posts/1b30/</id>
<published>2023-07-16T02:23:58.000Z</published>
<updated>2023-07-16T02:23:58.000Z</updated>
<content type="html"><![CDATA[<h1 id="视频导出为图片"><a href="#视频导出为图片" class="headerlink" title="视频导出为图片"></a>视频导出为图片</h1><ol><li>打开<code>ScreenToGif</code>,点击最右侧的<code>编辑器</code>:</li></ol><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.16/post/%E8%AE%BA%E5%A6%82%E4%BD%95%E5%B0%86%E8%A7%86%E9%A2%91%E5%AF%BC%E5%87%BA%E4%B8%BA%E5%9B%BE%E7%89%87%E5%8F%8A%E6%89%B9%E9%87%8F%E5%AF%B9%E6%96%87%E4%BB%B6%E8%BF%9B%E8%A1%8C%E6%9B%B4%E5%90%8D/%E5%90%AF%E5%8A%A8.png" alt="启动.png"></p><ol start="2"><li>进入编辑器后,将视频拖进软件界面,点击<code>确定</code>:</li></ol><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.16/post/%E8%AE%BA%E5%A6%82%E4%BD%95%E5%B0%86%E8%A7%86%E9%A2%91%E5%AF%BC%E5%87%BA%E4%B8%BA%E5%9B%BE%E7%89%87%E5%8F%8A%E6%89%B9%E9%87%8F%E5%AF%B9%E6%96%87%E4%BB%B6%E8%BF%9B%E8%A1%8C%E6%9B%B4%E5%90%8D/%E5%AF%BC%E5%85%A51.png" alt="导入1.png"></p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.16/post/%E8%AE%BA%E5%A6%82%E4%BD%95%E5%B0%86%E8%A7%86%E9%A2%91%E5%AF%BC%E5%87%BA%E4%B8%BA%E5%9B%BE%E7%89%87%E5%8F%8A%E6%89%B9%E9%87%8F%E5%AF%B9%E6%96%87%E4%BB%B6%E8%BF%9B%E8%A1%8C%E6%9B%B4%E5%90%8D/%E5%AF%BC%E5%85%A52.png" alt="导入2.png"></p><ol start="3"><li>静候导入完成后,随机在下方图片中右键,点击<code>浏览文件夹</code>:</li></ol><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.16/post/%E8%AE%BA%E5%A6%82%E4%BD%95%E5%B0%86%E8%A7%86%E9%A2%91%E5%AF%BC%E5%87%BA%E4%B8%BA%E5%9B%BE%E7%89%87%E5%8F%8A%E6%89%B9%E9%87%8F%E5%AF%B9%E6%96%87%E4%BB%B6%E8%BF%9B%E8%A1%8C%E6%9B%B4%E5%90%8D/%E6%B5%8F%E8%A7%881.png" alt="浏览1.png"></p><ol start="4"><li>获得导出的图片:</li></ol><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.16/post/%E8%AE%BA%E5%A6%82%E4%BD%95%E5%B0%86%E8%A7%86%E9%A2%91%E5%AF%BC%E5%87%BA%E4%B8%BA%E5%9B%BE%E7%89%87%E5%8F%8A%E6%89%B9%E9%87%8F%E5%AF%B9%E6%96%87%E4%BB%B6%E8%BF%9B%E8%A1%8C%E6%9B%B4%E5%90%8D/%E6%B5%8F%E8%A7%882.png" alt="浏览2.png"></p><h1 id="批量进行更名"><a href="#批量进行更名" class="headerlink" title="批量进行更名"></a>批量进行更名</h1><ol><li>打开<code>拖把更名器</code>:</li></ol><blockquote><p>若提示“注册错误”,无需理会,确定即可进入软件。</p></blockquote><ol start="2"><li>在上方菜单栏中点击<code>序号</code>一栏,在模板处输入<code>#</code>,其他配置保持与下图一致,将需要更名的图片全选拖入软件中:</li></ol><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.16/post/%E8%AE%BA%E5%A6%82%E4%BD%95%E5%B0%86%E8%A7%86%E9%A2%91%E5%AF%BC%E5%87%BA%E4%B8%BA%E5%9B%BE%E7%89%87%E5%8F%8A%E6%89%B9%E9%87%8F%E5%AF%B9%E6%96%87%E4%BB%B6%E8%BF%9B%E8%A1%8C%E6%9B%B4%E5%90%8D/%E6%89%93%E5%BC%80%E6%8B%96%E6%8A%8A%E6%9B%B4%E5%90%8D%E5%99%A8.png" alt="打开拖把更名器.png"></p><ol start="3"><li>点击图标栏第四个勾号图标,或按下<code>ctrl + e</code>快捷键,即可得到批量更名后的图片,直接覆盖原文件:</li></ol><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.16/post/%E8%AE%BA%E5%A6%82%E4%BD%95%E5%B0%86%E8%A7%86%E9%A2%91%E5%AF%BC%E5%87%BA%E4%B8%BA%E5%9B%BE%E7%89%87%E5%8F%8A%E6%89%B9%E9%87%8F%E5%AF%B9%E6%96%87%E4%BB%B6%E8%BF%9B%E8%A1%8C%E6%9B%B4%E5%90%8D/%E5%BA%94%E7%94%A8%E6%9B%B4%E5%90%8D.png" alt="应用更名.png"></p>]]></content>
<summary type="html">论如何将视频导出为图片及批量对文件进行更名。</summary>
<category term="技术教程" scheme="https://aciano.top/categories/%E6%8A%80%E6%9C%AF%E6%95%99%E7%A8%8B/"/>
<category term="技术教程" scheme="https://aciano.top/tags/%E6%8A%80%E6%9C%AF%E6%95%99%E7%A8%8B/"/>
</entry>
<entry>
<title>OpenCV及k210实现形状检测并计算面积比</title>
<link href="https://aciano.top/posts/opencv/"/>
<id>https://aciano.top/posts/opencv/</id>
<published>2023-07-12T04:23:58.000Z</published>
<updated>2023-07-12T04:23:58.000Z</updated>
<content type="html"><![CDATA[<h1 id="Python-OpenCV"><a href="#Python-OpenCV" class="headerlink" title="Python + OpenCV"></a>Python + OpenCV</h1><h2 id="详细代码"><a href="#详细代码" class="headerlink" title="详细代码"></a>详细代码</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> cv2</span><br><span class="line"><span class="keyword">import</span> numpy <span class="keyword">as</span> np</span><br><span class="line"></span><br><span class="line"><span class="comment"># 打开摄像头</span></span><br><span class="line">cap = cv2.VideoCapture(<span class="number">0</span>) <span class="comment"># cv2.imread("path/to/image.jpg")</span></span><br><span class="line">rectangle_area = <span class="number">0</span></span><br><span class="line">circle_area = <span class="number">0</span></span><br><span class="line">line_length = <span class="number">0</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">while</span> <span class="literal">True</span>:</span><br><span class="line"> <span class="comment"># 读取摄像头的帧</span></span><br><span class="line"> ret, frame = cap.read()</span><br><span class="line"> <span class="keyword">if</span> <span class="keyword">not</span> ret:</span><br><span class="line"> <span class="built_in">print</span>(<span class="string">"Failed to read frame from the camera."</span>)</span><br><span class="line"> <span class="keyword">break</span></span><br><span class="line"></span><br><span class="line"> <span class="comment"># 将帧转换为灰度图像</span></span><br><span class="line"> gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 对图像进行边缘检测</span></span><br><span class="line"> edges = cv2.Canny(gray, <span class="number">200</span>, <span class="number">400</span>)</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 进行轮廓检测</span></span><br><span class="line"> contours, hierarchy = cv2.findContours(edges, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) <span class="comment"># 只检测外轮廓;水平、垂直端点</span></span><br><span class="line"></span><br><span class="line"> <span class="comment"># 遍历每个轮廓并找到矩形和圆形</span></span><br><span class="line"> <span class="keyword">for</span> contour <span class="keyword">in</span> contours:</span><br><span class="line"> <span class="comment"># 计算轮廓的面积</span></span><br><span class="line"> area = cv2.contourArea(contour)</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 如果轮廓面积小于设定阈值,则忽略</span></span><br><span class="line"> <span class="keyword">if</span> area < <span class="number">100</span>:</span><br><span class="line"> <span class="keyword">continue</span></span><br><span class="line"></span><br><span class="line"> <span class="comment"># 使用近似多边形方法对轮廓进行逼近</span></span><br><span class="line"> approx = cv2.approxPolyDP(contour, <span class="number">0.04</span> * cv2.arcLength(contour, <span class="literal">True</span>), <span class="literal">True</span>)</span><br><span class="line"> </span><br><span class="line"> <span class="comment"># 如果逼近后的多边形有四个顶点,则认为是矩形</span></span><br><span class="line"> <span class="keyword">if</span> <span class="built_in">len</span>(approx) == <span class="number">4</span>:</span><br><span class="line"> <span class="comment"># 绘制矩形轮廓</span></span><br><span class="line"> cv2.drawContours(frame, [approx], <span class="number">0</span>, (<span class="number">0</span>, <span class="number">255</span>, <span class="number">0</span>), <span class="number">2</span>)</span><br><span class="line"> cv2.putText(frame, <span class="string">f"Rectangle Area: <span class="subst">{area}</span>"</span>, (<span class="number">10</span>, <span class="number">30</span>), cv2.FONT_HERSHEY_SIMPLEX, <span class="number">1</span>, (<span class="number">0</span>, <span class="number">255</span>, <span class="number">0</span>), <span class="number">2</span>)</span><br><span class="line"> rectangle_area = area</span><br><span class="line"> </span><br><span class="line"> <span class="comment"># 如果逼近后的多边形有三个顶点,则认为是三角形</span></span><br><span class="line"> <span class="keyword">elif</span> <span class="built_in">len</span>(approx) == <span class="number">3</span>:</span><br><span class="line"> <span class="comment"># 绘制三角形轮廓</span></span><br><span class="line"> cv2.drawContours(frame, [approx], <span class="number">0</span>, (<span class="number">255</span>, <span class="number">0</span>, <span class="number">0</span>), <span class="number">2</span>)</span><br><span class="line"> <span class="comment"># 计算三角形的面积</span></span><br><span class="line"> triangle_area = cv2.contourArea(contour)</span><br><span class="line"> cv2.putText(frame, <span class="string">f"Triangle Area: <span class="subst">{triangle_area}</span>"</span>, (<span class="number">10</span>, <span class="number">70</span>), cv2.FONT_HERSHEY_SIMPLEX, <span class="number">1</span>, (<span class="number">255</span>, <span class="number">0</span>, <span class="number">0</span>), <span class="number">2</span>)</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 如果逼近后的多边形有更多的顶点(大致为圆形)</span></span><br><span class="line"> <span class="keyword">elif</span> <span class="built_in">len</span>(approx) > <span class="number">6</span>:</span><br><span class="line"> <span class="comment"># 计算轮廓的最小外接圆</span></span><br><span class="line"> (x, y), radius = cv2.minEnclosingCircle(contour)</span><br><span class="line"> </span><br><span class="line"> <span class="comment"># 绘制圆形轮廓</span></span><br><span class="line"> cv2.circle(frame, (<span class="built_in">int</span>(x), <span class="built_in">int</span>(y)), <span class="built_in">int</span>(radius), (<span class="number">0</span>, <span class="number">0</span>, <span class="number">255</span>), <span class="number">2</span>)</span><br><span class="line"> </span><br><span class="line"> <span class="comment"># 计算圆形的面积</span></span><br><span class="line"> circle_area = <span class="built_in">int</span>(np.pi * radius * radius)</span><br><span class="line"> cv2.putText(frame, <span class="string">f"Circle Area: <span class="subst">{circle_area}</span>"</span>, (<span class="number">10</span>, <span class="number">110</span>), cv2.FONT_HERSHEY_SIMPLEX, <span class="number">1</span>, (<span class="number">0</span>, <span class="number">0</span>, <span class="number">255</span>), <span class="number">2</span>)</span><br><span class="line"> all_area = rectangle_area / circle_area</span><br><span class="line"> cv2.putText(frame, <span class="string">f"Area: <span class="subst">{all_area}</span>"</span>, (<span class="number">10</span>, <span class="number">150</span>), cv2.FONT_HERSHEY_SIMPLEX, <span class="number">1</span>, (<span class="number">255</span>, <span class="number">255</span>, <span class="number">255</span>), <span class="number">2</span>)</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 如果逼近后的多边形有两个顶点,则认为是直线</span></span><br><span class="line"> <span class="keyword">elif</span> <span class="built_in">len</span>(approx) == <span class="number">2</span>:</span><br><span class="line"> x1, y1 = approx[<span class="number">0</span>][<span class="number">0</span>]</span><br><span class="line"> x2, y2 = approx[<span class="number">1</span>][<span class="number">0</span>]</span><br><span class="line"> <span class="comment"># 计算直线的长度</span></span><br><span class="line"> line_length = np.sqrt((x2 - x1)**<span class="number">2</span> + (y2 - y1)**<span class="number">2</span>)</span><br><span class="line"> cv2.line(frame, (x1, y1), (x2, y2), (<span class="number">0</span>, <span class="number">0</span>, <span class="number">255</span>), <span class="number">2</span>)</span><br><span class="line"> cv2.putText(frame, <span class="string">f"Line Length: <span class="subst">{line_length}</span>"</span>, (<span class="number">10</span>, <span class="number">190</span>), cv2.FONT_HERSHEY_SIMPLEX, <span class="number">1</span>, (<span class="number">0</span>, <span class="number">0</span>, <span class="number">255</span>), <span class="number">2</span>)</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 显示结果帧</span></span><br><span class="line"> cv2.imshow(<span class="string">"Shapes"</span>, frame)</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 按下 'q' 键退出循环</span></span><br><span class="line"> <span class="keyword">if</span> cv2.waitKey(<span class="number">1</span>) & <span class="number">0xFF</span> == <span class="built_in">ord</span>(<span class="string">'q'</span>):</span><br><span class="line"> <span class="keyword">break</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 释放摄像头和销毁窗口</span></span><br><span class="line">cap.release()</span><br><span class="line">cv2.destroyAllWindows()</span><br></pre></td></tr></table></figure><h2 id="实现效果"><a href="#实现效果" class="headerlink" title="实现效果"></a>实现效果</h2><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.15/post/OpenCV%E5%8F%8Ak210%E5%AE%9E%E7%8E%B0%E5%BD%A2%E7%8A%B6%E6%A3%80%E6%B5%8B%E5%B9%B6%E8%AE%A1%E7%AE%97%E9%9D%A2%E7%A7%AF%E6%AF%94/%E5%AE%9E%E7%8E%B0%E6%95%88%E6%9E%9C1.png" alt="实现效果1.png"></p><h1 id="k210"><a href="#k210" class="headerlink" title="k210"></a>k210</h1><h2 id="详细代码-1"><a href="#详细代码-1" class="headerlink" title="详细代码"></a>详细代码</h2><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.15/post/OpenCV%E5%8F%8Ak210%E5%AE%9E%E7%8E%B0%E5%BD%A2%E7%8A%B6%E6%A3%80%E6%B5%8B%E5%B9%B6%E8%AE%A1%E7%AE%97%E9%9D%A2%E7%A7%AF%E6%AF%94/screenshots-%E8%AE%A1%E7%AE%97%E5%9B%BE%E5%BD%A2%E9%9D%A2%E7%A7%AF%E6%AF%94.png" alt="screenshots-计算图形面积比.png"></p><div class="btns rounded grid5"> <a class="button no-text-decoration" href='https://cdn.bili33.top/npm/aciano-cdn@1.0.15/post/OpenCV%E5%8F%8Ak210%E5%AE%9E%E7%8E%B0%E5%BD%A2%E7%8A%B6%E6%A3%80%E6%B5%8B%E5%B9%B6%E8%AE%A1%E7%AE%97%E9%9D%A2%E7%A7%AF%E6%AF%94/计算图形面积比.sb3' title='下载源码'><img src='fas fa-download'>下载源码</a> </div><h2 id="实现效果-1"><a href="#实现效果-1" class="headerlink" title="实现效果"></a>实现效果</h2><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.15/post/OpenCV%E5%8F%8Ak210%E5%AE%9E%E7%8E%B0%E5%BD%A2%E7%8A%B6%E6%A3%80%E6%B5%8B%E5%B9%B6%E8%AE%A1%E7%AE%97%E9%9D%A2%E7%A7%AF%E6%AF%94/%E5%AE%9E%E7%8E%B0%E6%95%88%E6%9E%9C2.jpg" alt="实现效果2.jpg"></p><h1 id="识别特定颜色并框出"><a href="#识别特定颜色并框出" class="headerlink" title="识别特定颜色并框出"></a>识别特定颜色并框出</h1><details class="folding-tag" green><summary> 查看代码 </summary> <div class='content'> <figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> cv2</span><br><span class="line"><span class="keyword">import</span> numpy <span class="keyword">as</span> np</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">red_identify</span>(<span class="params">img</span>):</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 灰度图</span></span><br><span class="line"> gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 转换为HSV</span></span><br><span class="line"> hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 二值化处理</span></span><br><span class="line"> lower_apple = np.array([<span class="number">0</span>, <span class="number">100</span>, <span class="number">100</span>])</span><br><span class="line"> higher_apple = np.array([<span class="number">10</span>, <span class="number">200</span>, <span class="number">200</span>])</span><br><span class="line"></span><br><span class="line"> mask = cv2.inRange(hsv, lower_apple, higher_apple)</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 膨胀操作</span></span><br><span class="line"> kernel = np.ones([<span class="number">5</span>, <span class="number">5</span>], dtype=np.uint8)</span><br><span class="line"> dilate = cv2.dilate(mask, kernel, iterations=<span class="number">1</span>)</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 画出轮廓</span></span><br><span class="line"> cnts, hierarchy = cv2.findContours(dilate, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_NONE)</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 判断是否有轮廓</span></span><br><span class="line"> <span class="keyword">if</span> <span class="built_in">len</span>(cnts) == <span class="number">0</span>:</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 没有即显示原图</span></span><br><span class="line"> cv2.imshow(<span class="string">"red_identify"</span>, img)</span><br><span class="line"> <span class="keyword">return</span></span><br><span class="line"></span><br><span class="line"> max_cnt = <span class="built_in">max</span>(cnts, key=cv2.contourArea)</span><br><span class="line"> cv2.drawContours(img, max_cnt, -<span class="number">1</span>, (<span class="number">0</span>, <span class="number">0</span>, <span class="number">255</span>), <span class="number">2</span>)</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 最大外接矩形</span></span><br><span class="line"> (x, y, w, h) = cv2.boundingRect(max_cnt)</span><br><span class="line"> cv2.rectangle(img, (x, y), (x + w, y + h), (<span class="number">0</span>, <span class="number">0</span>, <span class="number">255</span>), <span class="number">3</span>)</span><br><span class="line"></span><br><span class="line"> cv2.imshow(<span class="string">"red_identify"</span>, img)</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> __name__ == <span class="string">"__main__"</span>:</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 打开摄像头</span></span><br><span class="line"> cap = cv2.VideoCapture(<span class="number">0</span>)</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 设置摄像头参数,3和4为像素大小,5为帧率</span></span><br><span class="line"> cap.<span class="built_in">set</span>(<span class="number">3</span>, <span class="number">256</span>)</span><br><span class="line"> cap.<span class="built_in">set</span>(<span class="number">4</span>, <span class="number">256</span>)</span><br><span class="line"> cap.<span class="built_in">set</span>(<span class="number">5</span>, <span class="number">60</span>)</span><br><span class="line"></span><br><span class="line"> <span class="keyword">while</span> <span class="literal">True</span>:</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 循环读取每一帧</span></span><br><span class="line"> flag, frame = cap.read()</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 读取失败</span></span><br><span class="line"> <span class="keyword">if</span> <span class="keyword">not</span> flag:</span><br><span class="line"> <span class="built_in">print</span>(<span class="string">"Camera error!"</span>)</span><br><span class="line"> <span class="keyword">break</span></span><br><span class="line"></span><br><span class="line"> <span class="comment"># 调用颜色识别</span></span><br><span class="line"> red_identify(frame)</span><br><span class="line"></span><br><span class="line"> <span class="comment"># 若没有按下q键,则每10毫秒显示一帧(OxFF为"q"的ASCII码)</span></span><br><span class="line"> <span class="keyword">if</span> cv2.waitKey(<span class="number">10</span>) & <span class="number">0xFF</span> == <span class="built_in">ord</span>(<span class="string">'q'</span>):</span><br><span class="line"> <span class="keyword">break</span></span><br><span class="line"></span><br><span class="line"> cap.release()</span><br><span class="line"> cv2.destroyAllWindows()</span><br></pre></td></tr></table></figure> </div> </details>]]></content>
<summary type="html">关于使用OpenCV及k210实现形状检测并计算面积比的详细代码。</summary>
<category term="人工智能" scheme="https://aciano.top/categories/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/"/>
<category term="人工智能" scheme="https://aciano.top/tags/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/"/>
</entry>
<entry>
<title>乐动掌控板与小方舟的功能实现</title>
<link href="https://aciano.top/posts/nplus/"/>
<id>https://aciano.top/posts/nplus/</id>
<published>2023-07-10T02:23:58.000Z</published>
<updated>2023-07-10T02:23:58.000Z</updated>
<content type="html"><![CDATA[<h1 id="准备工作"><a href="#准备工作" class="headerlink" title="准备工作"></a>准备工作</h1><p>前往<a href="https://www.labplus.cn/software">https://www.labplus.cn/software</a>下载mpython软件并安装。</p><h1 id="更换主控"><a href="#更换主控" class="headerlink" title="更换主控"></a>更换主控</h1><p>打开mpython后,点击右上角<code>设置</code>-<code>高级设置</code>-<code>更换主控</code>,选择<code>乐动掌控</code>。</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.14/post/%E4%B9%90%E5%8A%A8%E6%8E%8C%E6%8E%A7%E6%9D%BF%E4%B8%8E%E5%B0%8F%E6%96%B9%E8%88%9F%E7%9A%84%E5%8A%9F%E8%83%BD%E5%AE%9E%E7%8E%B0/%E6%9B%B4%E6%8D%A2%E4%B8%BB%E6%8E%A7.png" alt="更换主控.png"></p><h1 id="烧录固件"><a href="#烧录固件" class="headerlink" title="烧录固件"></a>烧录固件</h1><h2 id="乐动掌控"><a href="#乐动掌控" class="headerlink" title="乐动掌控"></a>乐动掌控</h2><p>将乐动掌控与电脑连接,点击上方<code>未连接</code>,选择对应端口。</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.14/post/%E4%B9%90%E5%8A%A8%E6%8E%8C%E6%8E%A7%E6%9D%BF%E4%B8%8E%E5%B0%8F%E6%96%B9%E8%88%9F%E7%9A%84%E5%8A%9F%E8%83%BD%E5%AE%9E%E7%8E%B0/%E8%BF%9E%E6%8E%A5%E7%AB%AF%E5%8F%A31.png" alt="连接端口1.png"></p><p>点击右上角<code>设置</code>-<code>烧录固件</code>,选择<code>乐动掌控官方固件</code>,确定。</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.14/post/%E4%B9%90%E5%8A%A8%E6%8E%8C%E6%8E%A7%E6%9D%BF%E4%B8%8E%E5%B0%8F%E6%96%B9%E8%88%9F%E7%9A%84%E5%8A%9F%E8%83%BD%E5%AE%9E%E7%8E%B0/%E7%83%A7%E5%BD%95%E5%9B%BA%E4%BB%B61.png" alt="烧录固件1.png"></p><p>烧录成功后掌控板显示如下图:</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.14/post/%E4%B9%90%E5%8A%A8%E6%8E%8C%E6%8E%A7%E6%9D%BF%E4%B8%8E%E5%B0%8F%E6%96%B9%E8%88%9F%E7%9A%84%E5%8A%9F%E8%83%BD%E5%AE%9E%E7%8E%B0/%E7%83%A7%E5%BD%95%E6%88%90%E5%8A%9F.png" alt="烧录成功.png"></p><h2 id="小方舟"><a href="#小方舟" class="headerlink" title="小方舟"></a>小方舟</h2><p>将乐动掌控与电脑连接,点击上方<code>未连接</code>,一般选择端口号较小的端口连接,如若烧录失败再更换。</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.14/post/%E4%B9%90%E5%8A%A8%E6%8E%8C%E6%8E%A7%E6%9D%BF%E4%B8%8E%E5%B0%8F%E6%96%B9%E8%88%9F%E7%9A%84%E5%8A%9F%E8%83%BD%E5%AE%9E%E7%8E%B0/%E8%BF%9E%E6%8E%A5%E7%AB%AF%E5%8F%A32.png" alt="连接端口2.png"></p><blockquote><p>将小方舟上方的拨片拨至左端!</p></blockquote><p>点击右上角<code>设置</code>-<code>烧录固件</code>,选择<code>AI摄像头2.0固件</code>,确定。</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.14/post/%E4%B9%90%E5%8A%A8%E6%8E%8C%E6%8E%A7%E6%9D%BF%E4%B8%8E%E5%B0%8F%E6%96%B9%E8%88%9F%E7%9A%84%E5%8A%9F%E8%83%BD%E5%AE%9E%E7%8E%B0/%E7%83%A7%E5%BD%95%E5%9B%BA%E4%BB%B62.png" alt="烧录固件2.png"></p><p>烧录后,若小方舟屏幕显示盛思图标即为成功。</p><h1 id="加载扩展库"><a href="#加载扩展库" class="headerlink" title="加载扩展库"></a>加载扩展库</h1><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.14/post/%E4%B9%90%E5%8A%A8%E6%8E%8C%E6%8E%A7%E6%9D%BF%E4%B8%8E%E5%B0%8F%E6%96%B9%E8%88%9F%E7%9A%84%E5%8A%9F%E8%83%BD%E5%AE%9E%E7%8E%B0/%E5%8A%A0%E8%BD%BD%E6%89%A9%E5%B1%95%E5%BA%931.png" alt="加载扩展库1.png"></p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.14/post/%E4%B9%90%E5%8A%A8%E6%8E%8C%E6%8E%A7%E6%9D%BF%E4%B8%8E%E5%B0%8F%E6%96%B9%E8%88%9F%E7%9A%84%E5%8A%9F%E8%83%BD%E5%AE%9E%E7%8E%B0/%E5%8A%A0%E8%BD%BD%E6%89%A9%E5%B1%95%E5%BA%932.png" alt="加载扩展库2.png"></p><h1 id="连接掌控与小方舟"><a href="#连接掌控与小方舟" class="headerlink" title="连接掌控与小方舟"></a>连接掌控与小方舟</h1><ol><li><p>GND与GND相连,VCC同理;</p></li><li><p>TX与RX反接。</p></li></ol><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.14/post/%E4%B9%90%E5%8A%A8%E6%8E%8C%E6%8E%A7%E6%9D%BF%E4%B8%8E%E5%B0%8F%E6%96%B9%E8%88%9F%E7%9A%84%E5%8A%9F%E8%83%BD%E5%AE%9E%E7%8E%B0/%E5%AE%8C%E6%88%90%E8%BF%9E%E6%8E%A5.png" alt="完成连接.png"></p><h1 id="案例"><a href="#案例" class="headerlink" title="案例"></a>案例</h1><h2 id="人脸识别"><a href="#人脸识别" class="headerlink" title="人脸识别"></a>人脸识别</h2><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.14/post/%E4%B9%90%E5%8A%A8%E6%8E%8C%E6%8E%A7%E6%9D%BF%E4%B8%8E%E5%B0%8F%E6%96%B9%E8%88%9F%E7%9A%84%E5%8A%9F%E8%83%BD%E5%AE%9E%E7%8E%B0/%E6%A1%88%E4%BE%8B1-%E4%BA%BA%E8%84%B8%E8%AF%86%E5%88%AB.png" alt="案例1-人脸识别.png"></p><p>编写完成后,点击上方的<code>刷入</code>,完毕后对准人脸按下A键,当学习两个人脸后自动进入识别。</p><h2 id="案例2-语音识别-png"><a href="#案例2-语音识别-png" class="headerlink" title="案例2-语音识别.png"></a>案例2-语音识别.png</h2><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.14/post/%E4%B9%90%E5%8A%A8%E6%8E%8C%E6%8E%A7%E6%9D%BF%E4%B8%8E%E5%B0%8F%E6%96%B9%E8%88%9F%E7%9A%84%E5%8A%9F%E8%83%BD%E5%AE%9E%E7%8E%B0/%E6%A1%88%E4%BE%8B2-%E8%AF%AD%E9%9F%B3%E8%AF%86%E5%88%AB.png" alt="案例2-语音识别.png"></p><blockquote><p>中文每个字之间使用<code>-</code>分隔。</p></blockquote><h1 id="待补充……"><a href="#待补充……" class="headerlink" title="待补充……"></a>待补充……</h1>]]></content>
<summary type="html">关于使用乐动掌控板与小方舟实现部分人工智能功能的教程。</summary>
<category term="人工智能" scheme="https://aciano.top/categories/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/"/>
<category term="人工智能" scheme="https://aciano.top/tags/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/"/>
</entry>
<entry>
<title>乐视2高通版x528刷入类原生过程</title>
<link href="https://aciano.top/posts/lwyrug/"/>
<id>https://aciano.top/posts/lwyrug/</id>
<published>2022-08-26T05:56:58.000Z</published>
<updated>2024-08-08T11:41:09.632Z</updated>
<content type="html"><![CDATA[<h1 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h1><p>前段时间无聊突然想起床头柜里还有一台小学时社长送的手机,虽然屏幕碎了不少,但是还能用。</p><p>让我惊叹的是,16年的机有指纹和人脸识别,支持红外遥控,用起来还算流畅。</p><p>不过原来的EUI太过臃肿,自带应用一大堆。贾老板都跑路了还有广告推给你。</p><p>于是萌生了给它刷类原生的想法。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.12/post/乐视2高通版x528刷入类原生过程/配置.jpg" width="50%" height="50%"><h1 id="注意事项"><a href="#注意事项" class="headerlink" title="注意事项"></a>注意事项</h1><div class="tip ref"> <p>双清需要清除手机数据!请提前备份!!!</p></div><div class="tip ban"> <p>刷机有风险,请小心谨慎!造成的后果请自行承担!!!</p></div><p>本文多图预警,因为多为手机截图,所以用html的语法控制了图片的大小,可能在手机端看起来会有些许小。</p><p>所有文件资源都在文末。</p><h1 id="解bl锁"><a href="#解bl锁" class="headerlink" title="解bl锁"></a>解bl锁</h1><ol><li>去设置里找到<code>开发者选项</code>,打开usb调试和oem解锁。</li></ol><details class="folding-tag" green><summary> 打不开怎么办 </summary> <div class='content'> <p>我在打开的时候发现,无论你在开发者选项里做任何操作,退出再进入之后选项都会被还原。</p><p>在无可奈何的时候想到是不是这个系统的问题,然后果断去恢复出厂设置,竟然还要验证乐视账号。</p><p>如果你也忘记了的话,那就关机状态下进去官方rec清除吧。</p><p>(因为这台机子的卡槽不见了,所以开不了usb调试,不过也没关系,可以继续接下来的操作。)</p> </div> </details><ol start="2"><li><p>将手机连到你的电脑上,然后打驱动。</p></li><li><p>打开移动叔叔的工具,按照提示操作,解完bl之后可以再顺便刷入twrp。(要在fastboot模式下刷)</p></li></ol><h1 id="刷包"><a href="#刷包" class="headerlink" title="刷包"></a>刷包</h1><ol><li>刷入twrp后,按音量上键+电源键进入rec,见到如下界面:</li></ol><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.12/post/乐视2高通版x528刷入类原生过程/界面.png" width="50%" height="50%"><ol start="2"><li>点击<code>清除</code>,进入后再点击下方的<code>高级清除</code>,把data和cache勾选上,滑动:</li></ol><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.12/post/乐视2高通版x528刷入类原生过程/清除.png" width="50%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.12/post/乐视2高通版x528刷入类原生过程/高级清除.png" width="50%" height="50%"><ol start="3"><li>返回到清除界面,再点击<code>格式化Data分区</code>,输入yes,确认:</li></ol><div class="tip ban"> <p>注意!!格式化data会清空内部储存!需要电脑重新拉rom进手机!!!</p></div><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.12/post/乐视2高通版x528刷入类原生过程/格式化data.png" width="50%" height="50%"><ol start="4"><li>清除完毕之后,回到主界面,点击<code>安装</code>,选择你要刷入的rom,滑动刷入即可(~ ̄▽ ̄)~</li></ol><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.12/post/乐视2高通版x528刷入类原生过程/刷入rom.jpg" width="50%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.12/post/乐视2高通版x528刷入类原生过程/刷入成功.png" width="50%" height="50%"><ol start="5"><li>大功告成,开机即可进入系统。可能首次进去系统会比较慢,耐心等待一会~ 我的是卡了十三分钟后才成功进入。</li></ol><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.12/post/%E4%B9%90%E8%A7%862%E9%AB%98%E9%80%9A%E7%89%88x528%E5%88%B7%E5%85%A5%E7%B1%BB%E5%8E%9F%E7%94%9F%E8%BF%87%E7%A8%8B/doge.png" alt="doge"></p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.12/post/乐视2高通版x528刷入类原生过程/魅族.jpg" width="50%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.12/post/乐视2高通版x528刷入类原生过程/魅族1.jpg" width="50%" height="50%"><h1 id="刷入面具"><a href="#刷入面具" class="headerlink" title="刷入面具"></a>刷入面具</h1><blockquote><p>此举其实没啥意义,无聊想刷一下而已😏</p></blockquote><h2 id="升级twrp"><a href="#升级twrp" class="headerlink" title="升级twrp"></a>升级twrp</h2><p>移动叔叔的twrp版本太低了,刷不了版本太高的类原生系统,所以顺便给它升级下。</p><p>点击主页的<code>安装</code>—刷入镜像—点击下载好的twrp—选择刷入recovery分区(刷到别的分区就砖了!!)—滑动刷入—重启twrp</p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.12/post/乐视2高通版x528刷入类原生过程/刷入twrp.png" width="50%" height="50%"><h2 id="刷入magisk"><a href="#刷入magisk" class="headerlink" title="刷入magisk"></a>刷入magisk</h2><p>首页安装—点击magisk包—滑动刷入—重启即可。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.12/post/乐视2高通版x528刷入类原生过程/刷入面具.png" width="50%" height="50%"><h2 id="大功告成"><a href="#大功告成" class="headerlink" title="大功告成"></a>大功告成</h2><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.12/post/乐视2高通版x528刷入类原生过程/havoc1.jpg" width="50%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.12/post/乐视2高通版x528刷入类原生过程/havoc2.jpg" width="50%" height="50%"><p>最后在havoc养老了</p><h1 id="相关文件"><a href="#相关文件" class="headerlink" title="相关文件"></a>相关文件</h1><details class="folding-tag" yellow><summary> 下载链接 </summary> <div class='content'> <p>链接: <a href="https://pan.baidu.com/s/1tV46TpET7MTh0chjXhzwQA">https://pan.baidu.com/s/1tV46TpET7MTh0chjXhzwQA</a> 提取码: lwyr</p> </div> </details><h1 id="参考链接"><a href="#参考链接" class="headerlink" title="参考链接"></a>参考链接</h1><ul><li><p><a href="https://www.coolapk1s.com/feed/18483764">乐视X520/528刷机资源总和</a></p></li><li><p><a href="https://www.coolapk1s.com/feed/33459047">乐视2高通版第三方ROM分享</a></p></li></ul>]]></content>
<summary type="html">乐视2高通版x528解bl锁、刷入类原生和面具的相关教程和文件。</summary>
<category term="技术教程" scheme="https://aciano.top/categories/%E6%8A%80%E6%9C%AF%E6%95%99%E7%A8%8B/"/>
<category term="教程" scheme="https://aciano.top/categories/%E6%8A%80%E6%9C%AF%E6%95%99%E7%A8%8B/%E6%95%99%E7%A8%8B/"/>
<category term="刷机" scheme="https://aciano.top/tags/%E5%88%B7%E6%9C%BA/"/>
</entry>
<entry>
<title>Redmi 9利用Magisk实现Root全过程</title>
<link href="https://aciano.top/posts/root/"/>
<id>https://aciano.top/posts/root/</id>
<published>2022-08-15T04:53:58.000Z</published>
<updated>2024-08-08T11:41:09.628Z</updated>
<content type="html"><![CDATA[<h1 id="注意事项"><a href="#注意事项" class="headerlink" title="注意事项"></a>注意事项</h1><div class="tip ref"> <p>解锁需要清除手机数据!请提前备份!!!</p></div><div class="tip ban"> <p>刷机有风险,请小心谨慎!造成的后果请自行承担!!!</p></div><p>本文多图预警,因为多为手机截图,所以用html的语法控制了图片的大小,可能在手机端看起来会有些许小。</p><p>所有文件资源都在文末。</p><blockquote><p>本文提供的twrp只支持Redmi 9的Android 10版本!</p></blockquote><h1 id="解bl锁"><a href="#解bl锁" class="headerlink" title="解bl锁"></a>解bl锁</h1><ol><li><p>前往<code>设置-我的设备-全部参数</code>中,连击<code>MIUI版本</code>,直至出现开发者选项已开启等字眼。</p></li><li><p>前往<code>设置-更多设置-开发者选项</code>中,找到设备解锁状态,点击下方的<code>绑定账号和设备</code>。</p></li></ol><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/mi解锁7.jpg" width="50%" height="50%"><ol start="3"><li>前往下载小米官方的解锁工具:<a class="btn-anzhiyu outline" href="http://www.miui.com/unlock/index.html" title="工具下载地址"><i class="far fa-hand-point-right"></i><span>工具下载地址</span></a></li></ol><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9%E5%88%A9%E7%94%A8Magisk%E5%AE%9E%E7%8E%B0Root%E5%85%A8%E8%BF%87%E7%A8%8B/mi%E8%A7%A3%E9%94%811.png" alt="mi解锁1.png"></p><p>下载得到解锁工具后,打开、登录、清除数据、解锁…</p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9%E5%88%A9%E7%94%A8Magisk%E5%AE%9E%E7%8E%B0Root%E5%85%A8%E8%BF%87%E7%A8%8B/mi%E8%A7%A3%E9%94%812.png" alt="mi解锁2.png"></p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9%E5%88%A9%E7%94%A8Magisk%E5%AE%9E%E7%8E%B0Root%E5%85%A8%E8%BF%87%E7%A8%8B/mi%E8%A7%A3%E9%94%813.png" alt="mi解锁3.png"></p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9%E5%88%A9%E7%94%A8Magisk%E5%AE%9E%E7%8E%B0Root%E5%85%A8%E8%BF%87%E7%A8%8B/mi%E8%A7%A3%E9%94%814.png" alt="mi解锁4.png"></p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9%E5%88%A9%E7%94%A8Magisk%E5%AE%9E%E7%8E%B0Root%E5%85%A8%E8%BF%87%E7%A8%8B/mi%E8%A7%A3%E9%94%815.PNG" alt="mi解锁5.png"></p><p>当解锁成功后,再进去开发者选项中即可看到已解锁:</p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/mi解锁6.jpg" width="50%" height="50%"><h1 id="刷入twrp"><a href="#刷入twrp" class="headerlink" title="刷入twrp"></a>刷入twrp</h1><ol><li>提前将magisk包放入手机:</li></ol><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/放入magisk.jpg" width="50%" height="50%"><ol start="2"><li>打开秋之盒,点击右下角的ADB命令行,选择CMD:</li></ol><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9%E5%88%A9%E7%94%A8Magisk%E5%AE%9E%E7%8E%B0Root%E5%85%A8%E8%BF%87%E7%A8%8B/%E7%A7%8B%E4%B9%8B%E7%9B%92.png" alt="秋之盒.png"></p><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9%E5%88%A9%E7%94%A8Magisk%E5%AE%9E%E7%8E%B0Root%E5%85%A8%E8%BF%87%E7%A8%8B/cmd.jpg" alt="cmd.jpg"></p><ol start="3"><li>手机在关机状态下按电源键+音量减,进入Bootloader模式:</li></ol><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/fastboot.jpg" width="50%" height="50%"><ol start="4"><li>在cmd中输入以下指令,其中<code>xxx.img</code>为你的twrp文件路径,一般情况下直接将文件拖进黑窗即可得到路径:</li></ol><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">fastboot flash recovery xxx.img</span><br></pre></td></tr></table></figure><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9%E5%88%A9%E7%94%A8Magisk%E5%AE%9E%E7%8E%B0Root%E5%85%A8%E8%BF%87%E7%A8%8B/cmd1.jpg" alt="cmd1.jpg"></p><div class="tip ban"> <p>此时切勿开机!!!</p></div><ol start="5"><li>输入以下指令,之后手机会自动重启到recovery。</li></ol><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">fastboot reboot recovery</span><br></pre></td></tr></table></figure><p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9%E5%88%A9%E7%94%A8Magisk%E5%AE%9E%E7%8E%B0Root%E5%85%A8%E8%BF%87%E7%A8%8B/cmd2.jpg" alt="cmd2.jpg"></p><h1 id="刷入面具"><a href="#刷入面具" class="headerlink" title="刷入面具"></a>刷入面具</h1><p>当输入完上一步的指令后,手机会自动进入twrp,输入手机锁屏密码后自动解锁data:</p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/解密.png" width="50%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/修改分区.png" width="50%" height="50%"><p>进入主菜单后,点击<code>高级</code>:</p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/twrp.png" width="50%" height="50%"><p>找到<code>关闭AVB2.0验证</code>,进入后,全选,右滑:</p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/关闭AVB.png" width="50%" height="50%"><p>找到<code>防止覆盖TWRP</code>,进入后,右滑确认,完成后先不要重启,点击返回。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/防止覆盖.png" width="50%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/防止覆盖1.png" width="50%" height="50%"><p>点击下方的导航栏,返回到主菜单,点击<code>安装</code>,进入后找到提前放好的magisk包,刷入:</p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/选择magisk包.png" width="50%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/刷入magisk包.png" width="50%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/刷入完成.png" width="50%" height="50%"><p>至此刷入面具的步骤完成,点击重启系统即可。</p><blockquote><p>注意:一定要关闭AVB2.0验证,否则会卡米!</p></blockquote><h1 id="安装面具"><a href="#安装面具" class="headerlink" title="安装面具"></a>安装面具</h1><p>重启进入系统后,可以看到桌面出现了一个安卓机器人的图标(?是这样形容的吗)。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/magisk图标.jpg" width="50%" height="50%"><p>此时我们找到之前放置好的magisk包,将zip后缀改为<code>apk</code>,安装即可。</p><p>安装完成后再点击进入即可看到我们的Magisk了。</p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/magisk.jpg" width="50%" height="50%"><h1 id="安装LSPosed"><a href="#安装LSPosed" class="headerlink" title="安装LSPosed"></a>安装LSPosed</h1><p>进入Magisk,点击下方的模块,向下扒拉一下,找到<code>Riru</code>和<code>Riru-LSPosed</code>,安装:</p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/模块.png" width="50%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/Riru.jpg" width="50%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/Riru1.jpg" width="50%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/Riru-LSPosed.jpg" width="50%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/刷入完成.jpg" width="50%" height="50%"><p>当两个都安装完成后,返回桌面,就能找到LSPosed的图标了,进入后即可选择模块开启作用域愉快地玩耍了/doge</p><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/LSPosed.jpg" width="50%" height="50%"><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9利用Magisk实现Root全过程/LSPosed1.jpg" width="50%" height="50%"><h1 id="结语"><a href="#结语" class="headerlink" title="结语"></a>结语</h1><p>root之后感觉能做的事情变多了,以前向往的状态栏歌词、降级安装apk、删广告等等操作都是小菜一碟了。</p><p>xposed类模块再也不用看太极啥也不支持的脸色了,甚至后台都不需要保留,简直是快乐~</p><p>但是同时也会带来一点麻烦,比如银行类的软件会因为root而被检测导致打不开。</p><p>不过这很简单,将面具和root隐藏起来后就好了,不知道后面还有没有时间记录一下这个过程。</p><h1 id="文件下载"><a href="#文件下载" class="headerlink" title="文件下载"></a>文件下载</h1><blockquote><p>链接中的twrp只支持Redmi 9的Android 10版本!</p></blockquote><details class="folding-tag" green><summary> 下载链接 </summary> <div class='content'> <p><a href="https://wws.lanzouv.com/b01vp5u4h">https://wws.lanzouv.com/b01vp5u4h</a> 密码:root</p> </div> </details><h1 id="参考链接"><a href="#参考链接" class="headerlink" title="参考链接"></a>参考链接</h1><p><a href="https://www.coolapk.com/feed/29066086?shareKey=YmJlOGI3Y2VmNmRjNjEzMjFmYTc~&shareUid=4130545">迷失星云 - 如何ROOT保姆级教程</a></p>]]></content>
<summary type="html">详细介绍Redmi 9解bl锁、刷入twrp和Magisk实现root以及安装LSPoseed的全过程。</summary>
<category term="技术教程" scheme="https://aciano.top/categories/%E6%8A%80%E6%9C%AF%E6%95%99%E7%A8%8B/"/>
<category term="教程" scheme="https://aciano.top/categories/%E6%8A%80%E6%9C%AF%E6%95%99%E7%A8%8B/%E6%95%99%E7%A8%8B/"/>
<category term="刷机" scheme="https://aciano.top/tags/%E5%88%B7%E6%9C%BA/"/>
</entry>
<entry>
<title>Redmi 9卡刷降级MIUI版本</title>
<link href="https://aciano.top/posts/miuidown/"/>
<id>https://aciano.top/posts/miuidown/</id>
<published>2022-08-14T14:53:58.000Z</published>
<updated>2024-08-08T11:41:09.628Z</updated>
<content type="html"><![CDATA[<h1 id="注意事项"><a href="#注意事项" class="headerlink" title="注意事项"></a>注意事项</h1><div class="tip error"> <p>降级操作需要清除手机数据!请提前备份!!!</p></div><div class="tip ban"> <p>刷机有风险,请小心谨慎!造成的后果请自行承担!!!</p></div><div class="note info flat"><p>本文提到的文件路径不一定通用,请自行寻找或变通。</p></div><h1 id="准备工作"><a href="#准备工作" class="headerlink" title="准备工作"></a>准备工作</h1><div class="note warning flat"><p>需要确认你的MIUI版本是否为当前最新版本,如果不是需要更新至最新版本才可继续接下来的步骤。</p></div><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9卡刷降级MIUI版本/最新版本.jpg" width="50%" height="50%"><h1 id="刷包过程"><a href="#刷包过程" class="headerlink" title="刷包过程"></a>刷包过程</h1><ol><li><p>确认为最新版本后,就可以进入<code>设置-我的设备-MIUI版本</code>,点击右上角的三个点,点击<code>下载最新完整包</code>。</p></li><li><p>等待进度跑完后,可以在<code>/sdcard/Download/downloaded-rom</code>文件夹中找到下载的最新完整包,先不动。</p></li><li><p>在小米社区的Redmi 9圈子的置顶帖中可以找到历史版本ROM的下载地址,找到你想退回的版本,下载卡刷包。</p></li></ol><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9卡刷降级MIUI版本/下载卡刷包.jpg" width="50%" height="50%"><ol start="4"><li><p>当下载完成后,一般可以在<code>/sdcard/Download/</code>路径下找到文件,此时将后下载的<code>降级版本包</code>文件名复制为<code>最新完整包</code>的文件名称。</p></li><li><p>回到版本更新页面,右上角<code>手动选择安装包</code>,选择第一个下载的<code>最新完整包</code>,当校验完成出现以下界面时,不要点击,打开文件管理器将后下载的<code>降级版本包</code>移动到<code>最新完整包</code>的文件夹中,出现提示重复选择替换。</p></li></ol><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9卡刷降级MIUI版本/更新.jpg" width="50%" height="50%"><div class="tip"> <p>可以提前小窗文件管理器,移动后先不替换,等到检验完成后再点替换。</p></div><ol start="6"><li>再回到版本更新页面,点击<code>重启并更新</code>即可。</li></ol><h1 id="完成"><a href="#完成" class="headerlink" title="完成"></a>完成</h1><ol><li>当进度条跑到99.99%后几分钟,手机会自动息屏,此时开机,会进入官方rec。</li></ol><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9卡刷降级MIUI版本/9999.png" width="50%" height="50%"><ol start="2"><li>音量-选择<code>清除数据</code>,电源键确认进去,清除完后,返回主菜单,<code>重启手机</code>:</li></ol><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9卡刷降级MIUI版本/rec.png" width="70%" height="70%"><ol start="3"><li>此时手机还是息屏需要手动开机,进入后就能见到熟悉的MIUI11了:</li></ol><img src="https://cdn.bili33.top/npm/aciano-cdn@1.0.13/post/Redmi9卡刷降级MIUI版本/miui11.jpg" width="50%" height="50%"><h1 id="结束"><a href="#结束" class="headerlink" title="结束"></a>结束</h1><p>至此降级操作结束。</p><p>不得不说,miui真的是越升级越难用,不仅动画全砍,耗电也很高。</p><p>退回miui11后,发现很多当年没有的东西也有了,比如小白条,耗电曲线待机状态也趋于一条直线了。</p><p>现在打算将手机root,刷入面具。</p><p>教程快写完了,刷机真是个有趣的过程,不过…千万不要在晚上8点后刷机!</p><h1 id="引用链接"><a href="#引用链接" class="headerlink" title="引用链接"></a>引用链接</h1><p>文章封面图片来自<a href="https://www.talkandroid.com/reviews/miui-11-review/">TalkAndroid - MIUI 11 Review: Iterating on an excellent but imperfect experience</a></p><p>如有侵权,请联系删除。</p>]]></content>
<summary type="html">一种无需root、解bl锁的直接降级MIUI版本方法。</summary>
<category term="技术教程" scheme="https://aciano.top/categories/%E6%8A%80%E6%9C%AF%E6%95%99%E7%A8%8B/"/>
<category term="教程" scheme="https://aciano.top/categories/%E6%8A%80%E6%9C%AF%E6%95%99%E7%A8%8B/%E6%95%99%E7%A8%8B/"/>
<category term="刷机" scheme="https://aciano.top/tags/%E5%88%B7%E6%9C%BA/"/>
</entry>
</feed>