Mahmoud Afifi

ML / Camera Algorithms Engineer at Apple

PhD in Computer Science, York University, Canada | Supervisor: Prof. Michael S. Brown

MSc in Information Technology, Assiut University, Egypt | Supervisor: Prof. Khaled Hussain

Email: m.3[last name][at]gmail[dot]com

CV | Linkedin | Google Scholar | ResearchGate | GitHub | Mathworks | Twitter | Instagram

Experience

Machine Learning / Camera Algorithms Engineer: Works on camear ISP color processing and rendering.

Student Researcher / Research Intern: Worked with Gcam team on auto white-balance correction.

Research Intern: Contributed to My Filters feature (released in Samsung Galaxy S20) and developed techniques for color and exposure-error correction.

Consultant: Worked on image harmonization.

Computer Vision R&D Engineer / Consultant: Developed an ML algorithm for skin color correction and consulted on hairstyle editing and hair color matching used in LUXY HAIR virtual demo.

Research Engineer / Consultant: Developed the color correction module in NUDEMETER and consulted on skin tone analysis.

Post-doc Visitor: Worked on raw image mapping, image stylization, and white-balance correction.


RA / TA / Demonstrator

Research

I am interested in low-level computer vision and computational photography. Much of my research is about color processing and enhancing photograph quality. Representative examples of my work are shown below. For my full list of publications, please check here.

Patents

Granted Patents

Patent Applications

----

Papers

Mahmoud Afifi, Marcus A. Brubaker, and Michael S. Brown

WACV 2022

35% acceptance rate

Mixed/single-illuminant scene white balancing does not necessarily require illuminant estimation. Instead, the problem could be bounded by a small set of predefined white-balance settings. Given that, we locally blend a set of small images rendered with different white-balance settings to generate the final corrected image.

Paper | Supp. Materials | arXiv | Code & Data | Poster | Presentation | Talk | Patent Application

Mahmoud Afifi, Jonathan T. Barron, Chloe LeGendre, Yun-Ta Tsai, and Francois Bleibel

ICCV 2021 (Oral Presentation)

25.9% acceptance rate | 3% oral presentation acceptance rate

Google Research

A self-calibration method for cross-camera color constancy through the lens of transductive inference: additional (unlabeled) images are provided as input to the model at test time, which allows the model to calibrate itself to the spectral properties of the test-set camera during inference.

Paper | Supp. Materials | arXiv | Code | Poster | Presentation | Presentation (PDF) | Talk | Google @ ICCV'21

Mahmoud Afifi, Marcus A. Brubaker, and Michael S. Brown

CVPR 2021

23.4% acceptance rate

HistoGAN is the first work to control colors of GAN-generated images based on features derived directly from color histograms. Our method learns to transfer the color information encapsulated in histogram features to the colors of a GAN-generated images (HistoGAN) or real input images (ReHistoGAN). As color histograms provide an abstract representation of image color that is decoupled from spatial information, our HistoGAN and ReHistoGAN are less restrictive and suitable across arbitrary domains.

Paper | Supp. Materials | arXiv | Code & Dataset | Colab (histogram loss) | Poster | Presentation | Talk

Mahmoud Afifi, Konstantinos G. Derpanis, Björn Ommer, and Michael S. Brown

CVPR 2021

23.4% acceptance rate

Samsung Research

A single coarse-to-fine deep learning model with adversarial training to correct both over- and under-exposed photographs.

Paper | Supp. Materials | arXiv | Code & Dataset | Poster | Presentation | Talk | Samsung Research Post | Patent Application

Mahmoud Afifi, Abdelrahman Abdelhamed, Abdullah Abuolaim, Abhijith Punnappurath, and Michael S. Brown

TPAMI 2021

Impact factor: 16.389

Learning an accurate camera-rendering linearization gives a significant improvement for different computer vision tasks (e.g., denoising, deblurring, and image enhancement).

Paper | arXiv | Supp. Materials | External Link | Code & Dataset

Mahmoud Afifi and Abdullah Abuolaim

BMVC 2021

A semi-supervised method to map between two different camera-raw spaces. Training requires an unpaired set of images besides a very small set of paired images taken by these two camera models.

arXiv | Dataset | Presentation

Mahmoud Afifi and Michael S. Brown

CVPR 2020 (Oral Presentation)

22.1% acceptance rate | 5.7% oral presentation acceptance rate

Samsung Research

A multi-task deep learning model for post-capture white-balance correction and editing

Paper | Supp. Materials | arXiv | Code | Presentation | Talk | CVPR Daily Magazine | Samsung Research Post | Samsung Newsroom | Patent Application

Abhijith Punnappurath, Abdullah Abuolaim*, Mahmoud Afifi*, and Michael S. Brown

ICCP 2020

A symmetry property of dual-pixel kernels for unsupervised depth estimation

* Equal contribution

Paper | Code & Dataset | Talk

Majed El Helou, Ruofan Zhou, Sabine Süsstrunk, Radu Timofte, Mahmoud Afifi, et al.,

ECCV workshops 2020

Runner-Up Award overall tracks

As an intermediate stage, producing a uniformly-lit white-balanced image could help to eventually produce high-quality relit images.

arXiv | Code | Certificate

Mahmoud Afifi and Michael S. Brown

CIC 2020 (Oral Presentation)

A simple method to link the nonlinear white-balance correction functions, introduced in our CVPR'19 work, to the user's selected colors to allow interactive white-balance manipulation

arXiv | Code | Presentation

Hoang Le, Mahmoud Afifi, and Michael S. Brown

CIC 2020 (Oral Presentation)

Having additional wide-gamut metadata, available during color space conversion, greatly assists in constructing a locally weighted color mapping function to convert between color gamuts.

Paper | Code & Dataset

Mahmoud Afifi and Michael S. Brown

ICCV 2019

25% acceptance rate

Deep learning models can be fooled by white-balance errors and their accuracy can be improved by augmented images with different white-balance settings.

Paper | Supp. Materials | arXiv | Project Page | Code | Colab

Mahmoud Afifi, Brian Price, Scott Cohen, and Michael S. Brown

CVPR 2019

25.2% acceptance rate

In collaboration with Adobe Research

The first work to directly address the problem of incorrectly white-balanced images; requires a small memory overhead and it is fast.

Paper | Project Page | Supp. Materials | Demo | Video | Code | Dataset | Adobe Research Post | Patent

Mahmoud Afifi, Brian Price, Scott Cohen, and Michael S. Brown.

Eurographics 2019 (Short Papers)

In collaboration with Adobe Research

A fully automated image recoloring without needing for target/reference images

Paper | Project Page | Code | Supp. Materials | Presentation | Fast-Forward Video | Adobe Research Post

Mahmoud Afifi and Michael S. Brown

BMVC 2019 (Oral Presentation)

28% acceptance rate | 5% oral presentation acceptance rate

Learning a new canonical space in an unsupervised manner allows us to train a single deep model on multiple camera sensors and perform accurate illuminant estimation for images captured by new unseen camera sensors in the inference phase.

Paper | Project Page | Supp. Materials | arxiv | Code | Presentation | Talk | Patent Application

Mahmoud Afifi, Abhijith Punnappurath, Abdelrahman Abdelhamed, Hakki Can Karaimer, Abdullah Abuolaim, and Michael S. Brown

CIC 2019 (Oral Presentation)

Best paper award

With a small modification on existing camera ISPs, we can easily get accurate post-capture white-balance editing.

Paper | Project Page | Code | Presentation | Patent Application

Mahmoud Afifi, Abhijith Punnappurath, Graham Finlayson, and Michael S. Brown

JOSA A 2019

A locally adaptive bias correction technique for illuminant estimation

Paper | Project Page | Code

Mahmoud Afifi and Abdelrahman Abdelhamed

JVCI 2019

Gender classification can be improved using different facial features; our finding is validated by a user study.

arxiv | Dataset

Mahmoud Afifi

MTA 2019

Hand images can efficacy be used for gender recognition and biometric identification; a large dataset of hand images enables us to train our two-stream deep model.

arxiv | Project Page & Dataset | Code

Khaled F. Hussain, Mahmoud Afifi, Ghada Moussa

ITS 2018

Impact factor: 6.492

In generic vehicle classification tasks, deep learning models tend to not rely on color information and filter out unnecessary details information in high-resolution images.

Paper | External Link

Abdullah Sawas*, Abdullah Abuolaim*, Mahmoud Afifi, and Manos Papagelis

MDM 2018

Best paper award

Efficient discovery of evolving groups of pedestrians; a new group pattern is introduced in the journal version.

* Equal contribution

Project Page | Poster | Journal Version

Mahmoud Afifi and Khaled F. Hussain

CVM 2016

Bleeding artifacts caused by Poisson image editing can be reduced by a simple two-stage blending approach.

Paper | Project Page | Code | Video

Conference version: Paper | Project Page | Code | Video

Mahmoud Afifi, Khaled F. Hussain, Hosny M. Ibrahim, and Nagwa M. Omar

ISPACS 2015

In many scenarios, image registration and blending can help to get a fast video completion.

External Link | Code

Awards & Honors

Dissertation Award

Best Paper Award

    • The 27th IS&T Color and Imaging Conference, 2019 (CIC27)

    • IEEE International Conference on Mobile Data Management, 2018 (MDM'18)

Outstanding Reviewer

    • IEEE/CVF International Conference on Computer Vision, 2021 (ICCV'21)

    • IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2020 (CVPR'20)

    • Honourable Mention at British Machine Vision Conference, 2019 (BMVC'19)

Challenges

Other Awards