代码片段记录
00000cj
计算机视觉,论文阅读记录
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
文本检测模型随机crop代码整理
PSENetdef random_crop(imgs, img_size): # imgs = [img, gt_text, training_mask] # imgs.extend(gt_kernels) h, w = imgs[0].shape[0:2] th, tw = img_size # 640, 640 if w == tw and h == th: return imgs if random.random() >原创 2021-05-28 12:07:02 · 476 阅读 · 0 评论 -
根据顶点坐标计算多边形面积
代码def polygon_area(poly): """ compute area of a polygon :param poly: :return: """ edge = [(poly[1][0] - poly[0][0]) * (poly[1][1] + poly[0][1]), (poly[2][0] - poly[1][0]) * (poly[2][1] + poly[1][1]), (poly原创 2021-05-19 13:57:19 · 1883 阅读 · 0 评论 -
图片旋转90、180、270度以及标注坐标的变换
def rotate_im_poly(im, text_polys): """ rotate image with 90 / 180 / 270 degre """ im_w, im_h = im.shape[1], im.shape[0] dst_im = im.copy() dst_polys = [] rand_degree_ratio = np.random.rand() rand_degree_cnt = 1 if 0.33.原创 2021-05-19 11:52:19 · 5735 阅读 · 0 评论
分享