Comments (8)
一般来说是因为人工标注的mask中存在比网络输出的类别数 (configs中的nclass
)更大的类别(准确来说是大于或等于)。比如如果你的nclass
设置的是21,但是mask中存在25这样的类别index,那就会报这样的错,需要检查一下mask。
from unimatch.
感谢您的回复,我的mask做灰度图读入后应该只有背景和血管两个类,好奇怪
from unimatch.
可以print(torch.unique(mask))
确认一下是否只有0和1。
from unimatch.
非常感谢您的回复
改了半天发现是我mask在transform.resize后改了像素值,原来取值只有0,255(黑色和白色)的像素变了,改完后现在输出的print(`torch.unique(torch.from_numpy(mask).long()))
结果是tensor([ 0, 255])
(不是0,1会影响吗) ,然后我修改了nclass
为2然后还是报错
from unimatch.
需要将255的像素改成1才行
from unimatch.
您好 感谢您的回复,将255的像素改为1之后确实成功开始了训练。 我在用得到的模型进行test时候,发现得到的output是两通道的(torch.size[1,2,480,480]),请问这样是否正常?
from unimatch.
对的
from unimatch.
您好,我在对预测的图像尝试转换为正常模型时,
发现argmax后的tensor全部为1,
发现是因为两个通道总是有一个通道的像素比另外一个的大,后来放弃使用argmax而是直接将两个通道的值相加后*255,发现出来的结果基本能还原轮廓但是很奇怪,请问您有试过将预测的结果转换成图像吗?有遇到类似问题吗
from unimatch.
Related Issues (20)
- 关于医学图像分割场景下的结果 HOT 4
- Image-level Perturbations in LEVIR HOT 1
- Pascal Voc 数据集的checkpoint HOT 19
- 关于特征空间扰动 HOT 4
- 关于第四页的Algorithm 1 HOT 2
- Question about the batch size
- Reproducability of PASCAL VOC HQ dataset results HOT 4
- 关于在Transformer系列模型使用 HOT 2
- Can't find Resnet 101
- How much memory its necessary? HOT 1
- 轻量级backbone及训练问题 HOT 1
- Question about crop size HOT 2
- 关于sliding_window HOT 1
- 复现训练代码
- 256×256的分辨率需要多少的GPU运行内存 HOT 1
- 评估和可视化代码 HOT 2
- Question about the evaluation time HOT 2
- 关于分布式训练的问题 HOT 1
- 关于split的问题 HOT 1
- 关于您该项目的实验 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unimatch.