Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can i calculate the looses in the test dataset #12914

Open
1 task done
VyrionAI opened this issue May 20, 2024 · 5 comments
Open
1 task done

can i calculate the looses in the test dataset #12914

VyrionAI opened this issue May 20, 2024 · 5 comments
Labels
question Further information is requested

Comments

@VyrionAI
Copy link

Search before asking

Question

i want to to calculate the loses in the test part of the dataset .

Additional

No response

@VyrionAI VyrionAI added the question Further information is requested label May 20, 2024
@glenn-jocher
Copy link
Member

Hello! To calculate losses on the test dataset using YOLOv8, you can use the val mode with your test dataset specified in the data configuration file. Here's a quick example on how you might set it up:

yolo val model=yolov8n.pt data=test_data.yaml

Make sure your test_data.yaml is configured correctly to point to your test dataset. This will run the model validation on the test set and provide you with the loss metrics. If you need further customization, consider adjusting the validation parameters in your YAML file or through CLI arguments. Happy testing! 🚀

@VYRION-Ai
Copy link

@glenn-jocher did this calculate the box lose and cls loses

@glenn-jocher
Copy link
Member

Hello! Yes, YOLOv8 calculates both box loss and class loss during training and validation. You can see these losses in the output logs when you run the training or validation process. For example:

yolo train model=yolov8n.pt data=coco128.yaml

This command will display the box and class losses among other metrics during the training. If you need to specifically track these losses, you can check the logs or modify the logging settings in your configuration. Happy training! 🚀

@VYRION-Ai
Copy link

@glenn-jocher can I calculate them without traning,I already have the model, I need to get theses values with the test part of my dataset

@glenn-jocher
Copy link
Member

Hello! Yes, you can calculate the box and class losses on your test dataset without additional training by using the val mode with your pre-trained model. Here’s how you can do it:

yolo val model=path/to/your/model.pt data=test_data.yaml

Ensure your test_data.yaml points to your test dataset. This command will evaluate the model on the test data and provide you with the loss metrics directly. Let me know if you need further assistance! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants