Search code examples
conv-neural-networkobject-detectionimage-recognitionyolo

CNN Object detection and training with watermarked images, will it work?


I was wondering if training a CNN like YOLO for object detection tasks of pandas using watermarked images (with watermark 1.under the image or 2.over it or 3.diffused) would significantly affect the accuracy of the model, when tested against non watermarked images.

Also, more specifically, if the watermark is in the image, but outside of the region of the object I want to detect (like example 1. or eventually 3.), how would this affect the end result?

Thanks


Solution

  • YOLO probably will be able to tackle noise problem, but still it's not the best dataset that you can make. For better accuracy I suggest you to use YoloV3-SPP (Spatial Pyramid Pooling) model. You can use SPP model from this popular repo https://github.com/AlexeyAB/darknet.

    In darknet/cfg/yolov3-spp.cfg you can see there's SPP block addition :

    ### SPP ### 
     [maxpool] 
     stride=1 
     size=5 
    
     [route] 
     layers=-2 
    
     [maxpool] 
     stride=1 
     size=9 
    
     [route] 
     layers=-4 
    
     [maxpool] 
     stride=1 
     size=13 
    
     [route] 
     layers=-1,-3,-5,-6 
    
     ### End SPP ### 
    

    SPP uses downsampling (stride=2) in Convolutional layers + use 3 different size max pool to the same image and get the best features in Max-Pooling layers. I think by adding Max pooling layer it will reduce some noises from the image by selecting only maximum values and important features from the image.