Mahmoud Afifi

Staff Research Scientist at Samsung Research America

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 

Experience

Staff Research Scientist / Research Intern: Works on low-level computer vision, camera, and imaging technologies. As an intern, I contributed to My Filters feature (released in Samsung Galaxy S20) and developed techniques for color and exposure-error correction.

Camera Software Engineer / Student Researcher / Research Intern: Worked with Pixel team on color correction of Pixel phone cameras. As a student researcher/intern with the Gcam team, I worked on cross camera white-balance correction (C5).

Machine Learning / Camera Algorithms Engineer: Worked with Camera ISP Algorithm on color correction for iPhone cameras.


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.

Consultant: Worked on image harmonization. 

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

Research

I am interested in low-level computer vision and computational photography, focusing on color processing and enhancing photograph quality. Below are representative examples of my work. For a full list of publications, please take a look here.

Mostafa Hussien, Mahmoud Afifi, Kim Khoa Nguyen, and Mohamed Cheriet 

arXiv, 2024

In collaboration with ÉTS, University of Quebec

We introduce a data-driven unstructured pruning method that uses training data (or a subset of it) to estimate each weight's importance based on its contribution to the corresponding node's output. Preliminary experiments show that our method consistently produces more accurate models, even at high compression rates, compared to other approaches.

arXiv 

Abdelrahman Abdelhamed*, Mahmoud Afifi*, and Alec Go

arXiv, 2024

Google

With some prompt engineering, multimodal LLMs (e.g., Gemini) can perform zero-shot image classification. However, they may not consistently produce accurate target dataset labels. Our approach leverages multimodal LLMs & cross-modal embedding encoders to produce initial class prediction feature & image description feature alongside image feature, improving zero-shot image classification accuracy without the need for dataset-specific prompts. Our method outperforms prior methods across various datasets, achieving a 6.8% increase in accuracy on ImageNet.

* Equal contribution 

arXiv | Code & Data

Mahmoud Afifi, Zhenhua Hu, and Liang Liang

ECCV 2024

27.9% acceptance rate

Google

Utilizing the chromatic distortion present between long and short exposure frames of HDR photography, we introduce a compact guiding feature for illuminant estimators. Processed by just ~300 learnable parameters, it achieves results that match or surpass previous methods relying on thousands or even millions of parameters.

Paper | Supp. Materials | arXiv | Poster

Georgy Perevozchikov, Nancy Mehta, Mahmoud Afifi, and Radu Timofte

ECCV 2024

27.9% acceptance rate

In collaboration with University of Würzburg

Rawformer, an unsupervised Transformer-based encoder-decoder model for raw-to-raw mapping, enables the utilization of learnable camera ISP trained on a specific camera's raw images to render raw images taken by new cameras with different characteristics.

Paper | Supp. Materials | arXiv | Code

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

WACV 2022

35% acceptance rate

York University 

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

Abdullah Abuolaim, Mahmoud Afifi, and Michael S. Brown

WACV 2022

35% acceptance rate

York University 

Jointly learning to predict the two DP views from a single blurry input image improves the network’s ability to learn to deblur the image. Generating high-quality DP views can be used for other DP-based applications, such as reflection removal.

PDF | Supplementary Materials | arXiv | Code & Dataset | 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 

York University 

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 in collaboration with Heidelberg University

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

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

TPAMI 2021

Impact factor: 20.8 (2023)

York University 

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

York University 

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

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

ICCP 2020

York University 

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

* Equal contribution 

Paper | Code & Dataset | Talk

Atima Lui, Nyalia Lui, Mahmoud Afifi, and Ariadne Bazigos

US Patent 2020

My Nudest Inc

A system for analyzing user input, combining user's image(s) and query responses to provide tailored color outputs. Through color correction and comparison to predetermined color identifiers, it delivers accurate results and product recommendations.

Patent | PDF

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

ECCV workshops 2020

York University

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)

York University 

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)

York University 

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 

York University 

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

York University 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)

York University in collaboration with Adobe Research

A fully automated image recoloring without the need for target/reference images

Paper | Project Page | External Link | 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

York University 

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

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

CIC 2019 (Oral Presentation)

Best paper award

York University 

With a small modification to existing camera ISPs, we can achieve accurate post-capture white balance editing by embedding a set of mapping coefficients in the JPEG metadata.

Paper | Project Page | Code | Presentation | Patent Application

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

JOSA A 2019

Impact factor: 1.4 (2023)

York University in collaboration with University of East Anglia

A locally adaptive bias correction technique for illuminant estimation

Paper | Project Page | External Link | Code 

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

MDM 2018

Best paper award

York University 

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 Abdelrahman Abdelhamed 

JVCI 2019

Impact factor: 2.6 (2023)

Assiut University 

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

arxiv | Dataset

Mahmoud Afifi

MTA 2019

Impact factor: 3.0 (2023)

Assiut University 

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: 7.9 (2023)

Assiut University 

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

Mahmoud Afifi and Khaled F. Hussain

CVM 2016

Impact factor: 17.3 (2023)

Assiut University 

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

Assiut University 

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

External Link | Code 

Honors

Dissertation Award

Best Paper Award 

Outstanding Reviewer

Challenges

Others