- 博客(9)
- 资源 (8)
- 收藏
- 关注
转载 Python cv2.drawContours() Examples
https://www.programcreek.com/python/example/70455/cv2.drawContours
2018-05-29 15:08:35
2119
转载 ndi图像处理
The model itself is written in keras, but to prepare vector labels I used scipy.ndimage.morphologyscipy.ndimage.morphology.distance_transform_edt() is very useful to find distance and direction to the...
2018-05-29 11:19:22
1290
原创 随机游走图像切割
随机游走算法很容易用于医学图像切割后处理。相关资料http://scikit-image.org/docs/dev/auto_examples/segmentation/plot_random_walker_segmentation.htmlhttps://blog.youkuaiyun.com/menjiawan/article/details/46862115https://www.cnblogs.com...
2018-05-29 10:39:14
1131
原创 生成mask之间空隙权重
import randomfrom collections import defaultdictimport sysimport loggingimport numpy as npimport osimport cv2import timefrom scipy import ndimageTRAIN_PATH = 'D:/2018 Data Science Bowl/stage1_train/'T...
2018-05-29 07:19:19
456
原创 比较有用的一些python代码 拉伸显示,维度转换
遥感图像拉伸显示# 因为遥感图像数据位数是16位(uint16),需要使用5%的线性拉伸,不然显示起来不正常def stretch_n(bands, lower_percent=5, higher_percent=95): # print(bands.dtype) # 一定要使用float32类型,原因有两个:1、Keras不支持float64运算;2、float32运算要好于uint...
2018-05-23 16:21:42
2961
原创 keras 安装不上
登陆下面网页,放到指定的文件夹下面,cd到文件夹,然后pip全称https://www.lfd.uci.edu/~gohlke/pythonlibs/
2018-05-21 12:04:15
1854
原创 numpy 增减数组的维度
假设a的shape为[1000,128,128]b=np.expand_dims(a,axis=0)b的shape为[1,1000,128,128]c=np.squeeze(b)c的数据维度为[1000,128,128]expand_dims为增加内容为空的维度squeeze为删除内容为空的维度...
2018-04-11 09:51:13
17002
原创 numpy 数据切片方法
假设设一个numpy数组的a的维度为[1000,128,128,20]。b=a[:,:,:,0],b的维度为[1000,128,128]。假设c=a[:,:,:,0:1],那么c的维度为[1000,128,128,1]。b和c的数据内容是一样的,但是c多了一个内容是空的维度。...
2018-04-11 09:30:03
1192
原创 对keras环境下的feature map做切片
使用keras下的Convolution2D,或者Input()函数时,直接输出的是一个feature map立方体。如果对不同的层进行操作,则需要对feature map 立方体做切片。假设数据的输入为inputs=Input((128,128,20))如果对inputs进行切片操作,可做如下处理:x1=Lambda(lambda x:x[:,:,:,1:10])(inputs)x2=Lambd...
2018-04-11 08:49:06
1929
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人