Giter Club home page Giter Club logo

Comments (4)

github-actions avatar github-actions commented on June 9, 2024

👋 Hello @AirdEliya, thank you for your interest in Ultralytics YOLOv8 🚀! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered.

If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us debug it.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results.

Join the vibrant Ultralytics Discord 🎧 community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users.

Install

Pip install the ultralytics package including all requirements in a Python>=3.8 environment with PyTorch>=1.8.

pip install ultralytics

Environments

YOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

Ultralytics CI

If this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLOv8 Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit.

from ultralytics.

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

@AirdEliya hello,

Thanks for bringing this issue to our attention and for the detailed description of your experience with the YOLOv8n-seg models. It sounds like you've been very thorough in your approach. 🕵️‍♂️

Switching models can sometimes lead to performance variations due to differences in model architectures and how they handle feature learning, particularly when moving to a variant like yolov8n-seg-p6. Adjustments in hyperparameters, as you've attempted, are a good response, but the issue might also relate to other factors such as initialization states or minor changes in training conditions that might not be immediately apparent.

A potential first step to diagnose the issue could be to ensure consistency in the model's state before and after switching models or performing significant training operations like using the copy_paste function. You could also try monitoring the intermediate outputs and training dynamics to spot any abrupt changes or anomalies.

Here’s a simple code snippet to check for model parameter consistency:

def check_model_consistency(model1, model2):
    for p1, p2 in zip(model1.parameters(), model2.parameters()):
        if not torch.allclose(p1, p2):
            return False
    return True

# Usage:
is_consistent = check_model_consistency(trainer.model, previous_model_state)
print('Model consistency:', is_consistent)

This is simplistic and assumes you have access to both model states but could be a starting point to ensure that the models’ parameters aren’t altered unintentionally.

We're here to help and would appreciate your continued feedback or contributions, especially if you discover a solution that might benefit others encountering similar challenges!

from ultralytics.

AirdEliya avatar AirdEliya commented on June 9, 2024

Hello author @glenn-jocher ,

I wanted to inform you that I have resolved the issue I previously inquired about. It turns out the solution was quite simple. When using the yolov8n-seg model, I mistakenly called the command as instructed in the Segmentation task using yolov8n-seg.pt. Consequently, the .pt file was downloaded to the current path. I haven't had the chance to delve into this file to understand its origin as a pre-trained model.

Additionally, I initially intended to call yolov8n-seg-p6.yaml to utilize the initial architecture. However, when reverting back, I accidentally used yolov8n-seg.yaml for training, resulting in differences between the two runs. I apologize for any inconvenience caused by these inquiries.

Moving forward, I have a few more questions. Once a good epoch is found using the pre-trained models with the initial conditions and achieving a good mAP with the validation data, how should other parameters be adjusted? Moreover, what strategy should be employed for data augmentation to gradually adjust the parameters to fit my dataset?

I would like to know how the pretrained yolov8n-seg be trained.

Thank you.

from ultralytics.

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

Hello @AirdEliya,

Great to hear that you've resolved the issue! It's easy to mix up file names, especially when switching between similar model configurations. 😅

For your questions on fine-tuning the model:

  1. Adjusting Parameters: After finding a good epoch, consider adjusting the learning rate and batch size to see if you can squeeze out more performance without overfitting. Also, experiment with different optimizers if you haven't settled on one yet.
  2. Data Augmentation: Start with basic augmentations like rotation, flipping, and scaling. Gradually introduce more complex augmentations like color adjustments and noise. Monitor the model's performance on validation data with each change to ensure improvements.

To train the pretrained yolov8n-seg model, you can use the following example command:

yolo detect train model=yolov8n-seg.pt data=your_dataset.yaml

Make sure your dataset is properly configured in the .yaml file.

Keep experimenting, and don't hesitate to reach out if you have more questions! 🚀

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.