Giter Site home page Giter Site logo

about the weight class training about erfnet HOT 5 CLOSED

eromera avatar eromera commented on July 26, 2024
about the weight class training

from erfnet.

Comments (5)

Eromera avatar Eromera commented on July 26, 2024 2

Hi! What do you mean the distribution is too large? If you mean that the values are higher than 1, that is ok, the softmax will squash all values to probabilities-range anyway.

Are you training encoder or the full network (decoder mode)?

For this 7% drop did you do any modification to the network or is it only changing the weights?

You can try the ones that are uploaded in the my erfnet_pytorch code (here):

if (enc):  #encoder
    weight[0] = 2.3653597831726	
    weight[1] = 4.4237880706787	
    weight[2] = 2.9691488742828	
    weight[3] = 5.3442072868347	
    weight[4] = 5.2983593940735	
    weight[5] = 5.2275490760803	
    weight[6] = 5.4394111633301	
    weight[7] = 5.3659925460815	
    weight[8] = 3.4170460700989	
    weight[9] = 5.2414722442627	
    weight[10] = 4.7376127243042	
    weight[11] = 5.2286224365234	
    weight[12] = 5.455126285553	
    weight[13] = 4.3019247055054	
    weight[14] = 5.4264230728149	
    weight[15] = 5.4331531524658	
    weight[16] = 5.433765411377	
    weight[17] = 5.4631009101868	
    weight[18] = 5.3947434425354
else:
    weight[0] = 2.8149201869965	    #road
    weight[1] = 6.9850029945374	    #sidewalk
    weight[2] = 3.7890393733978	    #building
    weight[3] = 9.9428062438965	    #wall
    weight[4] = 9.7702074050903	    #fence
    weight[5] = 9.5110931396484	    #pole
    weight[6] = 10.311357498169	    #traffic light
    weight[7] = 10.026463508606	    #traffic sign
    weight[8] = 4.6323022842407	    #vegetation
    weight[9] = 9.5608062744141	    #terrain
    weight[10] = 7.8698215484619    #sky
    weight[11] = 9.5168733596802	#person
    weight[12] = 10.373730659485	#rider
    weight[13] = 6.6616044044495	#car
    weight[14] = 10.260489463806	#truck
    weight[15] = 10.287888526917	#bus
    weight[16] = 10.289801597595	#train
    weight[17] = 10.405355453491	#motorcycle
    weight[18] = 10.138095855713	#bicycle

from erfnet.

sunpeng1996 avatar sunpeng1996 commented on July 26, 2024

Oh,thanks o lot!
I will try yours.
The distribution is too large means that the first class weight is 0.0819 ,and someone is 5.2286,
the 5.2286/0.0819 is too big,please look at my weights.

from erfnet.

Eromera avatar Eromera commented on July 26, 2024

Yes, that distribution is a bit weird. What code did you use for calculation? Your weights are basically making the model "ignore" the classes with very small values (0.0819) and boost the ones with very high values. Did you try the weights from the pytorch code?

from erfnet.

Eromera avatar Eromera commented on July 26, 2024

I'm closing this but if you have more questions just reopen it. Thanks!

from erfnet.

zldodo avatar zldodo commented on July 26, 2024

Hi Eromera, thanks a lot for your wonderful works.
Recently I have been training the ERFnet from scratch with my data. I noticed that you used different class weights for encoder trainning and decoder trainning. Could you please explain the reason behind it ? Is this just because different datasets are used for them?

from erfnet.

Related Issues (13)

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.