项目场景:

MMSegmentation 是一个基于 PyTorch 的开源语义分割工具箱。它是 OpenMMLab 项目的一部分。

主分支与PyTorch 1.5+一起使用。


源码下载

训练源码地址:训练源码下载点这里
预处理脚本地址:cityscapesscripts
数据集下载:各大数据集,链接内有cityscape数据集,需有教育邮箱注册下载

安装

请参考get_started.md进行安装和dataset_prepare.md进行数据集准备。

问题描述

1.导入各类包的问题

mmcv说明文件有步骤;有个比较容易出错的就是脚本文件中导入包from要从给定的文件目录里导入,如下图

2.图片格式转换(预处理)问题

在进行图片格式转换时,需先将数据集(gtFine、gtCoarse、leftImg8bit)与cityscapesscripts放至同一级目录下,否则会报错。如下:

目录放好后,仅需要根据个人更改两个文件:
在lable.py里,可以将自己不感兴趣的trainId设为255,ignoreInEval设为True即可更改分类的数量:

labels = [
#       name                     id    trainId   category            catId     hasInstances   ignoreInEval   color
Label(  'unlabeled'            ,  0 ,      255 , 'void'            , 0       , False        , True         , (  0,  0,  0) ),
Label(  'ego vehicle'          ,  1 ,      255 , 'void'            , 0       , False        , True         , (  0,  0,  0) ),
Label(  'rectification border' ,  2 ,      255 , 'void'            , 0       , False        , True         , (  0,  0,  0) ),
Label(  'out of roi'           ,  3 ,      255 , 'void'            , 0       , False        , True         , (  0,  0,  0) ),
Label(  'static'               ,  4 ,      255 , 'void'            , 0       , False        , True         , (  0,  0,  0) ),
Label(  'dynamic'              ,  5 ,      255 , 'void'            , 0       , False        , True         , (111, 74,  0) ),
Label(  'ground'               ,  6 ,      255 , 'void'            , 0       , False        , True         , ( 81,  0, 81) ),
Label(  'road'                 ,  7 ,        0 , 'flat'            , 1       , False        , False        , (128, 64,128) ),
Label(  'sidewalk'             ,  8 ,        1 , 'flat'            , 1       , False        , False        , (244, 35,232) ),
Label(  'parking'              ,  9 ,      255 , 'flat'            , 1       , False        , True         , (250,170,160) ),
Label(  'rail track'           , 10 ,      255 , 'flat'            , 1       , False        , True         , (230,150,140) ),
Label(  'building'             , 11 ,        2 , 'construction'    , 2       , False        , False        , ( 70, 70, 70) ),
Label(  'wall'                 , 12 ,        3 , 'construction'    , 2       , False        , False        , (102,102,156) ),
Label(  'fence'                , 13 ,        4 , 'construction'    , 2       , False        , False        , (190,153,153) ),
Label(  'guard rail'           , 14 ,      255 , 'construction'    , 2       , False        , True         , (180,165,180) ),
Label(  'bridge'               , 15 ,      255 , 'construction'    , 2       , False        , True         , (150,100,100) ),
Label(  'tunnel'               , 16 ,      255 , 'construction'    , 2       , False        , True         , (150,120, 90) ),
Label(  'pole'                 , 17 ,        5 , 'object'          , 3       , False        , False        , (153,153,153) ),
Label(  'polegroup'            , 18 ,      255 , 'object'          , 3       , False        , True         , (153,153,153) ),
Label(  'traffic light'        , 19 ,        6 , 'object'          , 3       , False        , False        , (250,170, 30) ),
Label(  'traffic sign'         , 20 ,        7 , 'object'          , 3       , False        , False        , (220,220,  0) ),
Label(  'vegetation'           , 21 ,        8 , 'nature'          , 4       , False        , False        , (107,142, 35) ),
Label(  'terrain'              , 22 ,        9 , 'nature'          , 4       , False        , False        , (152,251,152) ),
Label(  'sky'                  , 23 ,       10 , 'sky'             , 5       , False        , False        , ( 70,130,180) ),
Label(  'person'               , 24 ,       11 , 'human'           , 6       , True         , False        , (220, 20, 60) ),
Label(  'rider'                , 25 ,       12 , 'human'           , 6       , True         , False        , (255,  0,  0) ),
Label(  'car'                  , 26 ,       13 , 'vehicle'         , 7       , True         , False        , (  0,  0,142) ),
Label(  'truck'                , 27 ,       14 , 'vehicle'         , 7       , True         , False        , (  0,  0, 70) ),
Label(  'bus'                  , 28 ,       15 , 'vehicle'         , 7       , True         , False        , (  0, 60,100) ),
Label(  'caravan'              , 29 ,      255 , 'vehicle'         , 7       , True         , True         , (  0,  0, 90) ),
Label(  'trailer'              , 30 ,      255 , 'vehicle'         , 7       , True         , True         , (  0,  0,110) ),
Label(  'train'                , 31 ,       16 , 'vehicle'         , 7       , True         , False        , (  0, 80,100) ),
Label(  'motorcycle'           , 32 ,       17 , 'vehicle'         , 7       , True         , False        , (  0,  0,230) ),
Label(  'bicycle'              , 33 ,       18 , 'vehicle'         , 7       , True         , False        , (119, 11, 32) ),
Label(  'license plate'        , -1 ,       -1 , 'vehicle'         , 7       , False        , True         , (  0,  0,142) ),

]
`
在createTrainIdLabelImgs.py中,将cityscapesPath设为该文件的上两级目录,如D:**\cityscapesscripts-master

3.error: unrecognized arguments:

在右上角点击edit configuration里面填写了parameters,但是在代码里把这个参数注释掉后就会无法识别。

总结

目前整理到的就这些,有什么疑问可以评论区互相探讨,一起进步呀!

附宝藏up主git网址:GitHub

cityscape 数据集 mmsegmentation训练记录相关推荐

  1. mmsegmentation 训练自制数据集全过程

    1.简介 mmsegmentation是目前比较全面和好用的用于分割模型的平台,原始的github链接 https://github.com/open-mmlab/mmsegmentation 2.G ...

  2. TF之TFSlim:利用经典VGG16模型(InceptionV3)在ImageNet数据集基础上训练自己的五个图像类别数据集的训练过程记录

    TF之TFSlim:利用经典VGG16模型(InceptionV3)在ImageNet数据集基础上训练自己的五个图像类别数据集的训练过程记录 目录 训练控制台显示 输出结果文件 训练控制台显示 输出结 ...

  3. mmsegmentation 训练自己的数据集

    open-mmlab有许多非常实用的框架,其中目标检测的话mmdetection确实很实用.但语义分割的话当属mmsegmentation,这篇博客就是介绍如何用mmsegmentation训练自己的 ...

  4. MMSegmentation训练自己的分割数据集

    首先确保在服务器上正常安装了MMSeg,注意安装完还需建立与自己的数据集之间的软连接,官方安装教程如下: https://github.com/open-mmlab/mmsegmentation/bl ...

  5. yolov3 训练及数据集准备【记录】

    ------------------------------ 本文仅供学习交流,如有错误,望交流指教 ------------------------------ yolov3 训练及数据集准备[记录 ...

  6. 在自己的数据集上训练CrowdDet过程记录

    论文链接:https://readpaper.com/pdf-annotate/note?noteId=656650387498369024&pdfId=542662939605901312 ...

  7. FCN制作自己的数据集、训练和测试 caffe

    原文:http://blog.csdn.net/zoro_lov3/article/details/74550735 FCN制作自己的数据集.训练和测试全流程 花了两三周的时间,在导师的催促下,把FC ...

  8. DL之DNN:自定义2层神经网络TwoLayerNet模型(封装为层级结构)利用MNIST数据集进行训练、GC对比

    DL之DNN:自定义2层神经网络TwoLayerNet模型(封装为层级结构)利用MNIST数据集进行训练.GC对比 导读           神经网络算法封装为层级结构的作用.在神经网络算法中,通过将 ...

  9. 在MNIST数据集上训练一个手写数字识别模型

    使用Pytorch在MNIST数据集上训练一个手写数字识别模型, 代码和参数文件 可下载 1.1 数据下载 import torchvision as tvtraining_sets = tv.dat ...

  10. ubuntu 从刷机到yolov5环境搭建训练记录

    ubuntu 从刷机到yolov5环境搭建训练记录 这两天需要一个模型检测一些摄像头内容,使用yolov5训练了一个模型,记录一下. 1. 刷机 具体步骤不描述,网上很多. 刷机时遇到一个问题,原有系 ...

最新文章

  1. Laravel 速记表
  2. 远程控制-Farfli远控木马
  3. zoj3869 Ace of Aces zoj3880 Demacia of the Ancients(水)
  4. 在CAD中求出多条线段的线段总和
  5. jquery获取地址栏参数
  6. 【整理】CRISPR-Cas9用于病毒性传染病防控的最新进展
  7. Linux CPU使用率超过100%的原因
  8. 第九次java课堂笔记
  9. 2021年保育员(中级)考试及保育员(中级)考试总结
  10. 没考计算机水平怎么填6,“计算机水平”怎么填,没曾考级,只参加过大 – 手机爱问...
  11. 冯诺依曼计算机体系结构
  12. Linux 下各文件夹的结构说明及用途介绍
  13. 连夜看了30多篇改进YOLO的中文核心期刊 我似乎发现了一个能发论文的规律
  14. 具有实践精神的理论家;我们时代的达芬奇------高德纳访谈录
  15. Python使用LMDB(闪电内存映射数据库)
  16. 好消息与坏消息应该怎么说
  17. 没有模拟器是JavaScript做不到的~
  18. 楚留香服务器最多人,楚留香:你可能没想到,你所在服务器的背后还有这样的故事!...
  19. 如何使用Linux云服务器搭建Magento电子商务网站
  20. 天津大学质量管理与质量保证答案

热门文章

  1. excel单元格内容拆分_Excel技巧:帮你把单元格内容颠倒顺序显示
  2. 如何卸载CAD?怎么把CAD彻底卸载干净重新安装的方法
  3. 【深度理解】如何评价GAN网络的好坏?IS(inception score)和FID(Fréchet Inception Distance)
  4. Android设备上px(像素)、dpi(像素密度)、dip(密度无关像素)之间的关系
  5. DDR3各个频率详解
  6. 《数据库原理与应用》作业(1-0.5)
  7. JQUERY冻结table行或列js
  8. oracle的imp导入数据,初识oracle-imp导入
  9. 转录组测序之各类样品如何取样保存
  10. 使用Chrome inspect进行夜神模拟器里app的调试