Git Product home page Git Product logo

danet-keras's Introduction

DANet-keras

原文地址:Dual Attention Network for Scene Segmentation

论文阅读笔记

源代码pytorch:https://github.com/junfu1115/DANet/

代码组织形式

  • train.ipynb:模型训练,包含超参设置、模型调用、训练、可视化。
  • test_crop_image.py:模型测试,包含模型加载、测试、可视化。
  • dataloaders/generater.py:数据加载,数据路径获取、图片读取、预处理及在线扩充。
  • model/danet_resnet101:模型定义。
  • layers/attention:PAM空间注意力和CAM通道注意力模块搭建。
  • utils/loss.py:损失函数,包含dice_loss、ce_dice_loss、jaccard_loss(IoU loss)、ce_jaccard_loss、tversky_loss、focal_loss
  • utils/metrics.py:评价指标,包含precision、recall、accuracy、iou、f1等。
  • train.html:训练过程记录,保存为html文件。

danet-keras's People

Contributors

niecongchong 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

Watchers

 avatar  avatar  avatar  avatar  avatar

danet-keras's Issues

Unet or Danet

Hello, this doesn't seem to be the structure of the DANet model, is it the Unet model with the attention mechanism added

PAM层中卷积层参数是否可以训练?

image
我将DA模块插入自己的网络中,效果好像没有提升。

但是我发现将PAM层插入自己的网络中,发现网络的可训练参数量只增加了1,这个1应该是gamma。PAM中的卷积层中的参数好像是不可训练的。这可能是个问题

DANet 训练出错

你好,我把train.ipynb文件转成.py文件后,参数BatchSize = 8 NumChannels = 3 ImgHeight = 256 ImgWidth = 256 NumClass = 1其中修改处为图片尺寸256,BatchSize8。运行出现错误InvalidArgumentError: Incompatible shapes: [8,256,256,1] vs. [8,256,256,1,3],[[Node: metrics/iou/sub_1 = Sub[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](Classification/Sigmoid, metrics/iou/Round_2)]]. 请问您有遇到过此情况吗?(刚接触深度学习,很多地方不懂,网上未找到相似问题,不得已问您,求赐教)

环境配置

大神你好,请问你用的keras,tensorflow都是什么版本?我用tensorflow1.15.0 keras2.2.4出错了,谢谢!
ValueError: Tensor-typed variable initializers must either be wrapped in an init_scope or callable (e.g., tf.Variable(lambda : tf.truncated_normal([10, 40]))) when building functions. Please file a feature request if this restriction inconveniences you.

插入自己网络出错

你好,我把PAM模块插入我自己的网络会出错,提示缩进错误,但是我的缩进没有问题,你知道这怎么解决吗

分割交流

你好,目前好像遇到相似的问题,在unet-resnet等模型上效果都是不好,val_acc上身一点就不再变化,方便交流下有尝试其他网络效果不错的,除了fcn8

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.