Coder Social home page Coder Social logo

Comments (7)

FJR-Nancy avatar FJR-Nancy commented on June 14, 2024 2

@Gaoyiminggithub Yes, I have tried, before which I removed “size_average=False” in cross_entropy2d(). Because the loss value is high since the "size_average" is set to False while computing the loss. You can set it to True or just remove it -- which will use “elementwise_mean” by default in PyTorch. Then you could increase the initial learning rate accordingly, maybe 0.007, which is the same as the paper. I got 66.191% after doing this compared to 65.958%.

from pytorch-deeplab-xception.

jfzhang95 avatar jfzhang95 commented on June 14, 2024

Yes you're right, label == 255 should be ignored when computing IoU and Loss.
I set label == 255 to 0 because I think these areas are also background.
You can skip it if you want~

from pytorch-deeplab-xception.

FJR-Nancy avatar FJR-Nancy commented on June 14, 2024

Label == 255 could not be simply seen as background, because it will influence the results when computing IoU and Loss. The locations with gt label == 255 should be ignored, but after being set to 0, they are not ignored but considered while computing background IoU and loss. I tried to remove this code, and got mIoU on val from 66.191% to 66.753%.

from pytorch-deeplab-xception.

jfzhang95 avatar jfzhang95 commented on June 14, 2024

@FJR-Nancy I know set label == 255 to 0 will effect the results. But I did not know whether the influence is good or not when set boundary areas (label == 255) to background. Thank you for your reports. I will remove this line in the code.

from pytorch-deeplab-xception.

FJR-Nancy avatar FJR-Nancy commented on June 14, 2024

By the way, the transform has another problem that the random scaling does not really work. In RandomSized(), the image and label are resized to a random scale, however, in Scale() and RandomCrop(), they are resized back to the needed size. Here, RandomCrop() does not really work, either, because before crop(), image and label have been resized to the needed size already.
If you look at the official code of DeepLab v3+ in TensorFlow https://github.com/tensorflow/models/blob/master/research/deeplab/input_preprocess.py , you will see Pad() and RandomCrop() are needed to support RandomScale().

from pytorch-deeplab-xception.

jfzhang95 avatar jfzhang95 commented on June 14, 2024

OK, I will look at it closely. Thank you for pointing this out.

from pytorch-deeplab-xception.

Gaoyiminggithub avatar Gaoyiminggithub commented on June 14, 2024

@FJR-Nancy Hi, have you tried other learning rate, such as 0.007 ? When i tried other larger learning rate, the miou is worse than the lr set to 1e-7. Do you know why...

from pytorch-deeplab-xception.

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.