-
大小: 15KB文件类型: .zip金币: 1下载: 0 次发布日期: 2021-01-09
- 语言: Python
- 标签:
资源简介
图像分割Keras:在Keras中实现Segnet,FCN,UNet和其他模型
代码片段和文件信息
import numpy as np
import cv2
import glob
import itertools
def getImageArr( path width height imgNorm=“sub_mean“ odering=‘channels_first‘ ):
try:
img = cv2.imread(path 1)
if imgNorm == “sub_and_divide“:
img = np.float32(cv2.resize(img ( width height ))) / 127.5 - 1
elif imgNorm == “sub_mean“:
img = cv2.resize(img ( width height ))
img = img.astype(np.float32)
img[::0] -= 103.939
img[::1] -= 116.779
img[::2] -= 123.68
elif imgNorm == “divide“:
img = cv2.resize(img ( width height ))
img = img.astype(np.float32)
img = img/255.0
if odering == ‘channels_first‘:
img = np.rollaxis(img 2 0)
return img
except Exception e:
print path e
img = np.zeros(( height width 3 ))
if odering == ‘channels_first‘:
img =
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-04-12 06:39 divamgupta-image-segmentation-keras-3894259\
文件 1160 2018-04-12 06:39 divamgupta-image-segmentation-keras-3894259\.gitignore
文件 2847 2018-04-12 06:39 divamgupta-image-segmentation-keras-3894259\LoadBatches.py
目录 0 2018-04-12 06:39 divamgupta-image-segmentation-keras-3894259\Models\
文件 3978 2018-04-12 06:39 divamgupta-image-segmentation-keras-3894259\Models\FCN32.py
文件 5324 2018-04-12 06:39 divamgupta-image-segmentation-keras-3894259\Models\FCN8.py
文件 7 2018-04-12 06:39 divamgupta-image-segmentation-keras-3894259\Models\PSPNet.py
文件 3269 2018-04-12 06:39 divamgupta-image-segmentation-keras-3894259\Models\Segnet.py
文件 2848 2018-04-12 06:39 divamgupta-image-segmentation-keras-3894259\Models\Unet.py
文件 360 2018-04-12 06:39 divamgupta-image-segmentation-keras-3894259\Models\Utils.py
文件 4217 2018-04-12 06:39 divamgupta-image-segmentation-keras-3894259\Models\VGGSegnet.py
文件 8387 2018-04-12 06:39 divamgupta-image-segmentation-keras-3894259\Models\VGGUnet.py
文件 60 2018-04-12 06:39 divamgupta-image-segmentation-keras-3894259\Models\__init__.py
文件 3262 2018-04-12 06:39 divamgupta-image-segmentation-keras-3894259\README.md
文件 2352 2018-04-12 06:39 divamgupta-image-segmentation-keras-3894259\predict.py
文件 2921 2018-04-12 06:39 divamgupta-image-segmentation-keras-3894259\train.py
文件 1511 2018-04-12 06:39 divamgupta-image-segmentation-keras-3894259\visualizeDataset.py
评论
共有 条评论