Giter Site home page Giter Site logo

Ask questions about unimatch HOT 1 CLOSED

liheyoung avatar liheyoung commented on September 24, 2024
Ask questions

from unimatch.

Comments (1)

LiheYoung avatar LiheYoung commented on September 24, 2024

Thank you for raising these questions.

  1. Among the two filtering conditions, conf_u_w_cutmixed2 >= cfg['conf_thresh'] is for selecting high-confidence pseudo labels, while ignore_mask_cutmixed2 != 255 is to avoid the loss computation in padded regions from image pre-processing. And we only divide the second conditiontorch.sum(ignore_mask_cutmixed2 != 255).item() in the third line, because we hope ((conf_u_w_cutmixed2 >= cfg['conf_thresh']) & (ignore_mask_cutmixed2 != 255)).sum() / (ignore_mask_cutmixed2 != 255).sum() can serve as an adaptive weight for our unsupervised loss. Concretely, at earlier training stages, the adaptive weight will be small, due to the abundant low-confidence pixels. Our model is mainly learned with labeled images. Then as training proceeds, the adaptive weight will gradually increase to learn more on unlabeled images. You may also refer to the Equation 2 in FixMatch.

  2. I think that either 0.5 or 0.95 is just a hyperparameter, regardless of the number of classes. In your case of binary classification, I guess you may use a sigmoid function for classification. Then you can still maintain a 0.95 threshold by only considering the output > 0.95 (certainly class 1) and the output < 0.05 (certainly class 0). The 0.5 you mentioned probably denotes the classification threshold for sigmoid, rather than our confidence threshold.

  3. I think the unsupervised loss weight can be adjusted according to your observations. It may depend on the proportion and hardness of unlabeled images.

from unimatch.

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.