GithubHelp home page GithubHelp logo

Comments (4)

glenn-jocher avatar glenn-jocher commented on June 27, 2024

@MuhabHariri hi there,

Thank you for reaching out and providing details about the issue you're encountering with freezing layers in your custom YOLOv8 model. To assist you better, could you please provide a minimal reproducible code example? This will help us understand the context and reproduce the issue on our end. You can refer to our guide on creating a minimum reproducible example for more details.

Additionally, please ensure that you are using the latest versions of torch and ultralytics. You can upgrade your packages using the following commands:

pip install --upgrade torch ultralytics

Regarding your question, your interpretation is correct. In the YOLOv8 model, model.0 refers to the first layer, and model.19 would indeed correspond to the Detect layer if your YAML file is structured that way. The unexpected freezing of the model.19.dfl.conv.weight layer could be due to a misconfiguration or an unintended side effect in the model's layer freezing logic.

Once you provide the reproducible example and confirm the versions, we can dive deeper into the issue and identify why the Detect layer's weight is being frozen.

Looking forward to your response!

from ultralytics.

glenn-jocher avatar glenn-jocher commented on June 27, 2024

@MuhabHariri DFL layers should always be frozen, this is all good.

from ultralytics.

MuhabHariri avatar MuhabHariri commented on June 27, 2024

@glenn-jocher Thank you for your response. Could you clarify further why DFL layers should always be frozen?

from ultralytics.

glenn-jocher avatar glenn-jocher commented on June 27, 2024

Hi @MuhabHariri,

Thank you for your follow-up question!

The DFL (Distribution Focal Loss) layers are designed to be frozen because they are part of the final detection head, which is responsible for refining the bounding box predictions. Freezing these layers helps maintain the stability of the model's output during training, ensuring that the learned distribution of bounding box coordinates remains consistent. This is particularly important for maintaining the accuracy and reliability of the model's predictions.

If you have any more questions or need further clarification, feel free to ask! 😊

from ultralytics.

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.