rockchip-linux / rknpu2

BSD 3-Clause "New" or "Revised" License
597 stars 128 forks source link

yolov5Demo中的imresize会导致图片错位 #35

Open LiLiLiam opened 1 year ago

LiLiLiam commented 1 year ago

image

image

在使用demo中你们自定义imresize对输入图像进行resize后,图片会整体向右移动,应该是imresize函数里的坐标有问题

zen-xingle commented 1 year ago

你好,

  1. rknpu2 example里面的yolo5 demo,测试图片 bus.jpg 已经是 640x640 的了,应该是不会走 resize 路径的
  2. 测试另取 w812xh1080 的 bus.jpg 作为输入,resize 结果正常。
  3. resize 使用了 rga 组件, rga的输入输出需要 width 上 4 对齐,否则会有异常,你可以检查下是否可能是这个问题。demo中的imcheck函数也会对width进行检验是否符合4对齐。更多规则请参考 https://github.com/airockchip/librga
  4. 确认下 example 的代码是否是最新的
openedev commented 1 year ago

@zen-xingle if we replace bus.jpg with our own custom.jpg - will it work? seems not can you comment?