Giter Club home page Giter Club logo

semantic-segmentation's Introduction

Semantic-segmentation

这个repo适合新手入门pytorch和图像分割

一个采用Pytorch的语义分割项目

这个repo是在遥感图像语义分割项目时写的,但数据集不是我们遥感项目的数据集,而是网上download的一个遥感数据集。

实验结果

我的环境

  • windows10
  • Anaconda 3
  • pytorch 1.0
  • tensorflow tensorboard tensorboardX (用于可视化)

如何运行

所有的相对路径均在代码中配置

  • 打开终端,输入
python train_Seg.py
  • 调用Segnet
  • 或者
python train_U.py
  • 调用Unet
  • 或者
python predict.py
  • 进行推断inference(需要有已经训练好的模型才可以推断)

包含文件

train_Seg.py

  • 调用Segnet进行训练网络
  • 主函数

train_Unet.py

  • 调用Unet进行训练网络
  • 主函数

predict.py

  • 对模型进行inference预测

models/seg_net.py

  • Segnet网络定义

models/u_net.py

  • Unet网络定义

utils/DataArgument.py

  • 数据预处理文件,对数据切割,旋转加噪顺便做数据增强

数据集

数据集下载

https://www.cs.toronto.edu/~vmnih/data/

数据集处理

进入utils文件夹,使用下面语句(相对路径要提前配置好)

python DataArgument.py

DataArgument.py实现了对大图进行切割(成256 x 256),切割后旋转,加噪声等操作来生成训练数据。

已处理好的数据集下载

百度网盘 提取码:5b1v
下载后解压至 ./data/train/label 和 ./data/train/src

联系我

代码运行过程中有任何问题,都可随时联系我(for free and feel free to contact me please),可以在issue中提问,我也会尽快回答。

semantic-segmentation's People

Contributors

fuweifu-vtoo avatar

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.