- 博客(91)
- 资源 (5)
- 收藏
- 关注
原创 【TensorFlow】No module named ‘tensorflow_core.keras‘
TensorFlow报错:ModuleNotFoundError: No module named ‘tensorflow_core.keras’猜测原因可能是自己根据需要才新安装的TensorFlow,和之前的一些依赖版本不匹配,才用重装大法解决问题pip install --force-reinstall tensorflow参考自:ModuleNotFoundError: No module named ‘tensorflow_core.keras’...
2020-10-13 10:51:21
2927
1
原创 Latex 引入已有PDF文件
引入包:\usepackage{pdfpages}引入需要加载的PDF文件\includepdf[pages={1}]{first.pdf}加入页面后想加入空白页可以使用:\cleardoublepage
2020-06-02 19:30:57
11514
转载 LaTeX技巧:算法标题 Algorithm如何重命名
原文地址:https://www.latexstudio.net/archives/7898.html【问题描述】使用 \usepackage{algorithm2e} 如何使得caption{}排版结果产生的“Agorithm”变为 “算法”?【解决方案】milksea 回复:改这两个\renewcommand{\listalgorithmcfname}{List of Algorithms}\renewcommand{\algorithmcfname}{Algorithm}中文就是要放在
2020-06-02 10:48:39
4611
原创 LeetCode 隐藏加锁题目
不加锁的题目暂时够用,不想看到小锁子F12打开控制板$('.question-status-column .lock__13du').parent().parent().parent().hide();
2019-12-31 14:09:56
1252
原创 Pytorch 加载数据加速
利用DataPretcher加速device = torch.device("cuda")class DataPrefetcher(): def __init__(self, loader): self.loader = iter(loader) self.stream = torch.cuda.Stream() self.preloa...
2019-11-15 08:48:25
803
原创 [MICCAI 2019] Comparative Evaluation of Hand-Engineered and Deep-Learned Features for Neonatal Hip B
文章目录Comparative Evaluation of Hand-Engineered and Deep-Learned Features for Neonatal Hip Bone Segmentation in Ultrasound1. Author2. Abstract3. IntroductionComparative Evaluation of Hand-Engineered an...
2019-11-03 13:11:14
552
原创 [ICCV 2019] YOLACT Real-time Instance Segmentation
文章目录YOLACT Real-time Instance Segmentation1. Author2. Abstract3. Introduction4. YOLACT4.1 Rationale4.2 Prototype Generation4.3 Mask Coefficients4.4 Mask Assembly4.5 Emergent BehaviorYOLACT Real-time ...
2019-11-01 20:43:38
614
原创 Unsupervised Domain Adaptation via Disentangled Representations: Application to Cross-Modality Liver
文章目录Unsupervised Domain Adaptation via Disentangled Representations: Application to Cross-Modality Liver Segmentation1. Author2. Abstract3. Introduction4. Methodology4.1 DRLModule4.2 Domain Adaptation...
2019-10-31 15:09:27
564
1
原创 Dual Adaptive Pyramid Network for Cross-Stain Histopathology Image Segmentation
文章目录1. Author2. Abstract3. Introduction1. AuthorXianxu Hou1;2*, Jingxin Liu1;2;3, Bolei Xu1;2, Bozhi Liu1;2, Xin Chen4, Mohammad Ilyas5, Ian Ellis5, Jon Garibaldi4, and Guoping Qiu1;2;41 College of...
2019-10-30 17:03:24
376
原创 Anatomical Priors for Image Segmentation via Post-processing with Denoising Autoencoders
文章目录1. Author2. Abstract3. Introduction3.1 Contributions3.2 Related Works4 Anatomical Priors for Image Segmentation via Post-processing with DAE4.1 Problem Statement4.2 Denoising Autoencoders4.3 Mask ...
2019-10-24 10:46:04
593
原创 Searching Learning Strategy with Reinforcement Learning for 3D Medical Image Segmentation
文章目录AuthorAbstractIntroductionRelated WorkMethodologySearching Space DefinitionAuthorDong Yang, Holger Roth, Ziyue Xu, Fausto Milletari, Ling Zhang, and Daguang XuNVIDIA, Bethesda, USAAbstractTo ...
2019-10-20 23:45:00
1049
3
原创 Learning from Synthetic Data: Addressing Domain Shift for Semantic Segmentation
文章目录AuthorAbstractIntroductionMethodDescription of network blocksTreatment of source and target dataIterative optimizationMotivating design choice of DDDAuthorSwami Sankaranarayanan 1*, Yogesh Balaj...
2019-10-20 15:43:09
746
原创 Ubuntu中WPS无法输入中文
【问题描述】Ubuntu下安装了WPS以及搜狗输入法,在其他软件下可以正常输入中文,但在wps下已切换到搜狗输入法,但无法输入中文。【原因】环境变量未正确设置。【解决方案】wps文字sudo vim /usr/bin/wps添加以下文字到打开的文本中(添加到“#!/bin/bash”下面):export XMODIFIERS="@im=fcitx"export QT_IM_MO...
2019-08-21 16:39:50
1055
原创 Linux执行shell脚本找不到文件或无法cd到指定目录
测试模型时有时需要依次测多个模型或多步处理操作,于是通过写shell脚本实现批量处理。执行shell脚本时遇到找不到指定文件或无法cd到指定目录。原因shell脚本编写时的系统和执行脚本的系统不一致,比如在windows系统编写的脚本,放到linux系统时会遇到此问题。windows下编写的.sh文件为dos格式,而linux只能执行格式为unix格式的脚本。解决方法通过vim打开要执...
2019-07-11 16:30:35
6986
原创 Python re 正则表达式 匹配小数
re提取文本中的浮点值,包括整数,小数,科学计数法。 import re re.findall(r'-?\d+\.?\d*e?-?\d*?','s')
2019-06-06 14:57:15
11550
4
原创 Pytorch 图像分割使用findContours报错
做图像分割时,想在Pytorch的预测结果的基础上进行后处理,用到了cv2.findContours里找标签的连通域,运行时报错:cv2.error: OpenCV(4.0.0) /io/opencv/modules/imgproc/src/contours.cpp:195: error: (-210:Unsupported format or combination of formats) [...
2019-06-05 10:47:18
6329
3
原创 Python Levenshtein 计算文本之间的距离
莱文斯坦距离,又称Levenshtein距离,是编辑距离的一种。 指两个字串之間,由一个转成另一个所需的最少编辑操作次数。 允许的编辑操作包括将一个字符替换成另一个字符,插入一个字符,刪除一个字符。GitHub 提供了计算莱文斯坦距离的包。安装方法:pip install python-Levenshteinhttps://www.lfd.uci.edu/~gohlke/pythonli...
2019-05-23 10:59:40
11197
原创 Pytorch 类别标签转换one-hot编码
这里用到了Pytorch的scatter_函数:scatter_(dim, index, src) → TensorWrites all values from the tensor src into self at the indices specified in the index tensor. For each value in src, its output index is sp...
2019-05-13 09:08:37
21429
3
转载 Pytorch DiceLoss MulticlassDiceloss
转自:https://blog.youkuaiyun.com/a362682954/article/details/81226427DiceLossclass DiceCoeff(Function): """Dice coeff for individual examples""" def forward(self, input, target): self.save_...
2019-05-12 16:42:03
2124
转载 Pytorch 计算模型参数量
转自:https://blog.youkuaiyun.com/jdzwanghao/article/details/84196239################### 模型定义# -------------class MyModel(nn.Module): def __init__(self, feat_dim): # input the dim of output fea-ma...
2019-05-11 11:44:15
6295
原创 Python 批量创建迅雷下载任务
from win32com.client import Dispatcho = Dispatch("ThunderAgent.Agent64.1")url = '' # 需要下载的链接地址filename = '' # 保存的文件名称o.AddTask(url, filename)o.CommitTasks()
2019-03-25 19:11:48
3109
6
原创 NiBabel 使用
NiBabel包是可以对常见的医学和神经影像文件格式进行读写。安装pip install nibabel加载相关库import osimport numpy as npimport nibabel as nib载入图像example_filename = os.path.join(data_path, 'example.nii.gz')img = nib.load(examp...
2019-03-25 12:16:57
17621
7
原创 Bitvise SSH Client 无法连接服务器
Windows 要更新系统,重新启动后发现bitvise ssh client无法登录,报一下错误:The SSH2 session has terminated with error. Reason: Error in component session/transport/kexHandler. Error class: Flow, code: ComponentException, me...
2019-01-23 12:06:14
8492
原创 DeepLesion 分类标注工具
Classify kidney for DeepLesion为标注出DeepLesion中的CT图像是否为kidney制作的标注软件功能:点击打开目录加载要处理文件的目录,可以加载已经标注过的文件(0:未处理;1:kidney;2:其他情况)上一张和下一张按钮分别用来切换图像点击列表中的文件名可以直接切换图像点击kidney和其他类别时自动切换下一张图像鼠标左键点...
2019-01-17 21:39:10
2684
原创 Pytorch 模型的加载与保存
pytorch的模型和参数是分开的,可以分别保存或加载模型和参数。1、直接保存模型# 保存模型torch.save(model, 'model.pth')# 加载模型model = torch.load('model.pth')2、分别加载模型的结构和参数# 保存模型参数torch.save(model.state_dict(), 'model.pth')# 加载模型参数mo...
2019-01-17 13:39:16
2128
原创 DeepLesion 数据集文件查看工具
CT Browser [Github]为查看DeepLesion数据集准备的工具。The images are stored in unsigned 16 bit. One should subtract 32768 from the pixel intensity to obtain the original Hounsfield unit (HU) values.DeepLesio...
2019-01-15 20:01:13
3846
19
原创 PyQt5 鼠标控制图片移动、缩放
Image with Mouse Control [Github]鼠标控制图片功能:鼠标左键点击移动图片鼠标右键点击还原图片鼠标滚动滑轮缩放图片窗口大小改变且有父级时还原图片,否则保持不变运行环境:python 2.x or 3.xPyQt5运行方式:python image_with_mouse_control.pyDemo...
2019-01-13 22:22:10
8517
7
原创 Pytorch 计算分类器准确率(总分类及子分类)
分类器平均准确率计算:correct = torch.zeros(1).squeeze().cuda()total = torch.zeros(1).squeeze().cuda()for i, (images, labels) in enumerate(train_loader): images = Variable(images.cuda()) ...
2019-01-13 14:53:05
24522
6
原创 Drag Files do Event
Drag Files do Event [Github]生成一个窗口,可以将文件拖放到窗口中,读取文件的地址进行需要处理过程。文件说明:drag_files_do_event.py 窗体主程序do_event.py 需要对文件处理的内容do_event.py 包含两个方法:方法名输入event_for_filefilename 需要处理的文件event_...
2019-01-10 08:26:14
867
原创 Anacnda中添加python3.6
最新Anaconda中的python默认为3.7版本,然而Tensorflow只支持python3.6之前的版本,因此要在Anaconda中添加一个python3.6具体步骤如下:1、创建python36环境,输入:conda create --name python36 python=3.62、运行完毕后,会看到以下信息:Preparing transaction: doneVer...
2019-01-06 15:52:47
1912
原创 Python 词典(Dict) 加载与保存
Dict的加载:import jsondef load_dict(filename): '''load dict from json file''' with open(filename,"r") as json_file: dic = json.load(json_file) return dicDict的保存:import jsondef sa...
2019-01-05 19:34:10
19957
2
原创 人脸特征相似度计算
人脸识别通常做法为:1、提取人脸特征2、通过计算特征相似度来判断两张人脸图像的相似程度相似度通常用欧式距离或余弦距离欧式距离dis(X,Y)=∑i=1n(xi−yi)2dis(X, Y) = \sqrt{\sum_{i=1}^{n}(x_{i}-y_{i})^2}dis(X,Y)=i=1∑n(xi−yi)2def euclidean_distance(face_encodi...
2019-01-05 14:31:50
16679
7
原创 pytorch DataParallel 多GPU训练
当一台服务器有多张GPU时,运行程序默认在一张GPU上运行。通过多GPU训练,可以增大batchsize,加快训练速度。from torch.nn import DataParallelnum_gpu = torch.cuda.device_count()net = DataParallel(net, device_ides=range(num_gpu))device_ides默认情况下...
2018-11-01 10:48:43
1673
转载 如何在 PyTorch 中设定学习率衰减(learning rate decay)
很多时候我们要对学习率(learning rate)进行衰减,下面的代码示范了如何每30个epoch按10%的速率衰减:def adjust_learning_rate(optimizer, epoch): """Sets the learning rate to the initial LR decayed by 10 every 30 epochs""" lr = args...
2018-10-17 16:24:28
23588
1
原创 小工具-将文件拖拽到bat脚本中连接python执行
不会python的GUI编程,但又想有一个小工具来拖拽处理文件,之前了解过bat脚本,于是就有了这个小工具,这里提供简单的材料,具体需要怎样的工具,具体问题具体分析吧。bat脚本代码:@echo off:labelset /p name=python .\a.py %name%echo finished.goto labelpython代码:import sysprint(s...
2018-10-09 09:21:52
2427
原创 CelebA 数据集图像裁剪
CalebA人脸数据集(官网链接)是香港中文大学的开放数据,包含10,177个名人身份的202,599张人脸图片,并且都做好了特征标记,这对人脸相关的训练是非常好用的数据集。每张图片都有标注人脸的属性。但是在某些时候,我们只需要提取人脸所在位置的图像,数据集中给出了人脸的五个关键点坐标的标注信息以及人脸bbox标注信息,根据这些信息,可以对数据集进行处理,产生新的只包含人脸的数据集。下面...
2018-10-04 14:54:54
5456
4
原创 Pytorch 叉乘
使用Pytorch时遇到想要将矩阵进行自身叉乘的情况,例如输入数据size为[BS, 3],那么需要先将输入数据转换为[BS, 3, 1]和[BS, 1, 3],这时叉乘结果size为[BS, 3, 3]下面为二维矩阵的pytorch代码及结果:import numpy as npimport torcha = np.array([1, 2, 3])a = torch.from_nump...
2018-10-03 14:58:11
6188
1
原创 LeetCode 911. 在线选举
class TopVotedCandidate {public: vector<pair<int, int>> li; TopVotedCandidate(vector<int> persons, vector<int&
2018-09-29 19:47:39
749
原创 回溯算法(十进制转二进制)
【概念】回溯算法实际上一个类似枚举的搜索尝试过程,主要是在搜索尝试过程中寻找问题的解,当发现已不满足求解条件时,就“回溯”返回,尝试别的路径。回溯法是一种选优搜索法,按选优条件向前搜索,以达到目标。但当探索到某一步时,发现原先选择并不优或达不到目标,就退回一步重新选择,这种走不通就退回再走的技术为回溯法,而满足回溯条件的某个状态的点称为“回溯点”。许多复杂的,规模较大的问题都可以使用回溯法,有...
2018-09-28 16:19:29
4156
1
Bitvise SSH Client 8.26
2019-03-08
Bitvise SSH Client 8.23
2019-01-23
opencv by example
2019-01-12
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人