anchors_plane python

ShellCollector 2021-04-08 11:56:37
Python plane anchors_plane anchors


 

def anchors_plane(feat_h, feat_w, stride, base_anchors):
# return anchors_cython(feat_h, feat_w, stride, base_anchor)
A = base_anchors.shape[0]
all_anchors = np.zeros((feat_h, feat_w, A, 4))
for iw in range(feat_w):
sw = iw * stride
for ih in range(feat_h):
sh = ih * stride
for k in range(A):
all_anchors[ih, iw, k, 0] = base_anchors[k, 0] + sw
all_anchors[ih, iw, k, 1] = base_anchors[k, 1] + sh
all_anchors[ih, iw, k, 2] = base_anchors[k, 2] + sw
all_anchors[ih, iw, k, 3] = base_anchors[k, 3] + sh
return all_anchors

cpython:

cimport cython
import numpy as np
cimport numpy as np
DTYPE = np.float32
ctypedef np.float32_t DTYPE_t
def anchors_cython(int height, int width, int stride, np.ndarray[DTYPE_t, ndim=2] ba
版权声明
本文为[ShellCollector]所创,转载请带上原文链接,感谢
https://blog.csdn.net/jacke121/article/details/115500844

  1. Drawing Doraemon in Python
  2. Python charts
  3. 用 Python 来了解一下《安家》
  4. 用 Python 抓取公号文章保存成 PDF
  5. 用 Python 生成炫酷二维码及解析
  6. Using Python to grab articles with public number and save them as HTML
  7. Getting stock market trading data with Python
  8. Learn about settle down in Python
  9. Using Python to grab articles with public number and save them as PDF
  10. Using Python to generate cool two dimensional code and analysis
  11. 20210225-1 Python错误与异常
  12. 20210225-1 Python errors and exceptions
  13. 使用Python拆分、合并PDF
  14. Using Python to split and merge pdf
  15. 真工程师:20块钱做了张「名片」,可以跑Linux和Python
  16. Implementation of LSB steganography based on MATLAB and python
  17. Real Engineer: 20 yuan to make a "business card", can run Linux and python
  18. python修改微信和支付宝步数
  19. Python changes WeChat and Alipay steps
  20. Python空间分析| 01 利用Python计算全局莫兰指数(Global Moran's I)
  21. Python spatial analysis | 01 using Python to calculate global Moran's index
  22. python入门教程13-05 (python语法入门之数据备份、pymysql模块)
  23. Introduction to Python 13-05 (data backup and pymysql module of introduction to Python syntax)
  24. pandas如何操作Excel?还不会的,看此一篇足矣
  25. How does panda operate excel? Not yet. This is enough
  26. 用python连接数据库模拟用户登录
  27. Using Python to connect database to simulate user login
  28. python入门教程13-04 (语法入门之记录相关操作)
  29. Introduction to Python 13-04
  30. python入门教程13-03 (python语法入门之表相关操作)
  31. Introduction to Python 13-03
  32. python的多线程的网络爬虫,待改进
  33. Python multithreaded web crawler, to be improved
  34. 常见加密算法的Python实现:
  35. Python implementation of common encryption algorithms:
  36. python刷题-核桃的数量
  37. Number of walnuts
  38. Python爬虫知乎文章,采集新闻60秒
  39. Python crawler knows articles and collects news for 60 seconds
  40. Python爬虫知乎文章,采集新闻60秒
  41. Python crawler knows articles and collects news for 60 seconds
  42. bbox_overlaps python
  43. bbox_ overlaps python
  44. 7-43 jmu-python-字符串异常处理 (20 分)
  45. 7-43 JMU Python string exception handling (20 points)
  46. n行Python代码系列:两行代码实现视频文件转成系列图片输出
  47. N-line Python code series: two lines of code to achieve video files into a series of pictures output
  48. python-阶乘计算
  49. Python factorial calculation
  50. Python实现定时发送微信消息
  51. python爬取英雄联盟所有英雄皮肤海报
  52. Sending wechat messages regularly with Python
  53. Python crawls all hero skin posters of hero League
  54. 上手Pandas,带你玩转数据(4)-- 数据清洗
  55. Hands on pandas, take you to play with data (4) -- data cleaning
  56. Python继续霸榜,上古语言Cobol重获关注,IEEE 2020编程语言榜单揭晓
  57. 教你用 Python 下载手机小视频
  58. Python continues to dominate the list, ancient language COBOL regains attention, IEEE 2020 programming language list announced
  59. How to download small video of mobile phone with Python
  60. 如何用 Python 在京东上抢口罩