Coder Social home page Coder Social logo

Comments (6)

xvjiarui avatar xvjiarui commented on July 1, 2024

Hi @zhujiesuper
decode_head is for decoding semantic segmentation output.
auxiliary_head is just adding an auxiliary loss.

from mmsegmentation.

zhujiesuper avatar zhujiesuper commented on July 1, 2024

thank you! but if all the model need auxiliary_head? i find it in all model,but in papers do not all have ,i know pspnet have an auxiliary loss,but others do not have,can you tell me how to handle this

from mmsegmentation.

xvjiarui avatar xvjiarui commented on July 1, 2024

Hi @zhujiesuper
For fair comparison, we use auxiliary loss for all methods.
Note that, there are many implementation details in our repo that differ from the official repo.

from mmsegmentation.

baibaidj avatar baibaidj commented on July 1, 2024

thank you! but if all the model need auxiliary_head? i find it in all model,but in papers do not all have ,i know pspnet have an auxiliary loss,but others do not have,can you tell me how to handle this

The auxilliary_head is modular and optional, which means that you can remove it if you don't want it.

model = dict(
type='EncoderDecoder', # tells registery to use which module to build this model
pretrained='open-mmlab://resnet50_v1c',
backbone=dict(
type='ResNetV1c',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
dilations=(1, 1, 2, 4),
strides=(1, 2, 1, 1),
norm_cfg=norm_cfg,
norm_eval=False,
style='pytorch',
contract_dilation=True),
decode_head=dict(
type='PSPHead', # type can be seen as the surrogates for python classes to call from
in_channels=2048,
in_index=3,
channels=512,
pool_scales=(1, 2, 3, 6),
dropout_ratio=0.1,
num_classes=19,
norm_cfg=norm_cfg,
align_corners=False,
loss_decode=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0)),
auxiliary_head=dict(
type='FCNHead',
in_channels=1024,
in_index=2,
channels=256,
num_convs=1,
concat_input=False,
dropout_ratio=0.1,
num_classes=19,
norm_cfg=norm_cfg,
align_corners=False,
loss_decode=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4))
)

For the config of PSPNet as shown above, you just need to remove all the content of auxiliary_head variable. Then the model won't compute the auxiliary loss any more.

from mmsegmentation.

zhujiesuper avatar zhujiesuper commented on July 1, 2024

does it mean i delete

auxiliary_head=dict(
type='FCNHead',
in_channels=1024,
in_index=2,
channels=256,
num_convs=1,
concat_input=False,
dropout_ratio=0.1,
num_classes=19,
norm_cfg=norm_cfg,
align_corners=False,
loss_decode=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4))
)

and it work?

from mmsegmentation.

xvjiarui avatar xvjiarui commented on July 1, 2024

Hi @zhujiesuper
Yes. Deleting auxilary_head in cfg will remove auxiliary head in the model.

from mmsegmentation.

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.