Skip to content

where you ignore labels of pixels belonging to unseen classes during training #5

Description

Thank you for sharing the useful code.

@subhc , as you discussed in article you consider all images during training, but pixels which relate to unseen classes will be ignored in calculating loss.

I completely explore your codes, but all classes are considered ( 0 to 15 for seen and 16 to 20 for unseen) for calculating loss.

I checked target tensor in this part which calculate loss. Some times in target we have pixels relate to unseen classes ( index from 16 to 20), but they are not ignored for calculating loss.

        for output in outputs:
            # Resize target for {100%, 75%, 50%, Max} outputs
            target_ = resize_target(target, output.size(2))
            target_ = torch.tensor(target_).to(device)
            loss += criterion.forward(output, target_)

Thank you for your answer

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions