【语义分割】使用DAFormer测试自己的数据集
2024-10-20 13:53:44
DAFormer: https://github.com/lhoyer/DAFormer
window运行shell命令: 使用git bash
pip 安装包超时: pip --default-timeout=100 install -i https://pypi.douban.com/simple xxxx
问题:
问题1:ModuleNotFoundError: No module named mcvv.parallel
mcvv-full 版本不匹配,作者提供的环境是linux上的,需要在win上适配的版本
问题2:mmseg - INFO - Loaded 0 images
- check your path to your images and annotations in your config file
- check which dataset type you are using, and go to mmseg/datasets/[dataset].py and check the requirement of the corresponding dataset type. You should check the format of image and annotation and its suffix.
修改图片读取中image和label的文件名后缀:
点击查看代码
def __init__(self,
img_suffix='.png',
seg_map_suffix='_train_color.png',
**kwargs):
问题3:evaluate时File "c:\codeDAFormer-master mmseg coreevaluation metrics.py", line 83, in intersect_and_unionpred Tabe7 = pred Tabe7[mask] IndexError: too many indices for tensor of dimension 2
此时预测输出的结果是正常的,打印发现predicted_label是2维tensor,gt_label是3维的。学姐给提示看‘trainid和颜色的对应关系’,顺藤摸瓜,发现是label读错了。
cityscapes有trainid
和color
两种label,代码需要读入的是trainid
,因此还是修改问题2的部分,如下:
最新文章
- Asp.net MVC过滤器的使用
- 用AutoCompleteTextView实现历史记录提示
- Intent用法简介
- javascript 金额格式化
- BootStrap简介及应用要点
- 百度地图 Android SDK - 个性化地图
- w5cValidator【AngularJS】 2.0 版本发布
- 运动检测(前景检测)之(二)混合高斯模型GMM
- Maven搭建springMVC+spring+hibernate环境
- iOS获取设备唯一标识的各种方法?IDFA、IDFV、UDID分别是什么含义?
- WPF DataGrid Custommization using Style and Template
- 用JavaScript实现动态省市县三级联动
- nginx正向代理和反正代理区别
- Java 继承中构造方法的执行顺序问题
- Mac下Homebrew的安装与使用
- spark的shuffle机制
- C# 泛型类在使用中约束
- css3选择符
- jquery单选框radio绑定click事件实现和是否选中的方法
- 【文档】二、Binlog结构和内容概述
热门文章
- What's new in Dubbo 3.1.4 and 3.2.0-beta.3
- python画社交网络图
- (二)elasticsearch 源码目录
- App几个可能造成内存泄漏的情况:
- NG-ZORRO + Angular11使用Echarts实现柱折线图-折柱混合,并给图表添加点击打印图表数据!!!详细代码
- Array.from() ------来自❀ 前端宇宙 ❀公众号。
- three.js一步一步来--如何画出一根线
- 初探富文本之OT协同实例
- 【推荐】MySQL数据库设计SQL规范
- 文盘Rust -- 给程序加个日志