Tutoriais abrangentes sobre Ultralytics YOLO
Os guias Ultralytics YOLO abrangem todas as etapas de um projeto de IA visual, do treino e da previsão à implementação. Desenvolvido com base em PyTorch, YOLO combina velocidade e precisão para deteção de objetos em tempo real e outras tarefas de visão.
Seja para principiantes ou especialistas em deep learning, estes tutoriais oferecem orientação prática sobre a implementação e otimização de YOLO nos teus projetos de visão computacional.
Assista: Visão geral dos guias do Ultralytics YOLO26
Guias#
Os guias são organizados por etapa do projeto — da configuração do ambiente e preparação dos dados ao treinamento, avaliação e implantação — para você ir direto à etapa em que está trabalhando.
Começar e planear#
- Início rápido com Conda: Guia passo a passo para configurar um ambiente Conda para Ultralytics. Aprende a instalar e começar a usar o pacote Ultralytics de forma eficiente com Conda.
- Início rápido com Docker: Guia completo para configurar e usar modelos Ultralytics YOLO com Docker. Aprende a instalar o Docker, gerir o suporte de GPU e executar modelos YOLO em contentores isolados para garantir um desenvolvimento e uma implementação consistentes.
- Definir os objetivos de um projeto de visão computacional: Aprende a definir objetivos claros e mensuráveis para o teu projeto de visão computacional. Descobre a importância de uma definição do problema bem estruturada e como esta cria um roteiro para o teu projeto.
- Etapas de um projeto de visão computacional: Aprende quais são as principais etapas de um projeto de visão computacional, incluindo a definição de objetivos, a seleção de modelos, a preparação de dados e a avaliação de resultados.
- Explicação da arquitetura YOLO: Acompanha a evolução da arquitetura YOLO desde YOLOv3 até YOLO26 nas componentes backbone, neck e cabeça de deteção, incluindo C2f, C3k2, atenção C2PSA, e os designs sem âncoras e sem NMS.
Prepara os teus dados#
- Recolha e anotação de dados: Explora as ferramentas, técnicas e práticas recomendadas para recolher e anotar dados e criar dados de entrada de alta qualidade para os teus modelos de visão computacional.
- Pré-processamento de dados anotados: Aprende a pré-processar dados para visão computacional com YOLO26, incluindo redimensionamento de imagens, normalização, divisão de conjuntos de dados, aumento de dados e análise exploratória de dados (EDA).
- Aumento de dados em YOLO: explora toda a gama de técnicas de aumento de dados em YOLO, desde transformações básicas até estratégias avançadas para melhorar a robustez e o desempenho do modelo.
- Conversão de COCO para YOLO: Guia completo para converter anotações JSON de COCO para o formato YOLO para treino. Abrange deteção, segmentação e pontos-chave, incluindo o mapeamento de IDs de classes e problemas comuns de conversão.
- Treino com COCO JSON: Treina YOLO diretamente com anotações JSON de COCO, sem converter para o formato YOLO, usando uma classe de conjunto de dados e um treinador personalizados.
Treinar e ajustar#
- Recorte em blocos de alta resolução: treina, valida e faz previsões em imagens de alta resolução com blocos fixos em todas as tarefas de visão.
- Dicas para o treino de modelos: explora dicas para otimizar tamanhos de batch, usar precisão mista, aplicar pesos pré-treinados e muito mais, para treinar modelos de visão computacional com maior eficácia.
- Ajuste fino de YOLO com dados personalizados: Guia completo para ajustar YOLO26 com conjuntos de dados personalizados e pesos pré-treinados, abrangendo aprendizagem por transferência, congelamento de camadas, seleção do otimizador, treino em duas etapas e resolução de problemas.
- Receita de treino do YOLO26: Documentação completa dos hiperparâmetros, pipelines de aumento de dados e configurações do otimizador usados para treinar os checkpoints base oficiais do YOLO26 com COCO, com orientações práticas para o ajuste fino.
- Ajuste de hiperparâmetros: Descobre como otimizar os teus modelos YOLO ajustando hiperparâmetros com a classe Tuner e algoritmos de evolução genética.
- Destilação de conhecimento: Aprende a melhorar o desempenho dos modelos transferindo conhecimento de um modelo professor maior para um modelo aluno menor, usando destilação baseada em características.
- Validação cruzada K-Fold: aprende a melhorar a generalização do modelo usando a técnica de validação cruzada K-Fold.
- Personalizar o treinador: Aprende a criar uma subclasse do treinador YOLO para registar métricas personalizadas, adicionar uma função de perda ponderada por classe, personalizar a gravação de modelos, congelar/descongelar o backbone e definir taxas de aprendizagem por camada.
- Guia de configuração YAML de modelos: uma análise aprofundada das definições da arquitetura dos modelos Ultralytics. Explora o formato YAML, entende o sistema de resolução de módulos e aprende a integrar módulos personalizados.
Avaliar e resolver problemas#
- Métricas de desempenho do YOLO ⭐ ESSENCIAL: Compreende as principais métricas, como mAP, IoU e pontuação F1, usadas para avaliar o desempenho dos teus modelos YOLO. Inclui exemplos práticos e dicas para melhorar a precisão e a velocidade da deteção.
- Perspetivas sobre a avaliação e o ajuste fino de modelos: Avalia modelos de visão computacional com métricas como mAP e IoU e, em seguida, usa o que estas métricas revelam para melhorar a precisão da deteção.
- Testar modelos: Aprende a testar modelos de visão computacional com dados nunca vistos, validar modelos YOLO26 e detetar sobreajuste, subajuste e fuga de dados antes da implementação.
- Problemas comuns do YOLO ⭐ RECOMENDADO: Soluções práticas e dicas de resolução de problemas para as dificuldades mais frequentes ao trabalhar com modelos Ultralytics YOLO.
- Manutenção do teu modelo de visão computacional: conhece as principais práticas para monitorizar, manter e documentar modelos de visão computacional, a fim de manter a precisão, identificar anomalias e mitigar a deriva de dados.
Implementar e servir#
- Opções de implantação de modelos: Visão geral dos formatos de implantação de modelos YOLO, como ONNX, OpenVINO e TensorRT, com vantagens e desvantagens de cada um para ajudar você a definir sua estratégia de implantação.
- Práticas recomendadas para a implementação de modelos: Descobre dicas e práticas recomendadas para implementar modelos de forma eficiente em projetos de visão computacional, com foco na otimização, na resolução de problemas e na segurança.
- Exportar modelos que não são YOLO: Usa os utilitários de exportação autónomos da Ultralytics para converter qualquer
torch.nn.Module(timm, torchvision, personalizado) para TorchScript, ONNX, OpenVINO, CoreML, Core AI, TensorFlow SavedModel, PaddlePaddle, MNN, NCNN e ExecuTorch. - Deteção de ponta a ponta: Escolhe inferência com ou sem NMS e compreende os formatos de saída e a compatibilidade de exportação.
- Inferência YOLO segura para threads: Orientações para realizar inferência com modelos YOLO de forma segura para threads. Aprende a importância da segurança de threads e as práticas recomendadas para evitar condições de corrida e garantir previsões consistentes.
- Modos de latência e débito do OpenVINO: Aprende técnicas de otimização da latência e do débito para obter o máximo desempenho de inferência do YOLO.
- Isolamento de objetos segmentados: passo a passo para extrair e isolar objetos de imagens com modelos de segmentação Ultralytics.
- Ver imagens de inferência num terminal: usa o terminal integrado do VS Code para ver os resultados da inferência em sessões Remote Tunnel ou SSH.
Os guias para hardware específico, pilhas de serviço e plataformas em nuvem, como NVIDIA Jetson, Raspberry Pi, NVIDIA Triton e Google Vertex AI, estão listados em Integrações.
Contribui para os nossos guias#
A comunidade é convidada a contribuir! Se dominares um aspeto específico do Ultralytics YOLO que ainda não esteja abrangido pelos nossos guias, incentivamos-te a partilhar os teus conhecimentos. Escrever um guia é uma ótima forma de retribuir à comunidade e ajudar-nos a tornar a documentação mais completa e fácil de usar.
Para começar, lê o nosso Guia de contribuição para saberes como abrir um Pull Request (PR). Ao adicionar um novo guia, coloca-o na categoria acima correspondente à fase do projeto e limita-o a um único tipo de página — um tutorial passo a passo, um guia prático centrado numa tarefa ou uma referência — para que a coleção continue fácil de consultar à medida que cresce. Aguardamos com expectativa as tuas contribuições.
Perguntas frequentes#
Treinar um modelo personalizado de deteção de objetos com Ultralytics YOLO é simples. Começa por preparar o teu conjunto de dados no formato correto e instalar o pacote Ultralytics. Usa o código seguinte para iniciar o treino:
Exemplofrom ultralytics import YOLO model = YOLO("yolo26n.pt") # Carregar um modelo YOLO pré-treinado model.train(data="path/to/dataset.yaml", epochs=50) # Treinar num conjunto de dados personalizadoAvaliar o desempenho do teu modelo YOLO é essencial para compreender a sua eficácia. Entre as principais métricas estão a Precisão média média (mAP), a Interseção sobre União (IoU) e a pontuação F1. Estas métricas ajudam a avaliar a exatidão e a precisão das tarefas de deteção de objetos. Podes saber mais sobre estas métricas e sobre como melhorar o teu modelo no nosso guia Métricas de desempenho do YOLO.
Ultralytics Platform é um espaço de trabalho completo e sem código para anotação de conjuntos de dados, rastreamento de experimentos, treino na nuvem, exportação e endpoints de inferência dedicados para modelos YOLO, adequado tanto para principiantes como para profissionais.
Entre os problemas comuns durante o treino de modelos YOLO estão erros de formatação de dados, incompatibilidades na arquitetura do modelo e dados de treino insuficientes. Para os resolver, confirma se o teu conjunto de dados está formatado corretamente, verifica se as versões do modelo são compatíveis e aumenta os dados de treino. Para consultar uma lista completa de soluções, vê o nosso guia Problemas comuns do YOLO.
Implementar modelos YOLO em dispositivos de edge, como NVIDIA Jetson e Raspberry Pi, requer converter o modelo para um formato compatível, como TensorRT ou LiteRT. Para começar com a deteção de objetos em tempo real em hardware de edge, segue os nossos guias passo a passo de implementação para NVIDIA Jetson e Raspberry Pi. Estes guias abrangem instalação, configuração e otimização do desempenho.
Comentários30
Faz uma pergunta, partilha os teus resultados ou ajuda alguém.
safdarhamid64-cpu
i have done everything using your docker method everything , using AI chatbots , but still i am unable to run the yolo , plzz provide me a solution that will work for every Raspberry Pi4 because its really so much frustrating
tutorialsyolo
Hi, I am trying to improve the convolutional layers in the nn module like in conv.py or block.py as novelty for my research. The location is like "ultralytics/ultralytics/nn/modules/conv.py. Could you please tell me where else i should update/call the new block which I improved? Because it gives me error when I am adding those blocks in the cfg/.yaml files for training in a custom dataset. Thank you
Ishfaz
Hello,
I'm using YOLOv8 for object detection, and I have only three classes in my dataset. However, when I generate the confusion matrix after training or validation, I notice that it shows a 4x4 matrix instead of the expected 3x3.
It seems like an extra class, possibly a "background" or "null" class, is being added automatically.
How can I remove this extra background class so that my confusion matrix only reflects the three actual classes I have trained on?
AashishThakur1321
can you tell the path, where downloaded model weights are stored as i manually want to add the weights to the folder as i don't have internet access on server
Glenn JocherUltralytics@AashishThakur1321 the default location where Ultralytics models are stored depends on your operating system, but it's typically within a directory in your user's home folder; you can find more specific details by checking the "Settings" section when you run
from ultralytics import settings; print(settings).1
ghost
Hello, I am working on a project to detect different types of cells. I already have a trained model, thanks to Ultralytics! I want to increase my dataset and tried using the auto-annotate function. The function works well but annotates objects in polygons. I need annotation in rectangular bounding boxes. Can you please help with this problem? https://docs.ultralytics.com/reference/data/annotator/
Glenn JocherUltralytics@kartmyco thank you for your message! While the auto-annotate function currently outputs polygon annotations, you can convert them to rectangular bounding boxes using tools like
cvatorlabelme, or you can write a custom script to approximate polygons into rectangular boxes. For details on data annotation tools, you can refer to our guide on data collection and annotation. Let us know if you have additional questions!ghost
Hello Glenn, Thank you so much for your reply. I will try to approximate the polygons in rectangular bounding boxes.
jdonza
I decided to make a different thread here as it is related to a different topic. But I wanted to know if you guys had documentation that went into the specifics of how the YOLO models are created. I am interested to learn more about CNN's, how they work, and how it relates to the image processing of YOLO.
Glenn JocherUltralytics@jdonza for detailed information on how YOLO models are created and how CNNs work in relation to YOLO, please refer to our comprehensive guides at https://docs.ultralytics.com/guides/. These resources cover various aspects of YOLO, including its architecture and image processing techniques.
jdonza
Hello,
Are there any tutorials showing how to train a YOLOv8 model using multiple devices for faster training? I read the instructions for YOLOv5 but got a bit lost. Step by step instructions would be greatly appreciated!
Thank you!
Glenn JocherUltralytics@jdonza hello,
For training YOLOv8 using multiple devices, please refer to our Multi-GPU Training guide. It provides step-by-step instructions to help you set up and run training across multiple GPUs.
Thank you!
jdonza
Thank you for the response! What I am still confused with is the following line of code.
results = model.train(data="coco8.yaml", epochs=100, imgsz=640, device=[0, 1])Here are a few questions I had.
- I have one GPU on my computer currently. If I had another device that also had the same GPU, how does YOLO know which computer is 0 and which is 1? Is there a physical connection of some sort that needs to occur?
- If you had a computer with multiple GPU's, the same questions arises. How does YOLO know which is 0 and which is 1?
Overall, I am confused with the set-up steps that need to occur before simply inputting "device=[0,1]".
Sorry if my questions appear trivial. I am a beginner and do not have much experience with network configurations like this!
Thanks!
Glenn JocherUltralytics@jdonza to address your questions:
- YOLOv8 does not support multi-device training across different computers. Each device ID (e.g., 0, 1) refers to GPUs within the same machine.
- For a computer with multiple GPUs, device IDs are assigned based on the order in which GPUs are detected by the system. You can verify GPU IDs using
nvidia-smi.
For more details, please refer to the Multi-GPU Training guide.
jdonza
Was this capability eliminated? The link you provided has a drop-down section labeled "Use Multiple Machines" which appears to provide some sort of framework to accomplish this.
Glenn JocherUltralytics@jdonza the capability for multi-machine training is not supported in YOLOv8. The "Use Multiple Machines" section in the documentation you referenced may pertain to older versions or different contexts. For multi-GPU training on a single machine, you can use the
device=[0,1]argument. If you have further questions, please refer to the Multi-GPU Training guide.jdonza
Okay thank you!
Glenn JocherUltralytics@jdonza you're welcome! For training YOLOv8 on multiple GPUs within a single machine, you can use the
device=[0,1]argument. Each GPU is identified by its ID, which you can check usingnvidia-smi. Multi-machine training is not supported. For more details, please refer to the Multi-GPU Training guide.Ephraim-Bryski
While not supported in YOLOv8, I did see reference to training across multiple computers in the YOLOv5 documentation:
(I believe this is what jdonza was referring to before). Does this allow for training across multiple computers for YOLOv5, but is no longer supported in YOLOv8? If so, would using YOLOv5 instead of v8 be recommended for this use case? Thanks!
Glenn JocherUltralyticsTraining across multiple computers is supported in YOLOv5 using DistributedDataParallel, but this feature is not available in YOLOv8. If multi-machine training is essential for your use case, using YOLOv5 would be recommended. For more details, please refer to the YOLOv5 documentation.
TanWeeKang
hi, i am doing a project about food detection. the detection results were great. however, there are some overlapping bboxes for some categories of food. some input images will have this category and some will have others. how can i apply nms to retrieve only the highest conf score of the detection and remove overlapping bboxes? i run inference on my best.pt model by giving it input images
Glenn JocherUltralytics(editado)Hi there! It's great to hear that your food detection project is yielding excellent results! 🎉
To address the issue of overlapping bounding boxes, you can apply Non-Maximum Suppression (NMS) to retain only the highest confidence score detections and remove the overlapping ones. YOLO models typically handle NMS internally, but you can customize the NMS settings during inference to better suit your needs.
Here's how you can do it:
Using Python
If you're running inference in a Python environment, you can set the
conf(confidence threshold) andiou(IoU threshold for NMS) parameters when calling thepredictmethod. Here's an example:from ultralytics import YOLO # Load your custom-trained model model = YOLO('path/to/best.pt') # Run inference with custom NMS settings results = model.predict(source='path/to/your/image.jpg', conf=0.25, iou=0.45) # Display results results[0].show()Using CLI
If you're using the command line interface, you can specify these parameters directly in your command:
yolo predict model=path/to/best.pt source='path/to/your/image.jpg' conf=0.25 iou=0.45Explanation
conf: This sets the minimum confidence threshold for detections. Detections with a confidence score below this value will be discarded.iou: This sets the IoU threshold for NMS. Detections with an IoU greater than this value will be considered overlapping, and only the one with the highest confidence score will be kept.
For more detailed information on inference and NMS settings, you can refer to the YOLO Predict Documentation.
If you encounter any issues or need further assistance, please ensure you're using the latest versions of
torchandultralytics. If the problem persists, providing a minimum reproducible example would be very helpful. You can find guidelines on creating one here: Minimum Reproducible Example.Happy coding, and best of luck with your project! 🚀
TanWeeKang
because the goal for now is to remove overlapping, if i set the iou threshold on the high side, the image doesnt differ much from the original detected image, where there are many overlappings. if i set to a low iou threshold, more overlappings will be removed.
TanWeeKang
another thing is that for my food detection i have 5 classes/categories of food. under these 5 categories i have variety of food for each category, but i label and train the model on these 5 classes, for simplicity sake i did not go into detail about what kind of food is that, lets say meat we have fish, pork etc. the model see either of those and classify as meat. although they are from same classes, they might have different prices. now how can i use segmentation( maybe from opencv) to distinguish the image i used to run inference on my best.pt model to identify the difference in meat like fish, pork to have different prices?
Glenn JocherUltralytics(editado)Hi there! Thanks for reaching out and providing detailed feedback on your experience with overlapping bounding boxes in your food detection project. It's fantastic to hear that your detection results are generally great! 🎉
To address the issue of overlapping bounding boxes, adjusting the IoU threshold is indeed a key factor. Here’s a more refined approach to help you achieve the best balance:
Fine-Tuning IoU Threshold
- High IoU Threshold: Retains more overlapping boxes, which might be useful if you want to ensure that no potential detections are missed.
- Low IoU Threshold: Removes more overlapping boxes, which can help in reducing redundancy but might risk missing some detections.
Practical Steps
- Experiment with Intermediate Values: Instead of setting the IoU threshold to extremes, try intermediate values (e.g., 0.3, 0.4, 0.5) to find a sweet spot that minimizes overlaps without losing important detections.
- Confidence Threshold: Adjust the confidence threshold (
conf) to filter out low-confidence detections, which can also help in reducing overlaps.
Example Code
Here’s how you can apply these settings in Python:
from ultralytics import YOLO # Load your custom-trained model model = YOLO('path/to/best.pt') # Run inference with custom NMS settings results = model.predict(source='path/to/your/image.jpg', conf=0.25, iou=0.45) # Display results results[0].show()And using the CLI:
yolo predict model=path/to/best.pt source='path/to/your/image.jpg' conf=0.25 iou=0.45Additional Resources
For more detailed guidance on optimizing your model and handling common issues, you might find the following guides helpful:
If you continue to experience issues, please ensure you are using the latest versions of
torchandultralytics. If the problem persists, providing a minimum reproducible example would be very helpful. You can find guidelines on creating one here: Minimum Reproducible Example.Feel free to reach out if you have any more questions or need further assistance. Happy coding! 🚀
TanWeeKang
another thing is that for my food detection i have 5 classes/categories of food. under these 5 categories i have variety of food for each category, but i label and train the model on these 5 classes, for simplicity sake i did not go into detail about what kind of food is that, lets say meat we have fish, pork etc. the model see either of those and classify as meat. although they are from same classes, they might have different prices. now how can i use segmentation( maybe from opencv) to distinguish the image i used to run inference on my best.pt model to identify the difference in meat like fish, pork to have different prices?
Glenn JocherUltralyticsHi there! It's fantastic to hear about your progress with food detection using YOLO. 😊
To distinguish between different types of food within the same category (like fish and pork under "meat"), you can leverage segmentation techniques. Here's a step-by-step approach to achieve this:
1. Segmentation with OpenCV
You can use OpenCV to perform image segmentation, which will help you isolate different types of food within the same category. Here's a basic example of how you might use OpenCV for segmentation:
import cv2 import numpy as np # Load the image image = cv2.imread('path/to/your/image.jpg') # Convert to grayscale gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) # Apply GaussianBlur to reduce noise and improve contour detection blurred = cv2.GaussianBlur(gray, (5, 5), 0) # Use Canny edge detection edges = cv2.Canny(blurred, 50, 150) # Find contours contours, _ = cv2.findContours(edges, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) # Draw contours on the original image cv2.drawContours(image, contours, -1, (0, 255, 0), 2) # Display the result cv2.imshow('Segmented Image', image) cv2.waitKey(0) cv2.destroyAllWindows()2. Combining YOLO Detection with Segmentation
You can combine the bounding boxes from your YOLO model with segmentation to further classify the detected objects. Here’s a conceptual approach:
- Run YOLO Inference: Use your trained YOLO model to detect the general categories (e.g., meat).
- Apply Segmentation: Within each detected bounding box, apply segmentation to isolate different types of food.
- Classify Segmented Regions: Use additional classification models or heuristics to distinguish between types like fish and pork.
3. Advanced Segmentation Techniques
For more precise segmentation, consider using advanced models like Mask R-CNN or leveraging pre-trained segmentation models available in frameworks like PyTorch or TensorFlow.
Example with YOLO and Segmentation
Here’s a more integrated example combining YOLO detection with OpenCV segmentation:
from ultralytics import YOLO import cv2 # Load your custom-trained YOLO model model = YOLO('path/to/best.pt') # Run inference results = model.predict(source='path/to/your/image.jpg', conf=0.25, iou=0.45) # Process each detected bounding box for result in results: for box in result.boxes: x1, y1, x2, y2 = map(int, box.xyxy[0]) cropped_img = result.orig_img[y1:y2, x1:x2] # Convert to grayscale and apply segmentation gray = cv2.cvtColor(cropped_img, cv2.COLOR_BGR2GRAY) blurred = cv2.GaussianBlur(gray, (5, 5), 0) edges = cv2.Canny(blurred, 50, 150) contours, _ = cv2.findContours(edges, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) cv2.drawContours(cropped_img, contours, -1, (0, 255, 0), 2) # Display the segmented image cv2.imshow('Segmented Image', cropped_img) cv2.waitKey(0) cv2.destroyAllWindows()Further Reading
For more detailed guides and advanced techniques, you might find these resources helpful:
Feel free to experiment with these techniques and adjust the parameters to better suit your specific use case. If you have any more questions or need further assistance, don't hesitate to ask. Happy coding! 🚀
thisisqiuqiuqiu
Thank you very much for your letter. Your reply is very helpful to my experimental training. I understand how to set up the basic model training. I wish you all success in your future work.
------------------ 原始邮件 ------------------ 发件人: "ultralytics/ultralytics" @.>; 发送时间: 2024年5月20日(星期一) 中午12:11 @.>; @.@.>; 主题: Re: [ultralytics/ultralytics] zh/guides/ (Discussion #12787)
Hello! The number of epochs needed for training the YOLOv8 base model can vary depending on your specific dataset and the complexity of the task. While 500 epochs might be necessary for some scenarios to achieve optimal results, it's not a strict requirement for all cases.
A good practice is to monitor the training process for signs of convergence, such as stable validation loss and accuracy metrics. You can start with fewer epochs, like 100 or 200, and evaluate the model's performance. If the results are not satisfactory, you can continue training for more epochs or consider adjusting other hyperparameters.
Here's a simple example to start training with a specified number of epochs: yolo train data=coco128.yaml model=yolov8n.pt epochs=100
Adjust the epochs value as needed based on your observations. Happy training! 😊
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
thisisqiuqiuqiu
I would like to ask, does the yolov8 base model need to be trained to 500 epochs?
Glenn JocherUltralytics(editado)Hello! The number of epochs needed for training the YOLO base model can vary depending on your specific dataset and the complexity of the task. While 500 epochs might be necessary for some scenarios to achieve optimal results, it's not a strict requirement for all cases.
A good practice is to monitor the training process for signs of convergence, such as stable validation loss and accuracy metrics. You can start with fewer epochs, like 100 or 200, and evaluate the model's performance. If the results are not satisfactory, you can continue training for more epochs or consider adjusting other hyperparameters.
Here's a simple example to start training with a specified number of epochs:
yolo train data=coco128.yaml model=yolo26n.pt epochs=100Adjust the
epochsvalue as needed based on your observations. Happy training! 😊