Git Product home page Git Product logo

Comments (8)

guwen007 avatar guwen007 commented on August 15, 2024

I have the same problem too, looking forward to the author's answer

from contrastiveseg.

wingkeihon avatar wingkeihon commented on August 15, 2024

@hhxzzy I'm sorry to bother you.I added the contrast loss function to my model and code, and this problem also occurred.Has your problem been solved?

from contrastiveseg.

hhxzzy avatar hhxzzy commented on August 15, 2024

@hhxzzy I'm sorry to bother you.I added the contrast loss function to my model and code, and this problem also occurred.Has your problem been solved?

Hello. I try to make some change to the code, but the contrastive loss is still not going to drop much. But it seems that adding the contrastive can help improve the mIOU on Cityscapes by about 1%. Maybe it is the nature of contrastive loss that it doesn't drop much.
By the way, do you use warmup_iter in your code. I found that using a warm up strategy can be helpful. The author use this strategy in his code but not metion it in the paper.

from contrastiveseg.

wingkeihon avatar wingkeihon commented on August 15, 2024

from contrastiveseg.

tfzhou avatar tfzhou commented on August 15, 2024

@hhxzzy @guwen007 @wingkeihon Thanks for your interests. The contrastive loss is indeed more difficult to optimize than the CE loss. But it will still help to learn a better embedding space, which will benefit segmentation. So I will suggest to see whether the final segmentation performance is improved.

from contrastiveseg.

Pantherk1 avatar Pantherk1 commented on August 15, 2024

@tfzhou @hhxzzy @wingkeihon @guwen007
I am a novice postgraduate, and my coding ability is not high. I want to use ContrastiveSeg method on my own two-class segmentation model. Which py files should I read or what should I pay attention to?
Looking forward to your answer, thank you very much.

from contrastiveseg.

hhxzzy avatar hhxzzy commented on August 15, 2024

@tfzhou @hhxzzy @wingkeihon @guwen007 I am a novice postgraduate, and my coding ability is not high. I want to use ContrastiveSeg method on my own two-class segmentation model. Which py files should I read or what should I pay attention to? Looking forward to your answer, thank you very much.

If you want to run the author's scripts directly, you can take configs/cityscapes/H_48_D_4.json as an example. You need to change "data" and "loss“/"params"/"ce_weight" according to your dataset.
If you wanna use contrastive loss on your own code instead of running the author's scripts, you should look at lib/loss/loss_contrast.py and lib/loss/loss_contrast_mem.py to read the implement of contrastive loss.

from contrastiveseg.

Pantherk1 avatar Pantherk1 commented on August 15, 2024

@tfzhou @hhxzzy @wingkeihon @guwen007 I am a novice postgraduate, and my coding ability is not high. I want to use ContrastiveSeg method on my own two-class segmentation model. Which py files should I read or what should I pay attention to? Looking forward to your answer, thank you very much.

If you want to run the author's scripts directly, you can take configs/cityscapes/H_48_D_4.json as an example. You need to change "data" and "loss“/"params"/"ce_weight" according to your dataset. If you wanna use contrastive loss on your own code instead of running the author's scripts, you should look at lib/loss/loss_contrast.py and lib/loss/loss_contrast_mem.py to read the implement of contrastive loss.

Thank you for your prompt attention.

from contrastiveseg.

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.