Can we calculate iou and mean iou with only images and labels and without train and test csv file

Are train and test CSV files necessary for calculating IoU (Intersection over Union) and Mean IoU. Can I calculate IoU with just images and labels?

Topic object-detection keras image-classification deep-learning

Category Data Science


The IoU is a metric that measures the similarity of two sets. In the context of object detection or semantic segmentation, the IoU compares the similarity among the ground truths samples and their counterpart predictions. Thus, what you need (in a general approach, you don't give any details) is:

  • Samples and their ground truth values (labels) for a given set (train, test, validation...)
  • The predictions for the samples of the given set
  • Obvious: in order to get the predictions you need a pre-trained model

Typically, you get the prediction $\hat{y_i}$ of a given sample $x_i$ in a given set, and compare it with the ground truh label $y_i$ with $IoU(\hat{y_i},y_i)$. Then, you can average the IoU over the whole dataset.

Answers

Are train and test CSV files necessary for calculating IoU (Intersection over Union)

At least one of them, but IoU does not compare the train with the test set. It compares the prediction for a sample with its ground truth.

Can I calculate IoU with just images and labels?

No, you need the predictions

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.