weixin_39789399
weixin_39789399
2020-11-27 23:05

Question about upsampling function

Hi everyone,

Can anyone tell me, for upsample_layer function(in layer_util.py), why should we use resize_nearest_neighbor method instead of upsampling function offered by tensorflow?

Thank you

该提问来源于开源项目:wizyoung/YOLOv3_TensorFlow

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

  • weixin_39726131 weixin_39726131 5月前

    This comes from the yolo source code. see yolo cfg here: https://github.com/pjreddie/darknet/blob/master/cfg/yolov3-voc.cfg#L630

    yolo uses the nearest neighbor resizing.

    点赞 评论 复制链接分享
  • weixin_39789399 weixin_39789399 5月前

    Thank you and good to know this.

    Please allow me to follow-up. You just said "yolo uses the nearest neighbor resizing". Do you have any reference to it? I will be appreciate if you can point me out some clues. I do checked the link you attached but I do not think it suggests what you said above.

    点赞 评论 复制链接分享
  • weixin_39726131 weixin_39726131 5月前

    The C source code of the upsample layer in the config file is defined here: https://github.com/pjreddie/darknet/blob/master/src/blas.c#L334. So you see, it's the nearest neighbor resize.

    点赞 评论 复制链接分享
  • weixin_39789399 weixin_39789399 5月前

    My bad. I'm not quite familiar with C. Still thank you for your kindly response.

    点赞 评论 复制链接分享
  • weixin_39726131 weixin_39726131 5月前

    Actually, I think is a good question. So I will mark it as good first issue tag.

    点赞 评论 复制链接分享

相关推荐