Training Object Detection model on just 10 images

I am trying to train an object detection model using Mask-RCNN with Resnet50 as backbone. I am using the pre-trained models from PyTorch's Torchvision library. I have only 10 images that I can use to train. Of the same 10 images, I am using 3 images for validation. For the evaluation, I am using the evaluation method used in COCO dataset which is also provided as .py scripts in the TorchVision's github repository.

To have enough samples for training, I am oversampling the same 10 images by a factor of 100 i.e. I end up with 1000 images that I can use to train my model. Similarly, I end up having 300 images that I can use for validation.

Now, the problem is that I am getting 0% mAP after train and 0% recall. I have two questions:

Q1. Why would it return 0% mAP?

If it has something to do with the fact that I am oversampling to a large extent, then my next question is

Q2. Shouldn't the oversampling just cause the model to Overfit and instead provide a higher training as well as validation accuracy for my case (since I have picked the validation data from the training data itself?

Topic faster-rcnn object-detection pytorch overfitting training

Category Data Science


From the comments, it sounds like all you want to do is detect the images you have. That makes this an easy problem.

If a given image is the same as an image you have, return the information (such as a category) for that image. If the given image does not match an image you have, do not return such information.

In Python, that would be something like this.

if image in list_of_images:
    return(label)
else:
    return

Consider using data Augmentation first, you'll have a couple of hundred new images for you to work with, then add some noisy images since to avoid over-fitting. This way you'll have better results.

About

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