Abstract: Highlights•Background adaptive PosMarker is suitable for locating watermarked regions in photos.•Visual quality and localization precision can be improved by joint optimization.•Dividing the image into patches helps to detect small objects.