- # Draw result
- for i in range(0, vaildCnt):
- if candidateBox[0][i] == -1:
- continue
- n = candidateBox[0][i]
- xmin = max(0.0, min(1.0, predictions[0][n][1])) * INPUT_SIZE
- ymin = max(0.0, min(1.0, predictions[0][n][0])) * INPUT_SIZE
- xmax = max(0.0, min(1.0, predictions[0][n][3])) * INPUT_SIZE
- ymax = max(0.0, min(1.0, predictions[0][n][2])) * INPUT_SIZE
- # print("%d @ (%d, %d) (%d, %d) score=%f" % (topClassScoreIndex, xmin, ymin, xmax, ymax, topClassScore))
- cv2.rectangle(orig_img, (int(xmin), int(ymin)), (int(xmax), int(ymax)),
- (random.random()*255, random.random()*255, random.random()*255), 3)
- cv2.imwrite("out.jpg", orig_img)
复制代码
jefferyzhang 发表于 2020-4-20 16:56
Which version of rknn-toolkit you used, there is a drawing code in latest (1.3.0) sample code as bel ...
NG1368 发表于 2020-4-20 23:56
I use from1.2.1 version
jefferyzhang 发表于 2020-4-21 08:32
You have to download the latest rknn-toolkit from http://t.rock-chips.com/forum.php?mod=viewthread ...
jefferyzhang 发表于 2020-4-20 16:56
Which version of rknn-toolkit you used, there is a drawing code in latest (1.3.0) sample code as bel ...
jefferyzhang 发表于 2020-4-20 16:56
Which version of rknn-toolkit you used, there is a drawing code in latest (1.3.0) sample code as bel ...
NG1368 发表于 2020-4-23 02:39
can you send me a link of example that use from this code for display boxes?
NG1368 发表于 2020-4-23 02:39
can you send me a link of example that use from this code for display boxes?
jefferyzhang 发表于 2020-4-23 08:25
Try it:
https://rockchips-my.sharepoint.com/personal/addy_ke_rockchips_onmicrosoft_com/_layouts/1 ...
jefferyzhang 发表于 2020-4-23 08:25
Try it:
https://rockchips-my.sharepoint.com/personal/addy_ke_rockchips_onmicrosoft_com/_layouts/1 ...
jefferyzhang 发表于 2020-4-23 08:25
Try it:
https://rockchips-my.sharepoint.com/personal/addy_ke_rockchips_onmicrosoft_com/_layouts/1 ...
jefferyzhang 发表于 2020-4-23 08:25
Try it:
https://rockchips-my.sharepoint.com/personal/addy_ke_rockchips_onmicrosoft_com/_layouts/1 ...
jefferyzhang 发表于 2020-4-23 15:25
https://rockchips-my.sharepoint.com/personal/addy_ke_rockchips_onmicrosoft_com/_layouts/15/onedrive. ...
NG1368 发表于 2020-4-24 03:48
it didn't work and ended up in the same error.
欢迎光临 Toybrick (https://t.rock-chips.com/) | Powered by Discuz! X3.3 |