zhen8838 / K210_Yolo_framework

Yolo v3 framework base on tensorflow, support multiple models, multiple datasets, any number of output layers, any number of anchors, model prune, and portable model to K210 !
MIT License
249 stars 73 forks source link

h5模型正常,k210上识别出一堆乱框...... #29

Open xji-apex opened 4 years ago

xji-apex commented 4 years ago

你好,zhen! 训练自己数据集,模型:mobile_yolo_v1 (0.75),得到的h5模型测试效果良好,可是部署到k210上,屏幕识别画出一堆乱框。 同样的代码和流程,烧录官网给出的example,mobile_yolo的识别20类物体的kmodel,在k210上可以正常运行,屏幕显示也正常。 请教一下,产生这个乱框问题的可能原因是什么?

zhen8838 commented 4 years ago

是否重新生成过anchor?或者模型的类别是否是20类?如果重新生成了anchor,需要修改c代码中的anchor。如果类别不是20类,需要修改c代码region layer函数使用的参数。

xji-apex commented 4 years ago

嗯嗯可以了,谢谢~

gky-gky commented 3 years ago

遇到了和您一样的问题,请问您是怎么解决的呀! @xji-apex

gky-gky commented 3 years ago

我的检测类别是3类的,遇到了同样的问题,修改之后还是未解决,麻烦您能把要修改的相应参数位置及修改建议指出来吗? @zhen8838 @xji-apex

gky-gky commented 3 years ago

我的修改位置有 class_lable_t class_lable[CLASS_NUMBER] = { {"Car", GREEN}, {"Cyclist", GREEN}, {"Pedestrian", GREEN}}; /* {"aeroplane", GREEN}, {"bicycle", GREEN}, {"bird", GREEN}, {"boat", GREEN}, {"bottle", 0xF81F}, {"bus", GREEN}, {"car", GREEN}, {"cat", GREEN}, {"chair", 0xFD20}, {"cow", GREEN}, {"diningtable", GREEN}, {"dog", GREEN}, {"horse", GREEN}, {"motorbike", GREEN}, {"person", 0xF800}, {"pottedplant", GREEN}, {"sheep", GREEN}, {"sofa", GREEN}, {"train", GREEN}, {"tvmonitor", 0xF9B6}}; */ 以及 `static float layer0_anchor[ANCHOR_NUM * 2] = { 0.27522754, 0.36765864, 0.26959976, 0.20957813, 0.17267578, 0.14453585, };

static float layer1_anchor[ANCHOR_NUM 2] = { 0.08751139, 0.07051836, 0.07215522, 0.17515526, 0.03360765, 0.0433368, };
/
0.76120044, 0.57155991, 0.6923348, 0.88535553, 0.47163042, 0.34163313, };

static float layer1_anchor[ANCHOR_NUM 2] = { 0.33340788, 0.70065861, 0.18124964, 0.38986752, 0.08497349, 0.1527057, }; /` @zhen8838

zhen8838 commented 3 years ago

@gzkyyh region layer的参数需要修改,因为输出通道数不同了

gky-gky commented 3 years ago

嗯嗯可以了谢谢 @zhen8838

gky-gky commented 3 years ago

您好,我在跑yolo-mobilenetv2的时候,训练出现loss值反复的情况,而且检测效果还不如v1,请问是什么情况呀?

---原始邮件--- 发件人: "郑启航"<notifications@github.com> 发送时间: 2021年1月19日(周二) 中午11:15 收件人: "zhen8838/K210_Yolo_framework"<K210_Yolo_framework@noreply.github.com>; 抄送: "gzkyyh"<793606310@qq.com>;"Mention"<mention@noreply.github.com>; 主题: Re: [zhen8838/K210_Yolo_framework] h5模型正常,k210上识别出一堆乱框...... (#29)

@gzkyyh region layer的参数需要修改,因为输出通道数不同了

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

gky-gky commented 3 years ago

您好,我在跑yolo-mobilenetv2的时候,训练出现loss值反复的情况,最后的loss值比yolo-mobilenetv1还要高点,而且检测效果还不如v1,请问是什么情况呀?

noobgrow commented 3 years ago

嗯嗯可以了谢谢 @zhen8838

你好,我遇到了h5模型效果正常,ncc生成kmodel后,调整多组nms阈值尝试,仍然不行。我在sdk代码中改了如下地方: //(1) anchor 使用训练时候生成的两组anchor static float anchor[ANCHOR_NUM 2] = { 0.76120044, 0.57155991, 0.6923348, 0.88535553, 0.47163042, 0.34163313, }; static float anchor2[ANCHOR_NUM 2] = { 0.33340788, 0.70065861, 0.18124964, 0.38986752, 0.08497349, 0.1527057, }; obj_detect_rl.anchor = anchor; obj_detect_rl2.anchor = anchor2; //(2)region_layer 的尺寸 region_layer_init(&obj_detect_rl, 10, 7, (4 + 1 + 1) ANCHOR_NUM, kpu_image.width, kpu_image.height);//输出特征图107 (5+1)3 region_layer_init(&obj_detect_rl2, 20, 14, (4 + 1 + 1) ANCHOR_NUM, kpu_image.width, kpu_image.height);//第二个特征图2014 // (3)在0和1两个输出特征图上调用kpu kpu_get_output(&obj_detect_task, 0, (uint8_t )&output, &output_size); //18710 kpu_get_output(&obj_detect_task, 1, (uint8_t )&output2, &output_size2); //181420
//(4)调整多组nms阈值尝试,仍然不行 obj_detect_rl2.threshold = 0.8; obj_detect_rl2.nms_value = 0.2;

请问我还有哪里遗漏了吗,非常感谢!! @zhen8838 @gzkyyh

gky-gky commented 3 years ago

你好,想问一下您做出来的那个yolov3购买情况

hughho123 commented 1 year ago

请问,如果重新生成anchor, 那么新生成的在哪个文件里能看到?

是否重新生成过anchor?或者模型的类别是否是20类?如果重新生成了anchor,需要修改c代码中的anchor。如果类别不是20类,需要修改c代码region layer函数使用的参数。

gky-gky commented 1 year ago

谢谢您的回复,祝您2023钱兔无量,嘎嘎顺利(^▽^)/★

---原始邮件--- 发件人: @.> 发送时间: 2022年12月20日(周二) 晚上8:19 收件人: @.>; 抄送: @.**@.>; 主题: Re: [zhen8838/K210_Yolo_framework] h5模型正常,k210上识别出一堆乱框...... (#29)

请问,如果重新生成anchor, 那么新生成的在哪个文件里能看到?

是否重新生成过anchor?或者模型的类别是否是20类?如果重新生成了anchor,需要修改c代码中的anchor。如果类别不是20类,需要修改c代码region layer函数使用的参数。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>