@haoqiang
2018-08-24T04:29:04.000000Z
字数 2507
阅读 58
MINIVISION -- HaoQiang
Watermarks Removal
Super Resolution
For our face recongnition task on ID card images, the most challenging problem is watermarks, due to the occlusion and quality deterioration after adding watermarks.

Pipeline:

《Image-to-Image Translation with Conditional Adversarial Networks》
Generator (UNet)

Discriminator

Content Loss (L1)
Adversarial Loss
Component Loss
Concate by Add《MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications》



The calculation of standard conv:
The calculation of depthwise separable conv:
calculation reduction
If depthwise conv's size is set to 3 x 3 (), it will use between 8 to 9 times less computation than standard conv.
| Model | Model Size | Speed (CPU) |
|---|---|---|
| Model Before Compression | 122.6 MB | 112ms |
| Model After Compression | 0.63 MB | 37ms |

process
Train model and save weights --> Define testing graph and load weights --> Froze graph and export '.pb' file --> use opencv dnn modules by c++
net = dnn::readNetFromTensorflow(model);imputBlob = blobFromImage(img);output = net.forward("generator/tanh");
Notice:
axis=3 not -1 ( for instance, tf.concat([feature1,feature2], axis=3) ).Because of the low resolution and quality decrease of images after compress encoding, we need to recovery clearer images to augment data and improve model performance.

Generator

Discriminator (Patch GAN)

《Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network》

《Is the deconvolution layer the same as a convolutional layer?》
tf.depth_to_space(x, scale=2)
Content Loss (perceptual)
《Perceptual Losses for Real-Time Style Transfer and Super-Resolution》
Component Loss
