點擊上方“AI算法與圖像處理”,選擇加"星標"或“置頂”
重磅乾貨,第一時間送達
-
CPU: RISC-V雙核64位,帶FPU -
圖像識別:QVGA@60fps / VGA@30fps -
芯片功耗< 300mW
-
https://medium.com/swlh/what-is-edge-computing-d27d15f843e
遷移學習註釋
準備數據
-
tzutalin / labelImg : https://github.com/tzutalin/labelImg
數據集訓練
path-to/data
---anns # store the training annotations
---imgs # relevant images for the training
---anns_val # validation annotations
---imgs_val # validation images
{
"model" : {
"type": "Detector",
"architecture": "MobileNet7_5",
"input_size": [224,224],
"anchors": [0.57273, 0.677385, 1.87446, 2.06253, 3.33843, 5.47434, 7.88282, 3.52778, 9.77052, 9.16828],
"labels": ["Apple", "Banana"],
"coord_scale" : 1.0,
"class_scale" : 1.0,
"object_scale" : 5.0,
"no_object_scale" : 1.0
},
"weights" : {
"full": "",
"backend": "imagenet"
},
"train" : {
"actual_epoch": 50,
"train_image_folder": "data/imgs",
"train_annot_folder": "data/anns",
"train_times": 2,
"valid_image_folder": "data/imgs_val",
"valid_annot_folder": "data/anns_val",
"valid_times": 2,
"valid_metric": "mAP",
"batch_size": 4,
"learning_rate": 1e-4,
"saved_folder": "obj_detector",
"first_trainable_layer": "",
"augumentation": true,
"is_only_detect" : false
},
"converter" : {
"type": ["k210"]
}
}
python3 aXelerate/axelerate/traing.py -c config.json
預測
import sensor,image,lcd
import KPU as kpulcd.init()
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.set_windowing((224, 224))
sensor.set_vflip(1)
sensor.run(1)classes = ["Apple", "Banana"]
task = kpu.load("/sd/name_of_the_model_file.kmodel")
a = kpu.set_outputs(task, 0, 7, 7, 35)anchor = (0.57273, 0.677385, 1.87446, 2.06253, 3.33843, 5.47434, 7.88282, 3.52778, 9.77052, 9.16828)
a = kpu.init_yolo2(task, 0.3, 0.3, 5, anchor) while(True):
img = sensor.snapshot().rotation_corr(z_rotation=90.0)
a = img.pix_to_ai()
code = kpu.run_yolo2(task, img)
if code:
for i in code:
a = img.draw_rectangle(i.rect(),color = (0, 255, 0))
a = img.draw_string(i.x(),i.y(), classes[i.classid()],
color=(255,0,0), scale=3)
a = lcd.display(img)
else:
a = lcd.display(img)a = kpu.deinit(task)
個人微信(如果沒有備註不拉羣!)
請註明:
地區+學校/企業+研究方向+暱稱
下載1:何愷明頂會分享
在「AI算法與圖像處理」公衆號後臺回覆:何愷明,即可下載。總共有6份PDF,涉及 ResNet、Mask RCNN等經典工作的總結分析
下載2:終身受益的編程指南:Google編程風格指南
在「AI算法與圖像處理」公衆號後臺回覆:c++,即可下載。歷經十年考驗,最權威的編程規範!
下載3 CVPR2021
在「AI算法與圖像處理」公衆號後臺回覆:
CVPR
,即可下載1467篇CVPR 2020論文 和 CVPR 2021 最新論文
點亮 ,告訴大家你也在看
本文分享自微信公衆號 - AI算法與圖像處理(AI_study)。
如有侵權,請聯繫 [email protected] 刪除。
本文參與“OSC源創計劃”,歡迎正在閱讀的你也加入,一起分享。