Search code examples
object-detectionfaster-rcnn

should I create json annotation for validation images?


I am trying to implement mask rcnn for my own dataset but couldnt find any info about annotations for the val folder that contains the images for validattion. I created json annotations using Via 2.0.8 for my training set and that make senese. but if the validation images are the images to test later on why to make annotations for them. I can't train my module without json file in the val folder.

I tried to copy the json annotation for training images to the validation folder. it worker I think but that means I should have the same amount of images in both training and val with same names as well.


Solution

  • You can take a look at this answer. Basically, you need validation set to validate the output and to measure the performance of your model. After the model is trained using the training set, the validation set is used to measure the model's performance in case of accuracy, average precision, etc. This means that the validation set needs to have similar annotation files (ground truth) as the training set, so that the result of the model's prediction can be compared to the true results defined by you. For example, the model performs segmentation on an image and outputs some result. This result is then compared with the annotation (the expected correct output) in the validation set to measure the accuracy of the model's prediction. The test set is just for you to test your model on and see how it is performing. However there is no exact measurements in the test set to calculate the performance and accuracy.

    In case of segmentation, one of the popular measurements is the dice score for which we need the annotations (in validation set) to calculate.