计算机视觉
文章平均质量分 54
pytorch\tensorflow\opencv等
小峥嵘
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
解决DataLoader产生的数据全是零的问题
产生这个的主要原因是DataLoader无法处理GPU内的数据,只能使用CPU处理,故在Dataset中的__getitem__函数的返回值只能是cpu中的数据原创 2022-04-15 18:31:46 · 2479 阅读 · 2 评论 -
GCNs学习笔记
简介图卷积网络就是学习一个函数G=(V,E)G=(V,E)G=(V,E)G=(V,E)输入设节点NiN_iNi对应的特征向量为αi\alpha_iαi则所有节点组成为:(α1,α2,...,αi)(\alpha_1,\alpha_2,...,\alpha_i)(α1,α2,...,αi)作为一个输入图结构,即邻接矩阵AAA输入G=(V,E)输出输出得到新的特征向量组H=(α1′,α2′,...,αi′)H=(\alpha_1',\alpha_2',...,\alpha_i')H=(原创 2021-12-31 20:03:52 · 1063 阅读 · 0 评论 -
CNN中各参数的意义
太久没碰深度学习了,复习复习:关键参数:(参数英文名基于pytorch中的Conv2d())输入大小(Hinput×Winput×CinputH_{input}×W_{input}×C_{input}Hinput×Winput×Cinput)、卷积核大小(Houtput×Woutput×CoutputH_{output}×W_{output}×C_{output }Houtput×Woutput×Coutput)、步长stride(SSS)、膨胀padding(PPP)、卷积核数量out_原创 2021-12-31 16:54:10 · 1087 阅读 · 0 评论 -
OpenCV-python利用蒙版进行叠加(含alpha通道)
# 读取图片,蒙版(黑色代表不选中,白色代表选中)img = cv2.imread(img_item)img = cv2.resize(img, (960, 1280), interpolation=cv2.INTER_LINEAR)mask = cv2.imread(os.path.join(mask_file, mask_item), cv2.IMREAD_UNCHANGED)bg = cv2.imread(bg_path)bg = cv2.resize(bg, (img.shape[1],原创 2021-05-30 09:36:22 · 4767 阅读 · 4 评论 -
OpenCV通过for循环修改值
以本例:二值图像取反为例 for i in range(binaryImg.shape[0]): for j in range(binaryImg.shape[1]): if binaryImg[i][j] == 1: binaryImg[i][j] = 0 else: binaryImg[i][j] = 1注意:不能直接原创 2021-05-25 21:33:44 · 493 阅读 · 1 评论 -
python利用蒙版抠图(使用PIL.Image和cv2)输出透明背景图
因为最近在做深度学习抠图,正好要用到蒙版进行抠图,所以我将抠图代码进行了封装注释,可以直接使用。可能走了弯路,若有高见请一定提出!主要代码import cv2from PIL import Imageimport numpy as npclass UnsupportedFormat(Exception): def __init__(self, input_type): self.t = input_type def __str__(self):原创 2020-05-10 15:30:46 · 7002 阅读 · 5 评论 -
pytorch报错RuntimeError:error in LoadLibraryA
问题描述原因一 :pytorch1.4版本问题解决办法:在import torch这里改成下面的代码:import torchimport ctypesctypes.cdll.LoadLibrary('caffe2_nvrtc.dll')a: torch.Tensor = torch.arange(9).view(3, 3).cuda()torch.cat([a, a])tor...原创 2020-04-29 19:22:23 · 1667 阅读 · 1 评论 -
ValueError: Failed to find data adapter that can handle input报错
报错内容:ValueError: Failed to find data adapter that can handle input: <class ‘numpy.ndarray’>, (<class ‘list’> containing values of types {"<class ‘int’>"})原因:list类型是不能作为标签输入的,TensorFlow支持array输入解决办法把list转化为array:(这里举例要存入一个[0, 0, 0, 1,原创 2021-03-10 22:10:40 · 4766 阅读 · 0 评论 -
TensorFlow keras实现unet网络并进行图像分割入门实例(非常适合新手!)
最近在学习图像分割方面内容,做了个实例在这儿给大家分享。(不喜请一定喷,多多评论,互相学习)这个实例用到了kaggle的一个数据集,是来自Carvana Image Masking Challenge这个比赛,下面提供官网下载地址和百度网盘下载地址官网:https://www.kaggle.com/c/carvana-image-masking-challenge/data官网需要注册才能下载网盘:https://pan.baidu.com/s/1EHSt0ANwSI8x67j_h8ZYjw提取码原创 2020-05-15 11:34:56 · 8599 阅读 · 25 评论 -
Could not load dynamic library ‘cudart64_100.dll’; dlerror: cudart64_100.dll not found最终解决办法
前言先感慨一下,硬是在这上面折腾了好几个小时好了正式开始:1.找到CUDA的安装目录(默认:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA)2.直接搜索:cudart643.右键属性,把它改成(如图):cudart64_100.dll修改后就可以了。...原创 2019-10-19 19:58:54 · 46383 阅读 · 12 评论
分享