import timm # all other pytorch imports # Not used but necessary when running on images transforms = T.Compose([ T.Resize((256, 256)), T.ToTensor(), T.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]) ]) # Create model model = timm.create_model('efficientnet_b3a', pretrained=False, num_classes=2) model.classifier = nn.Sequential( nn.Linear(in_features=1536, out_features=625), nn.ReLU(), nn.Dropout(p=0.3), nn.Linear(in_features=625, out_features=256), nn.ReLU(), nn.Linear(in_features=256, out_features=2) ) # Load model weights state_dict = torch.load('./model.pt') model.load_state_dict(state_dict).eval().to(device) # Sample Image im = torch.randn(8, 3, 256, 256) with torch.no_grad(): pred = model(im) syms = F.softmax(pred, dim=1).detach().cpu().numpy().tolist() for water_sym, clear_sym in syms: # Do whatever you want with the watermark simlarity
image local contrast enhancement, for removing hard-to-detect watermarks
maybe you can use the same trick (context preserving sliding window) from your search engine to here (image preprocessing)!
mclahe NumPy and Tensorflow implementation of the Multidimensional Contrast Limited Adaptive Histogram Equalization (MCLAHE) procedure
deepcontrast A deep learning-based fully-automatic intravenous contrast detection tool for head-and-neck and chest CT scans.
mirnetv2 (TPAMI 2022) Learning Enriched Features for Fast Image Restoration and Enhancement. Results on Defocus Deblurring, Denoising, Super-resolution, and image enhancement
pymusica is a contrast enhancement approach involving non linear mapping of Laplacian pyramid.
imWeightedThresholdedheq attempts to enhance contrast of a given image or video by employing a method called weighted thresholded histogram equalization (WTHE).