Code Monkey home page Code Monkey logo

keras-semantic-segmentation's Introduction

Keras-Sematic-Segmentation

使用Keras实现深度学习中的一些语义分割模型。

配置

  • tensorflow 1.13.1+tensorboard
  • keras 2.2.4
  • GTX 2080Ti x 2
  • Cuda 10.0 + Cudnn7
  • opencv-python
  • labelme(标注数据需要用)
  • PyCaffe(模型部署时用)

目录结构

  • data 存储输入图像和语义分割标签的文件夹
- data
	- dataset_name
		- train_image
		- train_label
		- test_image
		- test_label
  • Models 存储使用keras实现的一些经典分割模型
  • utils 存储工具代码,如数据预处理,自定义resize方式等
  • losses 常见的分割损失函数如Dice Loss,Tversky Loss等
  • metrics 常见的分割评价指标,比如dice分数,f1分数等
  • tools 模型转换工具,将输出的Keras模型转为caffe模型,再转到NCNN/TensorRT/OpenVINO等推理框架进行部署
  • data.py 加载1个batch的原始图片和分割标签图片
  • train.py 模型训练
  • test.py 模型测试
  • json_to_dataset.py 批量处理多张图片并一步建好所需目录及相关mask文件

已支持的分割模型

model_name Base Model Segmentation Model Params FLOPs Model Size Available
enet ENet Enet 371,558 759,829 1.4Mb True
fcn8 Vanilla CNN FCN8 3,609,196 7220708 29.0Mb True
unet Vanilla CNN UNet 7,167,618 14,344,197 57.6Mb True
attunet Vanilla CNN AttUNet 8,913,058 17,841,087 71.7Mb True
r2unet Vanilla CNN R2UNet 17,652,930 51,065,008 141.7Mb True
r2attunet Vanilla CNN R2AttUNet 16,958,530 46,532,640 136.2Mb True
unet++ Vanilla CNN NestedUNet 9,171,170 18,353,631 73.7Mb True
segnet Vanilla CNN SegNet 2,941,218 5,888,377 11.9Mb True
icnet Vanilla CNN ICNet 6,740,610 13,524,726 27.6Mb True
pspnet* Vanilla CNN PSPNet 964,226 8,894,120 3.9Mb True
mobilenet_unet MobileNet MobileNetUnet 407,778 825,856 1.9Mb True
mobilenet_fcn8 MobileNet MobileNetFCN8 3,432,764 6,880,358 14Mb False
seunet SENet SEUNet 1,964,530 3,932,843 8.2Mb True
scseunet SCSENet scSEUNet 1,959,266 3,923,359 8.1Mb True
vggunet VGGNet VGGUnet 25,884,170 51,789,952 103.8Mb True
unet_xception_resnetblock XceptionNet Unet_Xception_ResNetBlock 38,431,730 88,041,130 154.5Mb True
deeplab_v2 DeepLab DeepLabV2 37,799,752 75,574,697 151.3Mb True
hrnet HRNet HRNet 9524168 57,356,440 117.1Mb True

注:测试数据是基于输入图片大小为224x224的二分类模型。对于标*号的模型,图片大小为模型定义里支持的最小大小。

已支持的损失函数

Name (as argument) Type Available
ce Cross Entropy Yes
weighted_ce Weighted Categorical loss Yes
b_focal Binary Focal loss Yes
c_focal Categorical Focal loss Yes
dice Dice loss Yes
bce_dice BCE + Dice loss Yes
ce_dice CE + Dice loss Yes
g_dice Generalized Dice loss Yes
jaccard Jaccard loss Yes
bce_jaccard BCE + Jaccard loss Yes
ce_jaccard CE + Jaccard loss Yes
tversky Tversky loss Yes
f_tversky Focal Tversky loss Yes

注:weighted_ce 以及 c_focal 需要指定对应class的权重或者指定class数量。默认值为平分权重的二分类。

已支持的评价指标

Type Available
iou_score Yes
jaccard_score Yes
f1_score Yes
f2_score Yes
dice_score Yes

已支持训练可视化

为了更好的监督训练过程,我们已经提供了训练可视化,对损失函数,iou_score,dice_socoe,f1_score,f2_score等进行了可视化.在训练过程中会在模型保 存的文件夹下生成log文件夹,例如weights/unet/log,然后使用tensorboard --logdir=weights/unet/log,打开得到的网址即可获得可视化结果.

训练

使用下面的命令训练和保存模型,模型保存路径,训练超参数需要灵活设置。

export CUDA_VISIBLE_DEVICES=0,1 # 使用的GPU序号
python train.py ...

可用参数如下:

  • --exp_name 字符串,代表此次实验的名称,默认exp1
  • --dataset_name 字符串,代表选择对应的数据集的名称,默认bbufdataset,支持camvid
  • --loss 字符串,代表选择的损失函数的名称,默认ce,全部名称见支持的损失函数
  • --n_classes 整型,代表分割图像中有几种类别的像素,默认为2
  • --input_height整型,代表要分割的图像需要resize的长,默认为224
  • --input_width 整型,代表要分割的图像需要resize的宽,默认为224
  • --resize_op 整型,代表resize的方式,如果为1则为普通resize,如果为2,则为letterbox_resize,默认为1
  • --validate布尔型,代表训练过程中是否需要验证集,默认为True,即使用验证集。
  • --epochs整型,代表要训练多少个epoch,默认为50
  • --train_batch_size整型,代表训练时批量大小,默认为4
  • --val_batch_size整型,代表训练时批量大小,默认为4
  • --model_name 字符串类型,代表训练时使用哪个模型,支持enet,unet,segnet,fcn8等多种模型,默认为unet
  • --train_save_path字符串类型,代表训练时保存模型的路径,默认为weights/unet,即会将模型保存在weights文件夹下,并且每个模型名字前缀以unet开头,后面接迭代次数和准确率构成完整的保存模型的路径。
  • --resume字符串类型,代表继续训练的时候加载的模型路径,默认值为``,即从头训练。
  • --optimizer_name字符串类型,代表训练模型时候的优化方法,支持sgd,adam,adadelta等多种优化方式,默认为adadelta
  • --image_init字符串类型,代表输入图片初始化方式,支持sub_meansub_and_dividedivide,默认为divide
  • --multi_gpus 布尔类型,代表使用是否多卡进行训练,默认为Fasle,如果为True,需将gpu_count参数设置为使用的显卡数量
  • --gpu_count 整型,当multi_gpusTrue时代表使用的GPU数量。需要配合设置相应的环境变量CUDA_VISIBLE_DEVICES

训练示例

  • 训练本工程提供的二分类数据集:python train.py --dataset_name bbufdataset --model_name unet --input_height 224 --input_width 224 --image_init divide --n_classes 2
  • 训练CamVid数据集:python train.py --dataset_name camvid --model_name unet --input_height 720 --input_width 960 --image_init sub_mean --n_classes 32 --train_batch_size 2 --val_batch_size 2

测试

使用下面的命令测试模型,加载模型的路径,图像输入分辨率等参数需要灵活设置。

python test.py ...

可用参数如下:

  • --test_images字符串类型,代表测试图所在的文件夹路径,默认为data/test/
  • --output_path字符串类型,代表从测试图预测出的mask图输出路径,默认为data/output/
  • --model_name 字符串类型,代表测试时使用哪个模型,支持enet,unet,segnet,fcn8等多种模型,默认为unet
  • --weights_path字符串类型,代表预测时加载的模型权重,默认为weights/unet.18-0.856895.hdf5,即对应默认模型unet训练出来的模型权重路径。
  • --input_height整型,代表测试集输入到网络中需要被resize的长,默认为224
  • --input_width整型,代表测试集输入到网络中需要被resize的宽,默认为224
  • --resize_op 整型,代表resize的方式,如果为1则为普通resize,如果为2,则为letterbox_resize,默认为1
  • --classes整型,代表图片中的像素类别数,默认为2
  • --mIOU布尔型,代表是否启用评测mIOU,默认为False,一旦启用需要提供带有mask图的测试数据集。
  • --val_images字符串类型,代表启用mIOU后测试集原图的路径,默认为data/val_image/
  • --val_annotations字符串类型,代表启用mIOU后测试集mask图的路径,默认为data/val_label/
  • --image_init字符串类型,代表输入图片初始化方式,支持sub_meansub_and_dividedivide,默认为divide

测试示例

  • 测试二分类数据集:python test.py --model_name unet --weights_path weights/unet.xx.hdf5 --classes 2 --image_init divide
  • 测试CamVid数据集:python test.py --model_name unet --weights_path weights/unet.xx.hdf5 --classes 32 --image_init sub_mean --input_height 720 --input_width 960

数据增强

实现中...

数据集

数据集制作使用Labelme即可,然后将得到的json文件使用json_to_dataset.py转换为本工程要用的mask标签图,具体操作步骤为:

  • 使用本工程中的json_to_dataset.py替换掉labelme/cli中的相应文件—json_to_dataset.py 。在cmd中输入python json_to_dateset.py /path/你的json文件夹的路径。注意是把每张图的json文件都放在一个目录下,labelme标注出来的默认是一张图片一个文件夹。
  • 运行后,在json文件夹中会出现mask_png、labelme_json文件夹,mask_png中存放的是所有8位掩码文件!也即是本工程中使用的标签图。
  • 具体来说,我们的标签图就是分别指示每张图片上每一个位置的像素属于几,0是背景,然后你要的类别从1开始往后递增即可。
  • 本工程训练和测试的一个2类的简单分割数据集,下载地址为:https://pan.baidu.com/s/1sVjBfmgALVK7uEjeWgIMug
  • 本工程训练和测试的CamVid数据集,下载地址为:https://pan.baidu.com/s/1zequLd0aYXNseGoXn-tdog
  • 本工程训练和测试的一个包的数据集,下载地址为:https://pan.baidu.com/s/1iau4E0tjm6179z_XTSqExw,提取码:sg22

Model Zoo

已经训练好的Keras模型放在这个工程下,模型按照名字进行对应:

https://github.com/BBuf/Keras-Semantic-Segmentation-Model-Zoo

模型部署

首先将Keras模型转为Caffe模型,然后再转为NCNN/OpenVINO/TensorRT/M模型进行部署,已支持转换OP和网络如下。

已支持OP

  • InputLayer
  • Conv2D/Convolution2D
  • Conv2DTranspose
  • DepthwiseConv2D
  • SeparableConv2D
  • BatchNormalization
  • Dense
  • ReLU
  • ReLU6
  • LeakyReLU
  • SoftMax
  • SigMoid
  • Cropping2D
  • Concatenate
  • Merge
  • Add
  • Flatten
  • Reshape
  • MaxPooling2D
  • AveragePooling2D
  • Dropout
  • GlobalAveragePooling2D
  • UpSampling2D
  • ...

已支持网络

  • VGG16
  • SqueezeNet
  • InceptionV3
  • InceptionV4
  • Xception V1
  • UNet
  • ...

标准

个人制作2个类别小零件数据集分割结果

Resolution ResizeOp Epoch model_name Base Model Segmentation Model Acc iou_score dice_score f1_score f2_score
224x224 1 50 enet ENet Enet
224x224 1 50 fcn8 Vanilla CNN FCN8
224x224 1 50 unet Vanilla CNN UNet
224x224 1 50 attunet Vanilla CNN AttUNet
224x224 1 50 r2unet Vanilla CNN R2UNet
224x224 1 50 r2attunet Vanilla CNN R2AttUNet
224x224 1 50 unet++ Vanilla CNN NestedUNet
224x224 1 50 segnet Vanilla CNN SegNet
224x224 1 50 icnet Vanilla CNN ICNet
384x384 1 50 pspnet Vanilla CNN PSPNet
224x224 1 50 mobilenet_unet MobileNet MobileNetUnet
224x224 1 50 mobilenet_fcn8 MobileNet MobileNetFCN8
224x224 1 50 seunet SENet SEUNet
224x224 1 50 scseunet SCSENet scSEUNet
224x224 1 50 vggunet VGGNet VGGUnet
224x224 1 50 unet_xception_resnetblock XceptionNet Unet_Xception_ResNetBlock
320x320 1 50 deeplab_v2 DeepLab DeepLabV2
224x224 1 50 hrnet HRNet HRNet

CamVid分割数据集分割结果

Resolution ResizeOp Epoch model_name Base Model Segmentation Model Acc iou_score dice_score f1_score f2_score
960x704 1 50 enet ENet Enet
960x704 1 50 fcn8 Vanilla CNN FCN8
960x720 1 50 unet Vanilla CNN UNet 0.70 0.51 0.67 0.67
1 50 attunet Vanilla CNN AttUNet
1 50 r2unet Vanilla CNN R2UNet
1 50 r2attunet Vanilla CNN R2AttUNet
1 50 unet++ Vanilla CNN NestedUNet
1 50 segnet Vanilla CNN SegNet
1 50 icnet Vanilla CNN ICNet
1 50 pspnet Vanilla CNN PSPNet
1 50 mobilenet_unet MobileNet MobileNetUnet
1 50 mobilenet_fcn8 MobileNet MobileNetFCN8
1 50 seunet SENet SEUNet
1 50 scseunet SCSENet scSEUNet
1 50 vggunet VGGNet VGGUnet
1 50 unet_xception_resnetblock XceptionNet Unet_Xception_ResNetBlock
1 50 deeplab_v2 DeepLab DeepLabV2
1 50 hrnet HRNet HRNet

眼球血管分割数据集

  • 全部基于UNet进行测试,这个数据集是为了测试工程中支持的各种损失函数的效果。以下指标在测试集上报告。
Resolution ResizeOp Epoch Loss Name Acc iou_score dice_score f1_score f2_score
224x224 1 50 ce 0.9238 0.7817 0.8770 0.8770 0.8770
1 50 weighted_ce 0.9194 0.8329 0.9088 0.9088 0.9088
1 50 b_focal 0.9106 0.6103 0.7579 0.7579 0.7579
1 50 c_focal 0.9194 0.8301 0.9071 0.9071 0.9071
1 50 dice 0.9198 0.7429 0.8523 0.8523 0.8523
1 50 bce_dice 0.9307 0.7628 0.8653 0.8653 0.8653
1 50 ce_dice
1 50 g_dice
1 50 jaccard
1 50 bce_jaccard
1 50 ce_jaccard
1 50 tversky
1 50 f_tversky

个人制作2个类别小零件数据集分割可视化结果

Input Image Output Segmentation Image

CamVid数据集分割可视化结果

Input Image Output Segmentation Image

眼球病变数据集分割可视化结果

Input Image Output Segmentation Image

参考

微信公众号&交流群

  • QQ群号 1030186545
  • 加群密码 qqq

keras-semantic-segmentation's People

Contributors

bbuf avatar lkevinzc avatar maomaoinszdx avatar mard1no avatar msnh2012 avatar pprp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

keras-semantic-segmentation's Issues

几个问题

请问一下你的数据集是几分类的?有没有miou代码呢

PSPnet和FCN32运行出现问题

你好,
PSPnet运行错误提示:
def PSPNet(nClasses, optimizer=None, input_width=384, input_height=384):
assert input_height%192 == 0
assert input_width%192 == 0
AssertionError:
我的input_width=256
FCN32运行错误提示:
ValueError: Negative dimension size caused by subtracting 2 from 1 for 'block2_pool_6/MaxPool' (op: 'MaxPool') with input shapes: [?,1,128,128].
我的是tensorflow-gpu(1.4)+keras(2.3)
请问大神怎么调试,期望您的回复。

测试时出现问题

当我运行
python test.py 时出现错误:
Traceback (most recent call last):
File "test.py", line 10, in
File "/home/user/yzc/yanglin/Keras-Semantic-Segmentation-master/Models/FCN8.py", line 2, in
from keras.models import *
File "/home/user/anaconda3/envs/keras-seg/lib/python3.6/site-packages/keras/init.py", line 3, in
from . import utils
File "/home/user/anaconda3/envs/keras-seg/lib/python3.6/site-packages/keras/utils/init.py", line 6, in
from . import conv_utils
File "/home/user/anaconda3/envs/keras-seg/lib/python3.6/site-packages/keras/utils/conv_utils.py", line 9, in
from .. import backend as K
File "/home/user/anaconda3/envs/keras-seg/lib/python3.6/site-packages/keras/backend/init.py", line 87, in
from .tensorflow_backend import *
File "/home/user/anaconda3/envs/keras-seg/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 5, in
import tensorflow as tf
File "/home/user/anaconda3/envs/keras-seg/lib/python3.6/site-packages/tensorflow/init.py", line 24, in
from tensorflow.python import *
File "/home/user/anaconda3/envs/keras-seg/lib/python3.6/site-packages/tensorflow/python/init.py", line 63, in
from tensorflow.python.framework.framework_lib import *
File "/home/user/anaconda3/envs/keras-seg/lib/python3.6/site-packages/tensorflow/python/framework/framework_lib.py", line 102, in
from tensorflow.python.framework.importer import import_graph_def
File "/home/user/anaconda3/envs/keras-seg/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 30, in
from tensorflow.python.framework import function
File "/home/user/anaconda3/envs/keras-seg/lib/python3.6/site-packages/tensorflow/python/framework/function.py", line 36, in
from tensorflow.python.ops import array_ops
File "/home/user/anaconda3/envs/keras-seg/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 1974, in
@ops.RegisterGradient("FakeQuantWithMinMaxArgs")
File "/home/user/anaconda3/envs/keras-seg/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 2085, in call
_gradient_registry.register(f, self._op_type)
File "/home/user/anaconda3/envs/keras-seg/lib/python3.6/site-packages/tensorflow/python/framework/registry.py", line 67, in register
stack = traceback.extract_stack()
File "/home/user/anaconda3/envs/keras-seg/lib/python3.6/traceback.py", line 207, in extract_stack
stack = StackSummary.extract(walk_stack(f), limit=limit)
File "/home/user/anaconda3/envs/keras-seg/lib/python3.6/traceback.py", line 358, in extract
f.line
File "/home/user/anaconda3/envs/keras-seg/lib/python3.6/traceback.py", line 282, in line
self._line = linecache.getline(self.filename, self.lineno).strip()
File "/home/user/anaconda3/envs/keras-seg/lib/python3.6/linecache.py", line 16, in getline
lines = getlines(filename, module_globals)
File "/home/user/anaconda3/envs/keras-seg/lib/python3.6/linecache.py", line 47, in getlines
return updatecache(filename, module_globals)
File "/home/user/anaconda3/envs/keras-seg/lib/python3.6/linecache.py", line 137, in updatecache
lines = fp.readlines()
File "/home/user/anaconda3/envs/keras-seg/lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 2817-2818: invalid continuation byte

请问这个该如何解决?

数据增强

我试了一下数据增强,增强的mask是24位的,训练需要8位的mask,需要统一转化为8位的mask吗?

[IMPORTANT] No licence!

Your repository does not have a licence. While the models implemented here look very cool, by default they are under exclusive copyright, meaning nobody is legally allowed to use them!

See https://choosealicense.com/ for advice on this.

ICNet

isn't this implementation of ICNet missing the Cascade Label Guidance? (section 3.4 in the paper)

also i can't see the weighted softmax cross entropy loss which should be applied to each branch (see definition 2 in the paper)

pls correct me if I'm wrong.

try to modify segnet but errors occur

I was trying to build a new model by modifying your code(segnet), but it went wrong.
And my problem is here, I don't know why. Could you please give me some advice?
Thanks in advance.

data.py数据生成器

你好,你这个数据生成器是不是没有打乱数据啊,这样的话所有epoch里对应batch中的数据是一样的吧

训练自己的数据出错

您好,感谢您的开源。使用您自带的数据集训练,没有错误。使用我自己的数据训练,出现以下错误,ValueError: Error when checking input: expected input_1 to have 4 dimensions, but got array with shape (2, 1),我的样本数据height width是不固定的,这个有影响吗,谢谢。两类,一类是物体,另一类是背景。

训练时出现“StopIteration”错误

当我运行这句话时,出现了问题
python train.py --save_weights_path="/media/yl/4T_Data/Keras-Semantic-Segmentation-master/weights/fcn8"
--train_images="/media/yl/4T_Data/data/group2/scene2/composite"
--train_annotations="/media/yl/4T_Data/data/group2/scene2/mask"
--val_images="/media/yl/4T_Data/data/group2/scene2/composite2"
--val_annotations="/media/yl/4T_Data/data/group2/scene2/mask2"
--n_classes=8 --input_height=512 --input_width=512 --model_name="fcn8"

报错如下:
/home/yl/anaconda3/envs/keras-seg/lib/python3.6/site-packages/h5py/init.py:34: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
Using TensorFlow backend.
/home/yl/anaconda3/envs/keras-seg/lib/python3.6/importlib/_bootstrap.py:205: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
return f(*args, **kwds)
Model output shape : (None, 270400, 8)
Epoch 1/1
Traceback (most recent call last):
File "train.py", line 116, in
m.fit_generator(G, 100, validation_data=G2, validation_steps=20, epochs=1)
File "/home/yl/anaconda3/envs/keras-seg/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "/home/yl/anaconda3/envs/keras-seg/lib/python3.6/site-packages/keras/engine/training.py", line 1426, in fit_generator
initial_epoch=initial_epoch)
File "/home/yl/anaconda3/envs/keras-seg/lib/python3.6/site-packages/keras/engine/training_generator.py", line 155, in fit_generator
generator_output = next(output_generator)
File "/home/yl/anaconda3/envs/keras-seg/lib/python3.6/site-packages/keras/utils/data_utils.py", line 785, in get
raise StopIteration()
StopIteration

这个具体是哪有问题,您能解答一下吗

ICNet訓練後結果詢問

您好,非常感激您的開源分享,你的Github程式非常實用! 還在學習中。
想問我製作自己的數據集(640x480圖片),訓練ICNet模型,但執行test.py分割出來的結果"顆粒感很重",是正常的嗎?
(數據有一張原圖,對應一張黑色的標籤圖(像素0,1,2,3...)存放)

0
看到這裡的輸出resize是120x160,這個能改大嗎?

o_shape = Model(inputs, o).output_shape
outputHeight = o_shape[1] #輸出120
outputWidth = o_shape[2]  #輸出160
print("o_shape=",o_shape[1])
print("o_shape=",o_shape[2])

train.py文件总是很多bug

train.py文件在服务器上跑不知道为啥总是很多bug,请问需要修改哪些地方,用的是您提供的公共数据集,万分感谢您!

issue in segnet

The ''upsamping'' scheme adopted in segnet is UnPooling but not just UpSampling. You can see the different between them.
image

灰度图片怎么处理?

你好,这个项目非常有用,非常好用。
非常感谢分享,

如果我想训练灰度图像,该修改哪些地方?

unet代码

outputHeight = Model(inputs, o).output_shape[1]
outputWidth = Model(inputs, o).output_shape[2]
o = (Reshape((outputHeight*outputWidth, nClasses)))(o)

你好,unet代码最后这三句代码是什么意思?
outputHeight和outputWidth不都是112么,这样子出来的图是不是比原图小一半

Error using PSPNet_ResNet50

Hi, I'm using PSPNet_ResNet50 model but I got the following error:

ValueError: Negative dimension size caused by subtracting 60 from 28 for 'ave_c1_2/AvgPool' (op: 'AvgPool') with input shapes: [?,28,28,2048].

I appreciate any recommendation.

Best regards!

Inference speed

Hi @BBuf ,
According to the paper said, it ran 14.6 fps on 640 x 360
but as for your dataset which is 3 fps(0.55) on 512 x 512

The fps seems a bit slowly compare to the paper,
how do you think about that?

Again, thanks for your sharing and appreciate for any replies!

SegNet模型

这不是真正意义上的SegNet吧,因为保存最大index的那一步好像直接忽略了,直接就是将Unet中Ski-connnection去掉之后的网络吧,应该没看错吧??/

网络

哇 大神这个代码是不是还能跑icnet模型,我看你有写,速度如何呢

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.