modes/val/ #8153
Replies: 75 comments 183 replies
|
This line of code "metrics.box.map50" gives error saying that "'NoneType' object has no attribute 'box' ". My code is described below: Load a YOLOv8 modelmodel = YOLO('yolov8n.pt') Train the modelresults_train = model.train(data='japan5.yaml', epochs=1, imgsz=600) Validate the modelmetrics = model.val() # no arguments needed, dataset and settings remembered Please suggest. |
|
After the training of YOLOv8, I got my metrics results in csv file. However, I did validation. But I cannot get my results in csv format. Only images (png & jpeg). How to get validation results in csv? |
|
Hey, I am trying to get metrics such as recall and also trying to save some images in validation. I am using coco.yaml. Any idea how I might do it? |
|
I want to get parameters of a class in metrics and save it to csv. Thank you very much. |
|
hey i want to do the evaluate my model i already get the detection images using ignition gazebo and ros2 but now i want to evaluate my model like accuracy or MAP or recall how to do it i did not have any dataset or any annotations i am using pretrained yolov8 model and using coco8.yaml |
|
Hello i have two questions. |
|
Hello i have two questions kindly help me out. when i have custom trained model. if i load the model and then to detect use" !yolo detect val model=/weights/best.pt data=/data.yaml save=True save_json=True conf=0.85 iou=0.5 split=val " can i give it a new yaml file other than the one which model was trained. For example i used an old dataset to train the model. Now i have new data on which i want to validation of the model i upload data in valid folder and give its yaml file to the model to load those images and validate against the model. (THOSE ARE NEW IMAGES ADDED AFTER TRAINING IN VALID) will it give me accurate results on the new dataset against the model trained? I added 10k images to my Valid folder and want to detection on those new images and see the validation of the model. Second question is that does conf threshold matters while doing validation? and can you please explain how is the confusion matrix is build after validation because its prediction against classes so it goes and compares with the ground truth? Please explain thankyou |
|
Hi, I want to use the validate function to finetune my trained model and see how it performs against real life pictures. There is however a difference in parameters available between "predict" mode and val "mode". For instance, I would like to use specific settings for Augment and retina_mask as part of the validation. Is this possible? And out of curiosity, why are the default settings for Val different from Predict? |
|
Hi, I am completing a vision project for an automated industrial packing cell. Currently I have trained 3 custom models for the different tasks. I want to test the performance of each with different scenarios like bright, dim, natural, artificial lighting and varied backgrounds or similar objects. What would be the best method to do so? Would it be best to create these standard test datasets, link with yaml then use the val function? Or use predict and count correct / incorrect detections and work out metrics from there? Once I have done this I also want to investigate performance with different model architecture sizes and training times so has to be easily repeatable. How is best to implement basically, thanks in advance! |
|
Hi, an iou (1) threshold is used during detection to prevent duplicate bounding boxes. |
|
hi, the error is
|
|
hi, |
|
I use my own post-processing logic on the txts that i get from running inference the validation set. So now I have the post processed txts for the validation set and the original validation txts that i used for training. How to compute the val performance results using the txt files ? |
|
When i tried to evaluation model by command below: model = YOLO('yolov8n.pt') Why there was an error appear on the results section (i was using Google Colab) Error was below: Ultralytics 8.3.41 🚀 Python-3.10.12 torch-2.5.1+cu121 CUDA:0 (Tesla T4, 15102MiB)
|
|
hello!please help me, I have some questions:
|
|
"yolo val" outputs "p","r","mAP50" and "mAP50:95". |
|
I used the save_json = True to save the predictions.json for further analysis. But the image_id seems like a mapping? They are not the images' path. |
|
how to Visualize the ground truth and predicted bounding boxes on some samples from the test dataset. |
|
when I try to validate my model the from ultralytics import YOLO
model = YOLO('/home/heizung1/ultralytics_yolov8-obb_ob_kitti/ultralytics/kitti_bev_yolo/run_94_Adam_88.8_87.2/weights/best.pt') # val. Pytorch model FP32
metrics = model.val(data='/home/heizung1/ultralytics_yolov8-obb_ob_kitti/ultralytics/cfg/datasets/kitti_bev.yaml', imgsz=640,
batch=-1, save_json=False, save_hybrid=False, conf=0.001, iou=0.5, max_det=300, half=False,
device='0', dnn=False, plots=False, rect=False, split='val', project='kitti_bev_yolo', name='val')error: |
|
I used YOLOv8 for quantization and performed inference on my validation set using my chip, obtaining some inference results. How can I use Ultralytics to separately call the post-processing function and obtain performance metrics such as mAP50-95? |
|
from ultralytics import YOLO Load a modelmodel = YOLO("yolov8n.pt") # or your custom model Validate the model with FP16 precisionmetrics = model.val(data="coco.yaml") how can I get a metrics if i use cli like this: yolo detect val model=yolov8n.pt data=coco.yaml |
|
My task is a single-object detection task. I encountered a problem in val. When conf = 0.1 and 0.25, the recall value of 0.25 is higher. In addition, the output recall value seems to be different from the value directly calculated by the confusion matrix. Is this normal? Or is there something wrong |
|
I have a couple of models (a mix of object detection and segmentation), so I want to run them on the same validation dataset to compare them properly. The exact tasks for the seg and obj-det models are the same at a certain level, so I'm aware that seg models give a B-Box and Mask, while obj-det gives just a B-Box. With that said, will a segmentation dataset work on both seg and obj-det models ? Thanks in Advance |
|
How do you limit the evaluation to specific class IDs similarly to the |
|
Hello, |
|
Hi, is there an easy way to get information about each image processed during validation? I’d like to retrieve the filenames of the images where the model failed, so I can review them afterward. |
|
Hi, is there an easy way to get information about each image processed during validation? I’d like to retrieve the filenames of the images where the model failed, so I can review them afterward. |
|
When I run validate without setting plots=True I still get the f1, PR curve plots in the val folder. Potentially the default for this flag is actually true despite it being false in the table above? |
Uh oh!
There was an error while loading. Please reload this page.
modes/val/
Guide for Validating YOLOv8 Models. Learn how to evaluate the performance of your YOLO models using validation settings and metrics with Python and CLI examples.
https://docs.ultralytics.com/modes/val/
All reactions