Skip to content
Discussion options

You must be logged in to vote

OpenCV loads images in BGR format, whereas many deep learning frameworks and metrics libraries, including torchmetrics, typically expect images in RGB format. If you use torchmetrics image functions that assume RGB input, you should convert your images from BGR to RGB before passing them in. This is especially important if the metric calculations rely on color information, such as metrics computed on color channels separately.

If your processing or model pipeline already converts images to RGB internally or expects BGR format, then no additional conversion may be needed. But as a general practice, converting OpenCV images from BGR to RGB before using torchmetrics’ RGB-based metric functio…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Borda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants