自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 LovaszSoftmax代码实现

def lovasz_grad(gt_sorted): """ Computes gradient of the Lovasz extension w.r.t sorted errors See Alg. 1 in paper """ gts = tf.reduce_sum(gt_sorted) intersection = gts - tf.cum...

2019-09-02 11:19:08 1198

原创 数据增强

#使用skimage 数据增强处理的验证# ############################# #使用skimage 数据增强处理的验证 试验from skimage import io,transformfrom skimage import color,data_dir,datafrom skimage import exposure,img_as_floatimpor...

2019-07-30 20:23:03 169

原创 BN,GN,IN,LN的TensorFlow代码实现

#BNdef BN(input, bn_training, name): # assert isinstance(is_training, (ops.Tensor, variables.Variable)) and is_training.dtype == tf.bool def bn(input, bn_training, name, reuse=None): ...

2019-07-16 15:01:45 1355

翻译 损失函数python实现

这是从GitHub上下载的loss函数;交叉熵素损失函数def pixel_wise_softmax(output_map): exponential_map = tf.exp(output_map) sum_exp = tf.reduce_sum(exponential_map, 3, keep_dims=True) return tf.div(exponential...

2019-07-09 10:41:34 3477

原创 SimpleITK保存.nii.gz的文件

print('img_path', img_path[0]) img_img = load_itk(img_path[0]) # 正常读取,sitk.ReadImage(path) # img_img = nibabel.load(img_path[0]).get_data() img_array...

2019-07-09 10:34:11 990

原创 ResNet,BN实现

1.ResNet# bottleneck残差单元模块def _bottleneck_residual(self, x, in_filter, out_filter, stride, activate_before_residual=False): # 是否前置激活(取残差直连之前进行BN和ReLU) if activate_be...

2019-04-01 19:04:22 1657

翻译 MIoU的代码实现

import numpy as npimport argparseimport jsonfrom PIL import Imagefrom os.path import join# 设标签宽W,长Hdef fast_hist(a, b, n): # a是转化成一维数组的标签,形状(H×W,);b是转化成一维数组的标签,形状(H×W,);n是类别数目,实数(在这里为19) ...

2019-03-29 10:48:51 3511 3

原创 batch normalization代码实现

BN实现BN实现的两种要学会知道BN的推倒公式import tensorflow as tffrom tensorflow.python.training import moving_averagesclass Model: def __init__(self, is_train, learning_rate...

2019-03-28 17:22:30 1060

原创 ResNet框架

import numpy as npfrom hyper_parameters import *BN_EPSILON = 0.001def activation_summary(x): ''' :param x: A Tensor :return: Add histogram summary and scalar summary of the sparsity...

2019-03-23 12:08:51 275

原创 dice损失函数

def dice_coef(y_true, y_pred, axis=(1, 2), smooth=1.): intersection = tf.reduce_sum(y_true * y_pred, axis=axis) union = tf.reduce_sum(y_true + y_pred, axis=axis) numerator = tf.constant(2...

2019-03-23 11:47:40 8021 3

原创 图像预处理

1.标准化处理与归一化1)白化处理(图像标准化处理);图像标准化是将数据通过去均值实现中心化的处理,根据凸优化理论与数据概率分布相关知识,数据中心化符合数据分布规律,更容易取得训练之后的泛化效果,数据标准化是数据预处理的常见方法之一。2)归一化处理。归一化不会改变图像本身的信息存储,取值范围从0~255已经转化为0~1之间。import cv2pic_path = 'D:/im...

2019-03-20 20:11:20 497

原创 图像增强

import cv2import randomimport osimport numpy as npfrom tqdm import tqdmimport glob#################数据增强代码#############img_w = 256img_h = 256#image_sets = ['1.png', '2.png', '3.png', '4.png'...

2019-03-20 19:10:11 202 1

原创 java学习

数据类型1.每一种数据都定义了明确的具体类型,再内存中分配了不同的内存空间2。4类8种           整数---byte --- 1个字节---   -128到127                 short---- 2个字节   ----   -2^15到 2^15-1                  int ---  4个字节 ------ -2^31到2^31-...

2018-07-22 09:36:35 95

原创 java学习

注释    1.单行注释    --------- //    2.多行-----------  /*        */       多行注释不能嵌套    3.文档注释  ---------  /**      */关键字 1.关键字都是小写2.goto和const作为保留字存在,目前并不能使用标识符1.标识符就是给类,接口,方法等起变量名使用的字符序列...

2018-07-20 23:15:47 84

原创 java学习之路

java的书写格式1.大括号要对齐,并且成对2.左大括号前面有空格3.遇到左大括号要缩进--Tab4.方法和程块之间加空行让程序看起来清晰5.并排语句之间加空格,例如for语句6.运算符号两侧加空格path配置  ...

2018-07-20 21:23:01 126

原创 java学习之路

1.java语言特性      简单---解释性、面向对象---高性能、分布式处理---多线程、健壮性---动态、结构中立---安全性      开源、跨平台----java编写的程序能在其他平台运行。其原理为在运行java应用程序的操作系统上,先安装一个java虚拟机。2.JRE与JDK     JRE:JVM+类库     JDK:JRE+java的开发工具      ...

2018-07-20 18:49:08 86

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除