esrgan_super_resolution
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseesrgan_super_resolution
esrgan_super_resolution
ESRGAN (Enhanced Super-Resolution GAN) aumenta la resolución de la foto del documento ×4, mejorando significativamente la calidad del face match en documentos con fotos de baja resolución o antiguas.
ESRGAN(增强型超分辨率GAN)可将证件照片的分辨率提升4倍,能显著提升低分辨率或老旧证件照片的人脸匹配质量。
When to use
适用场景
Aplicar cuando la foto extraída del documento tenga resolución menor a 100×100 píxeles o calidad BRISQUE > 50.
当从证件中提取的照片分辨率低于100×100像素,或BRISQUE质量得分大于50时使用。
Instructions
使用指南
- Instalar Real-ESRGAN: .
pip install realesrgan - Descargar modelo: — https://github.com/xinntao/Real-ESRGAN.
RealESRGAN_x4plus.pth - Inicializar: .
upsampler = RealESRGANer(scale=4, model_path='RealESRGAN_x4plus.pth', tile=0, tile_pad=10, pre_pad=0, half=True) - Aplicar: .
output, _ = upsampler.enhance(face_crop, outscale=4) - Redimensionar resultado al tamaño esperado por ArcFace (112×112).
- Usar solo cuando sea necesario para no añadir latencia innecesaria.
- 安装Real-ESRGAN:。
pip install realesrgan - 下载模型:— https://github.com/xinntao/Real-ESRGAN。
RealESRGAN_x4plus.pth - 初始化:。
upsampler = RealESRGANer(scale=4, model_path='RealESRGAN_x4plus.pth', tile=0, tile_pad=10, pre_pad=0, half=True) - 执行处理:。
output, _ = upsampler.enhance(face_crop, outscale=4) - 将处理结果调整为ArcFace要求的尺寸(112×112)。
- 仅在必要时使用,避免增加不必要的延迟。
Notes
注意事项
- Repositorio: https://github.com/xinntao/Real-ESRGAN
- usa FP16 en GPU, reduciendo memoria y aumentando velocidad.
half=True - Benchmark: mejora el face match score ~0.05-0.15 en fotos de documentos de baja calidad.
- 代码仓库:https://github.com/xinntao/Real-ESRGAN
- 会在GPU上使用FP16精度,可减少显存占用并提升运行速度。
half=True - 基准测试:针对低质量证件照片,可将人脸匹配得分提升约0.05-0.15。