FIELD AND BACKGROUND OF THE INVENTION

The present invention, in some embodiments thereof, relates to detecting people wearing masks in impersonation attacks, and, more specifically, but not exclusively, to detecting people wearing masks in impersonation attacks based on face analysis in one or more infrared spectral ranges.

Imaging and video based applications ranging from online communication to access to devices and resources, for example, video conferences, video chats, online services, device access and/or the like have become highly common and popular in recent time with the constant and rapid advancement of technology, increased network availability and capacity, increased computing power and more.

Another major contributor to the constantly increasing demand for video based sessions is the fact that many human interactions have been replaced by video sessions, for example, work sessions, educational sessions, social activities and many more. This trend has significantly expanded under the constraints imposed during the COVID-19 epidemic during which travel and mobility of large segments of the population is highly limited.

However, while enabling direct, easy and immediate access and/or interaction, such video and/or imaging based applications, resources and/or services may need to be protected in order to prevent them from being exploited by potential malicious parties which may fraudulently impersonate as genuine and legitimate users for one or more malicious goals.

SUMMARY OF THE INVENTION

According to a first aspect of the present invention there is provided a computer implemented method of determining whether a user is wearing a mask, comprising using one or more processors for:Receiving one or more infrared images depicting a face of the user in one or more infrared spectral ranges and one or more visible light images depicting the face of the user in visible light spectral range.Registering the one or more infrared images to the one or more visible light images.Computing luminance values of a plurality of pixels relating to the face of the user in the one or more visible light images.Computing infrared reflectiveness values of corresponding pixels in the registered one or more infrared light images.Computing, for each of the pixels, a difference between the luminance value and the infrared reflectiveness value.Determining the user is genuine and not wearing a mask in case an aggregated difference aggregating the difference values of the pixels relating to the face exceeds a certain value.

According to a second aspect of the present invention there is provided a system for determining whether a user is wearing a mask, comprising one or more processor configured to execute a code, the code comprising:Code instruction to receive one or more infrared images depicting a face of the user in one or more infrared spectral ranges and one or more visible light images depicting the face of the user in visible light spectral range.Code instruction to register the one or more infrared images to the one or more visible light images.Code instruction to compute luminance values of a plurality of pixels relating to the face of the user in the one or more visible light images.Code instruction to compute infrared reflectiveness values of corresponding pixels in the registered one or more infrared light images.Code instruction to compute, for each of the pixels, a difference between the luminance value and the infrared reflectiveness value.Code instruction to determine the user is genuine and not wearing a mask in case an aggregated difference aggregating the difference values of the pixels relating to the face exceeds a certain value.

According to a third aspect of the present invention there is provided a computer program product for determining whether a user is wearing a mask, comprising one or more computer readable storage media having thereon:First program instructions executable by one or more processor to cause the one or more processor to receive one or more infrared images depicting a face of the user in one or more infrared spectral ranges and one or more visible light images depicting the face of the user in visible light spectral range.Second program instructions executable by the one or more processor to cause the one or more processor to register the one or more infrared images to the one or more visible light images.Third program instructions executable by the one or more processor to cause the one or more processor to compute luminance values of a plurality of pixels relating to the face of the user in the one or more visible light images.Fourth program instructions executable by the one or more processor to cause the one or more processor to compute infrared reflectiveness values of corresponding pixels in the registered one or more infrared light images.Fifth program instructions executable by the one or more processor to cause the one or more processor to compute, for each of the pixels, a difference between the luminance value and the infrared reflectiveness value.Sixth program instructions executable by the one or more processor to cause the one or more processor to determine the user is genuine and not wearing a mask in case an aggregated difference aggregating the difference values of the pixels relating to the face exceeds a certain value.

In a further implementation form of the first, second and/or third aspects, the certain value equals 25%.

In an optional implementation form of the first, second and/or third aspects, one or more light sources are operated to project light on the face of the user in one or more of a plurality of spectral ranges comprising visible light spectral range and one or more infrared spectral ranges.

In a further implementation form of the first, second and/or third aspects, the plurality of pixels relating to the face of the user are identified using one or more face detection algorithms.

In a further implementation form of the first, second and/or third aspects, the plurality of pixels relating to the face of the user are identified by computing a median difference value between the luminance value of each of a plurality of pixels of the one or more visible light images and the infrared reflectiveness value of the corresponding pixel in the one or more infrared images with respect to adjacent pixels using a sliding window comprising a group of pixels around the respective pixel.

In a further implementation form of the first, second and/or third aspects, the size of the sliding window is 5×5 pixels and is moved in 1 pixel steps.

In a further implementation form of the first, second and/or third aspects, the one or more infrared spectral ranges are members of a group consisting of: near infrared (NIR) having a wavelength in a range of 700-1000 nanometers and/or short wave infrared (SWIR) having a wavelength in a range of 1000-3000 nanometers.

In a further implementation form of the first, second and/or third aspects, registering the one or more infrared images to the one or more visible light images is based on a calibration of one or more imaging sensors configured to capture the one or more infrared images with respect to one or more imaging sensors configured to capture the one or more visible light images.

In a further implementation form of the first, second and/or third aspects, registering the one or more infrared images to the one or more visible light images is based on a depth analysis mapping the face of the user in the one or more infrared images compared to the one or more visible light images.

In a further implementation form of the first, second and/or third aspects, registering the one or more infrared images to the one or more visible light images is based on analysis of one or more facial features identified the face of the user in the one or more infrared images and in the one or more visible light images.

Other systems, methods, features, and advantages of the present disclosure will be or become apparent to one with skill in the art upon examination of the following drawings and detailed description. It is intended that all such additional systems, methods, features, and advantages be included within this description, be within the scope of the present disclosure, and be protected by the accompanying claims.

Unless otherwise defined, all technical and/or scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the invention pertains. Although methods and materials similar or equivalent to those described herein can be used in the practice or testing of embodiments of the invention, exemplary methods and/or materials are described below. In case of conflict, the patent specification, including definitions, will control. In addition, the materials, methods, and examples are illustrative only and are not intended to be necessarily limiting.

Implementation of the method and/or system of embodiments of the invention can involve performing or completing selected tasks automatically. Moreover, according to actual instrumentation and equipment of embodiments of the method and/or system of the invention, several selected tasks could be implemented by hardware, by software or by firmware or by a combination thereof using an operating system.

For example, hardware for performing selected tasks according to embodiments of the invention could be implemented as a chip or a circuit. As software, selected tasks according to embodiments of the invention could be implemented as a plurality of software instructions being executed by a computer using any suitable operating system. In an exemplary embodiment of the invention, one or more tasks according to exemplary embodiments of methods and/or systems as described herein are performed by a data processor, such as a computing platform for executing a plurality of instructions. Optionally, the data processor includes a volatile memory for storing instructions and/or data and/or a non-volatile storage, for example, a magnetic hard-disk and/or removable media, for storing instructions and/or data. Optionally, a network connection is provided as well. A display and/or a user input device such as a keyboard or mouse are optionally provided as well.

