Giter Club home page Giter Club logo

Comments (12)

sacmehta avatar sacmehta commented on August 23, 2024

Please use Cityscapes code to convert the labels

from espnetv2.

TianDe11 avatar TianDe11 commented on August 23, 2024

ok...

from espnetv2.

TianDe11 avatar TianDe11 commented on August 23, 2024

I now use s=0.5, and 9 classes, total 44000 images,The sky and building result is very good, but the person classes result is so terrible that cannot recognize sometimes, Could you give me some advice?

from espnetv2.

sacmehta avatar sacmehta commented on August 23, 2024

How long did you train? Make sure your labels are correct

from espnetv2.

TianDe11 avatar TianDe11 commented on August 23, 2024

About less than 1 hour a epoch, I trained 50 epoches, Label is checked repeatly.
I find when s=1.5, person is recognized in first few epoch, but s = 0.5, it is occured in about 20-30 epoch and other classes perform worse than person not be found.
Now, It is a little embarrassed that when other classes performs nice, people cannot be splited;
when people could, other classes looks not very satisfying...
the mIou is 40% level.

from espnetv2.

sacmehta avatar sacmehta commented on August 23, 2024

Is your dataset balanced?

from espnetv2.

TianDe11 avatar TianDe11 commented on August 23, 2024

the number of person is fewer, and I think the aera of the sky and building is much more bigger than person, but I 'm confused how to solve it, If you add extra augmentation to person images, other classes are also become more

from espnetv2.

sacmehta avatar sacmehta commented on August 23, 2024

You can compute class-wise weights and pass it to loss function.

Let us assume that you have 2 classes whose area distribution in the dataset is 1000 and 50. Obviously, class 1 has more area and network will be biased towards this class. You can take inverse of these areas now to compute class-wise weights. Now you will have a weight vector with 0.001 and 0.02 as values. When you pass this vector to loss function, class with low pixel area is panelized more.

from espnetv2.

TianDe11 avatar TianDe11 commented on August 23, 2024

ok,thanks for your idea.

from espnetv2.

TianDe11 avatar TianDe11 commented on August 23, 2024

Hi, I find there are pretrained models for segmentation, but got state_dict key errors when load.

Unexpected key(s) in state_dict: "module.net.level1.conv.weight", "module.net.level1.bn.weight", "module.net.level1.bn.bias" ......"module.level5.4.bn.weight", "module.level5.4.act.weight"
Missing key(s) in state_dict: "module.level1.conv.weight", "module.level1.bn.running_var", "module.level1.bn.running_mean", "module.level1.bn.bias"......"module.project_l2.act.weight", "module.project_l1.1.conv.weight"
Is there something wrong?

from espnetv2.

sacmehta avatar sacmehta commented on August 23, 2024

You need to first wrap the model inside the DataParallel wrapper and then load the weights, something like this:

model = net.EESPNet_Seg(20, s=1.0)
model = nn.DataParallel(model)
model.load_state_dict(torch.load('../pretrained/espnet.pth'))

from espnetv2.

TianDe11 avatar TianDe11 commented on August 23, 2024

that's right, thank you

from espnetv2.

Related Issues (20)

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.