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

validation on imgsz of 13792 #12662

Open
1 task done
echo385 opened this issue May 13, 2024 · 3 comments
Open
1 task done

validation on imgsz of 13792 #12662

echo385 opened this issue May 13, 2024 · 3 comments
Labels
question Further information is requested

Comments

@echo385
Copy link

echo385 commented May 13, 2024

Search before asking

Question

hi ,thank you for your contribution! I have two questions:
(1) I use the imgsz of 13792 to validate my high resolution image, and I also get the results, like precision curve, recall curve, and so on. So I want to know if I am doing this right?
(2) I also want to know how to determine the relationship between the inference box and the annotation box to determine whether the target is detected? is IOU? but the iou in val is for "Sets the Intersection Over Union (IoU) threshold for Non-Maximum Suppression (NMS). Helps in reducing duplicate detections." So how can I change the iou to get different evaluation, like recall?

Additional

No response

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

Hello! Thanks for your questions, I'm here to help! 🚀

  1. Validation with imgsz 13792: Using a high imgsz of 13792 for validation is fine as long as you have the compute resources, and it's appropriate for the resolution of the images within your dataset. As long as you're getting expected curves (precision, recall), it sounds like your validation setup is correctly configured.

  2. Relationship between Detection and Annotation Boxes: You're correct in using the Intersection Over Union (IoU) to determine matches between prediction boxes and ground truth (annotation) boxes. For evaluation metrics like recall, you can indeed adjust the IoU thresholds to see how strict or lenient the detector should be regarding what counts as a correct detection. To tweak this for different outcomes in your evaluations:

    • In the validation configuration, specify different IoU thresholds and see how this affects your recall or precision. You can alter your validation command to include a specific iou threshold as follows:
    yolo val model=my_model.pt data=my_data.yaml iou=0.5

Replace iou=0.5 with your desired threshold for evaluating and recalculating metrics accordingly. This adjustment will help you see how your model’s performance changes under different criteria.

@echo385
Copy link
Author

echo385 commented May 14, 2024

Hello! Thanks for your questions, I'm here to help! 🚀

  1. Validation with imgsz 13792: Using a high imgsz of 13792 for validation is fine as long as you have the compute resources, and it's appropriate for the resolution of the images within your dataset. As long as you're getting expected curves (precision, recall), it sounds like your validation setup is correctly configured.

  2. Relationship between Detection and Annotation Boxes: You're correct in using the Intersection Over Union (IoU) to determine matches between prediction boxes and ground truth (annotation) boxes. For evaluation metrics like recall, you can indeed adjust the IoU thresholds to see how strict or lenient the detector should be regarding what counts as a correct detection. To tweak this for different outcomes in your evaluations:

    • In the validation configuration, specify different IoU thresholds and see how this affects your recall or precision. You can alter your validation command to include a specific iou threshold as follows:
    yolo val model=my_model.pt data=my_data.yaml iou=0.5

Replace iou=0.5 with your desired threshold for evaluating and recalculating metrics accordingly. This adjustment will help you see how your model’s performance changes under different criteria.

thank you for your reply! I use the 640*640 of image size to train the model, because I want to get the metrics like recall curve on high resolution image like 13792 of resolution, so I do this. This procedure is correct? and I also find that I can use the imgsz of 13792 to predict , which also get object detection!

@glenn-jocher
Copy link
Member

Hello! Glad to hear you're making progress with your model training and evaluation! 🌟

Using a train image size of 640x640 and then validating or predicting on a significantly higher resolution (13792) is technically feasible but might not always yield optimal results due to the discrepancy in resolution scales. Your model might perform better if trained and validated on similar image scales. However, if you're achieving good results with your current setup, you can certainly continue using it!

Regarding predictions on high-resolution images, if the model successfully detects objects at this scale, it indicates robustness in your model's ability to generalize from lower to higher resolutions, which is great!

Keep up the good work, and let us know how further tests go! 👍

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

2 participants