
python
shchojj
这个作者很懒,什么都没留下…
展开
-
ERROR: Could not install packages due to an OSError: Proxy URL had no scheme,
很简单,搜索pip.ini文件,删掉没用的。转载 2022-10-23 13:08:47 · 482 阅读 · 0 评论 -
pycharm用了一段时间就卡
pycharm用了一段时间就卡,虽然不知道是不是缓存的愿意,但感觉清了一会缓存之后就好很多。原创 2022-01-21 09:15:11 · 994 阅读 · 0 评论 -
python调用c之3D三线性插值 重采样
实际的参考是根据cityscapsscripts修改的cityscapesScripts/cityscapesscripts/evaluation at master · mcordts/cityscapesScripts · GitHub1、首先编写的C语言脚本volume_resample_impl.c我挺喜欢这个地方加上_impl的,这样方便和打包调用的名称混淆,其他涉及到的细节我就不写了。void volume_resample_nearast( const unsigned原创 2022-01-11 00:35:02 · 912 阅读 · 0 评论 -
python 求关于mask的均值方差
https://numpy.org/doc/stable/reference/generated/numpy.ma.mean.htmlhttps://www.geeksforgeeks.org/numpy-maskedarray-mean-function-python/https://stackoverflow.com/questions/37935954/how-can-i-run-a-numpy-function-percentile-on-a-masked-array/41673347h原创 2021-09-01 16:21:49 · 787 阅读 · 0 评论 -
nrrd to nifti
def nrrd2nii(in_fn, out_fn=None): if not in_fn.endswith('.nrrd'): logger.info('skipped') else: try: image = sitk.ReadImage(in_fn) if out_fn is None: out_fn = in_fn.replace('nrrd', 'nii.gz') .原创 2021-05-08 16:40:20 · 391 阅读 · 0 评论 -
体位转换
def get_center(img): """ This function returns the physical center point of a 3d sitk image :param img: The sitk image we are trying to find the center of :return: The physical center point of the image """ width, height, depth = i.原创 2021-05-08 16:38:43 · 446 阅读 · 0 评论 -
unittest --- 单元测试框架
import unittestclass TestStringMethods(unittest.TestCase): def test_upper(self): self.assertEqual('foo'.upper(), 'FOO') def test_isupper(self): self.assertTrue('FOO'.isupper()) self.assertFalse('Foo'.isupper()) def.转载 2021-04-08 14:30:51 · 118 阅读 · 0 评论 -
DEFORM-GAN:AN UNSUPERVISED LEARNING MODEL FOR DEFORMABLE REGISTRATION
https://arxiv.org/pdf/2002.11430.pdf多模配准最困难的地方:1、多模态或序列的similarity measurement,例如mutual information(MI),需要binning or quantizing,这样离散化会导致gradient vanishing,2、no ground-truth .在不同强度、噪声、模糊的数据间进行多模配准。引入了:1、gradient loss:鲁棒性更强(across sequences,以及跨模态的大翻译 2020-06-23 18:24:39 · 1162 阅读 · 0 评论 -
simpleitk质心对齐
initial_transform = sitk.CenteredTransformInitializer(sitk.Cast(fixed_image,moving_image.GetPixelID()), moving_image, ...转载 2019-08-05 17:53:36 · 1399 阅读 · 0 评论 -
Max pooling一定程度上,位移、尺度、形变不变性
参考:https://www.cnblogs.com/guoyaohua/p/8674228.html https://www.sohu.com/a/160924449_651893Max pooling的原理:Max pooling在不同的通道深度上分开执行:一)平移不变性二)旋转不变性三)尺度不变性...转载 2019-06-26 11:10:16 · 1961 阅读 · 0 评论 -
TensorFlow Large Model Support:TensorFlow中用于大模型支持(lms)的图形编辑库
参考:https://github.com/IBM/tensorflow-large-model-support该库提供了一种训练大模型的方法,这些模型往往是GPU显存不足,它采用用户自定义的图,并自动添加swap-in和swap-out节点,用于将tensors从GPUs传输到主机设备,反之亦然。计算图是静态修改的。因此,它需要在回话开始前就完成。IBM PowerAI 1.6包含比gi...转载 2019-06-18 10:35:08 · 2163 阅读 · 0 评论 -
显存不够时,如何利用GPU训练数据
参考:https://github.com/openai/gradient-checkpointing https://www.jqr.com/article/000537 https://www.infoq.cn/article/fRN0eVBNedTIrm5_Ps1M使用gradient-checkpointing来节省存储 ...翻译 2019-06-14 11:27:45 · 6486 阅读 · 0 评论 -
python 深度学习-第5章 深度学习用于计算机视觉
卷积网络,也叫convent。5.1 卷积神经网络简介#5-1 实例化一个小型卷积神经网络from keras import layersfrom keras import modelsmodel = models.Sequential()model.add(layers.Conv2D(32, (3,3), activation ='relu', input_shape=(2...转载 2019-05-30 16:11:16 · 2319 阅读 · 5 评论 -
第4章 机器学习基础
4.1 机器学习的四个分支二分类问题、多分类问题和标量回归问题,都是监督学习(supervised learning),目标是学习训练输入与训练目标之间的关系。4.1.1 监督学习给定一组样本(通常由人工标注),他可以学会将输入数据映射到已知目标【也叫标注(annotation)】。序列生成(sequence generation)。给定一张图,预测描述图像的文字,序列生成有时可以...转载 2019-05-27 18:58:12 · 886 阅读 · 0 评论 -
python 深度学习-第3章 神经网络入门
from keras import layerslayer = layers.Dense(32,input_shape=(784,)) # 32个输出单元的密集层,只接受第一个维度大小为784的2D张量的输入,第0轴是批量的维度,其大小没有指定,因此可以使用任意取值, #第一个维度的大小变成32.因此这个层...转载 2019-05-27 17:12:46 · 5912 阅读 · 2 评论 -
《Learn Python the Hard Way》笔记-1序言&&2前言&&3简介
https://github.com/521xueweihan/python3 简介 读和写、注重细节、发现不同 exercise0.安装和准备 略,网上很多。我是用anaconda安装的。我这里是python3.所以不要被我误导。 出现问题后排查,1、中英文符号;2、python2与python3差异;3、.py是文件,不能再pyth...转载 2019-03-29 15:55:52 · 789 阅读 · 0 评论