原创 Python 詞典(Dict) 加載與保存

Dict的加載: import json def load_dict(filename): '''load dict from json file''' with open(filename,"r") as js

原创 Latex 引入已有PDF文件

引入包: \usepackage{pdfpages} 引入需要加載的PDF文件 \includepdf[pages={1}]{first.pdf} 加入頁面後想加入空白頁可以使用: \cleardoublepage

原创 pytorch DataParallel 多GPU訓練

當一臺服務器有多張GPU時,運行程序默認在一張GPU上運行。通過多GPU訓練,可以增大batchsize,加快訓練速度。 from torch.nn import DataParallel num_gpu = torch.cuda

原创 Pytorch 計算分類器準確率(總分類及子分類)

分類器平均準確率計算: correct = torch.zeros(1).squeeze().cuda() total = torch.zeros(1).squeeze().cuda() for i, (images, label

原创 Pytorch DiceLoss MulticlassDiceloss

轉自:https://blog.csdn.net/a362682954/article/details/81226427 DiceLoss class DiceCoeff(Function): """Dice coeff

原创 Pytorch 加載數據加速

利用DataPretcher加速 device = torch.device("cuda") class DataPrefetcher(): def __init__(self, loader): sel

原创 Linux執行shell腳本找不到文件或無法cd到指定目錄

測試模型時有時需要依次測多個模型或多步處理操作,於是通過寫shell腳本實現批量處理。 執行shell腳本時遇到找不到指定文件或無法cd到指定目錄。 原因 shell腳本編寫時的系統和執行腳本的系統不一致,比如在windows系統

原创 Pytorch 類別標籤轉換one-hot編碼

這裏用到了Pytorch的scatter_函數: scatter_(dim, index, src) → Tensor Writes all values from the tensor src into self at the

原创 NiBabel 使用

NiBabel包是可以對常見的醫學和神經影像文件格式進行讀寫。 安裝 pip install nibabel 加載相關庫 import os import numpy as np import nibabel as nib 載

原创 LeetCode 隱藏加鎖題目

不加鎖的題目暫時夠用,不想看到小鎖子 F12打開控制板 $('.question-status-column .lock__13du').parent().parent().parent().hide();

原创 [ICCV 2019] YOLACT Real-time Instance Segmentation

文章目錄YOLACT Real-time Instance Segmentation1. Author2. Abstract3. Introduction4. YOLACT4.1 Rationale4.2 Prototype Ge

原创 Dual Adaptive Pyramid Network for Cross-Stain Histopathology Image Segmentation

文章目錄1. Author2. Abstract3. Introduction4. Method4.1 Model Overview4.2 Segmentation Network4.3 Domain Adaptation4.3.

原创 Learning from Synthetic Data: Addressing Domain Shift for Semantic Segmentation

文章目錄1 Author2 Abstract3 Introduction4 Method4.1 Description of network blocks4.2 Treatment of source and target dat

原创 Searching Learning Strategy with Reinforcement Learning for 3D Medical Image Segmentation

文章目錄1 Author2 Abstract3 Introduction4 Related Work5 Methodology5.1 Searching Space Definition5.2 RL Based Searching

原创 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