-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add tests #239
Comments
Hello sir, I noticed this issue regarding eval bugs and the accuracy metric. I’ve reviewed the problem and have a clear approach to address it: Improving shape checks, Does this approach align with your expectations? |
Hello @mansipatil12345 👋 Thanks for your interest in the project! The current metrics implemented are working as intended, but adding safeguards like the ones proposed seems like a good idea. My only doubt, what do you mean by Refining per-class metric calculations? If you plan to work on said safeguards, please open another issue as this one is specific for adding tests. |
Thank you for reviewing my request and providing guidance. Based on your feedback, I will proceed with the following steps to address the issue: Shape Checks: Add robust checks to ensure predictions and ground truth tensors match in dimensions. This will prevent shape mismatches during metric computation. Handling Division by Zero: Introduce safeguards (e.g., conditional checks or np.where) to handle cases where a class has no ground truth samples (e.g., zero denominator). Metrics for such classes will return NaN to avoid errors and maintain clarity. Refining Per-Class Metric Calculations: Ensure that calculations for metrics like IoU and accuracy are correctly handled on a class-by-class basis. Validation Tests: Write unit tests to validate the fixes, ensuring all edge cases (e.g., missing classes, shape mismatches) are covered. Looking forward to your thoughts! |
Add automatic tests using pytest + github actions. A good starting point: metrics.py.
The text was updated successfully, but these errors were encountered: