Method for detecting and counting individuals in a crowd

The method enhances head detection and counting in crowds by using a convolutional neural network with tiling and thresholding, addressing underestimation issues in high-density crowds, thereby improving accuracy and reliability.

FR3153679B1Active Publication Date: 2025-09-19IDEMIA PUBLIC SECURITY FRANCE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
FR2023010410
Authority / Receiving Office
FR · FR
Patent Type
Patents
Current Assignee / Owner
Filing Date
2023-09-29
Publication Date
2025-09-19
Estimated Expiration
2043-09-29

AI Technical Summary

Technical Problem

Existing methods for detecting and counting individuals in crowds, particularly those using artificial vision tools, often underestimate the number of individuals, especially in high-density crowds, due to issues like box elimination and merging of overlapping heads.

Method used

A computer-implemented method using a convolutional neural network trained on annotated images with a tiling process and thresholding, which includes a Voronoi decomposition and sub-cell reduction to improve head detection and counting accuracy.

Benefits of technology

The method significantly reduces errors in counting individuals, especially in dense crowds, by accurately separating and identifying heads, achieving improved precision and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000019_0000
    Figure 00000019_0000
  • Figure 00000019_0001
    Figure 00000019_0001
  • Figure 00000020_0000
    Figure 00000020_0000
Patent Text Reader

Abstract

A computer-implemented method (2000) for locating and counting individuals in a crowd (1001), said method (2000) takes, as input data, one or more images (1000) of a crowd (1001) of individuals, and provides, as output data, one or more binary images (5000) of related components (5001a-z) corresponding to the heads of the individuals in the crowd (1001), said method (2000) comprises the following steps: (a) providing (2001) a convolutional neural network (CNN) previously trained on a training set (TDS) composed of images (3000) of crowds (3001) of individuals whose heads (3001a-z) are annotated, the annotations of each image of said TDS training set having previously been modified using a cell tiling process adjacent (3002a-z);(b) generating (2002), for each image (1000) of a crowd provided as input data, a prediction map (PM) processing said image (1000) by the convolutional neural network (CNN) provided in step (a); (c) binarizing (2003) each prediction map (PM) generated in step (b) using a binarization module (BM) configured to generate a threshold value (T) or a map (TM) of threshold values ​​specific to said prediction map PM, each binarized prediction map (BPM) being a binary image (5000) of related components (5001a-z) corresponding to the heads of the individuals.;
Need to check novelty before this filing date? Find Prior Art

Description

Title of the invention: Method for detecting and counting individuals in a crowd Technical field

[0001] The present invention relates to a method and system for detecting and counting individuals forming a crowd. Technical background

[0002] The detection and counting of individuals forming a crowd in common spaces open to the public such as streets, stations, airports, squares, forums, places of pilgrimage, exhibition venues, concert halls and other events, are today part of the actions at the basis of so-called reasoned crowd management. This reasoned management covers the implementation of a certain number of means of intelligence, organization, equipment and logistics. These means extend, for example, from simple journalistic reporting for audience measurement to administrative or police measures for public safety and security, including the regulation of site attendance or the evacuation of people in the event of incidents.Statistical studies based on these actions can also provide essential lessons for establishing and / or optimizing fire evacuation plans, designing suitable space layouts or organizing traffic circuits to streamline crowd movements. They also form a framework for studying, modeling and anticipating collective behavior during crowd movements.

[0003] Crowds have very diverse densities and spatial distributions, and are generally not homogeneous. They may in particular spread out around furniture, building elements, landscape elements such as trees and shrubs, or other objects, such as parked or moving vehicles. For example, a crowd may simply consist of a group of scattered pedestrians walking along a street, a dense group of runners or walkers during a marathon or demonstration, or a group of substantially static individuals during a concert or festival.

[0004] Various methods for detecting and counting crowds are currently being developed. Some of them are based on artificial vision tools, ("computer vision"), in particular on the analysis of images or video sequences acquired by acquisition devices previously placed in common areas. Others exploit the signals of the various mobile electronic telecommunications devices with which people are currently equipped, or the variations telecommunication signals caused by variations in the number of individuals or their movement. Still others combine the analysis of several sources of information from images or video sequences to telecommunication signals and thermal mapping.

[0005] CN 102750539 A, SHENZHEN HIETECH ENERGY TECHNOLOGIES CO LTD, 24.10.2012 describes a method for counting individuals based on the analysis of video images and infrared images.

[0006] WO 2016 155769 Al, TELECOM ITALIA SPA [IT], 06.10.2016 describes a method for counting individuals in a geographical area during a given period from the signals of mobile telecommunications devices with which the individuals are equipped.

[0007] CN 107657226 A, UNIV ELECTRONIC SCI & TECH CHINA, 02.02.2018 describes a method for counting individuals in a crowd based on a convolutional neural network trained on the annotated training data set Shanghai Tech.

[0008] CN 116012335 A, SHANDONG UNIVERSITY OF SCIENCE & TECHNOLOGY, 25.04.2023 describes a method for counting individuals in a crowd based on the combined analysis of images of the crowd and channel status information of the Wi-Fi signal deployed in the room in which the crowd is located.

[0009] The main disadvantage of methods based on the exclusive or partial exploitation of telecommunications signals is that they rely on third-party databases which are not always easily accessible to telecommunications operators. Furthermore, in order to preserve the confidentiality and privacy of individuals, these data often require prior anonymization processing for which the absence of data leakage is, however, never completely guaranteed. For these reasons, these methods, however effective they may be, are rarely used, and those based on the analysis of images or video sequences are preferred.

[0010] Among the methods involving artificial vision tools, heuristic algorithms configured to locate the heads of individuals in a density map or a prediction map provide very promising results, particularly since large annotated training data sets such as Shanghai Tech, UCF-QNRF or NWPU-Crowd are available.

[0011] In this regard, Gao et al., Learning Independent Instance Maps for Crowd Localization, arXiv preprint arXiv:2012.04164 (2020), describes a method for locating and counting individuals in a crowd in which a heuristic approach is combined with binary semantic segmentation into connected components surrounding or encompassing the heads of individuals. This method implements a network of the HRNet (“High-Resolution Network”) type or of the VGG (“Visual Geometry Group”) type combined with a FPN (Feature Pyramid Network) previously trained on a set of crowd images whose heads of individuals are annotated using boxes which, when they overlap, are resized so that the distance separating them is greater than a quarter of their width or height. Before training, for each image, the corresponding annotations are used to create a binary image, called "Independent Instance Maps" (IIM): the value of the pixels of the regions of the images corresponding to the boxes are fixed to 1, that of the pixels corresponding to their background is fixed to 0. These IIM binary images are used to supervise the training of a semantic segmentation task, via an MSE-type loss function.

[0012] The neural network produces prediction maps, also called confidence maps, whose pixel values ​​are probabilities of belonging or not belonging to a region of the heads of the individuals. The method further comprises a binarization module configured to perform thresholding of the prediction maps using a thresholding map predicted on the fly by a suitable encoder. At the end of this processing, the connected components are detected on the binary maps produced and are modeled in the form of bounding boxes. Summary of the invention Technical problem

[0013] The method described by Gao et al., Learning Independent Instance Maps for Crowd Localization, arXiv preprint arXiv:2012.04164 (2020) improves the detection and counting of individuals in images of dense crowds whose sizes and scales vary greatly due to perspective effects.

[0014] However, this method suffers from the major drawback of underestimating the number of individuals, particularly when crowds have a very high density of individuals. This drawback has several origins. It has been found that some of the boxes corresponding to the heads of individuals may be considered by the algorithm as "too small" and be unduly eliminated. Sometimes, particularly for particularly dense crowds, the method fails to correctly separate the boxes when they overlap. Even when it succeeds, if the boxes are too close to each other, they ultimately end up being merged together during inference. Technical solution

[0015] In a first aspect of the invention, there is provided a computer-implemented method of locating and counting individuals in a crowd, said method taking, as input data, one or more images of a crowd of individuals, and providing, as output data, one or more binary images of related components cor responding to the heads of the individuals in the crowd, the said method comprises the following steps: (a) providing a convolutional neural network previously trained on a training set composed of images of crowds of individuals whose heads are annotated, the annotations of each image of said training set having previously been modified using a tiling process in adjacent cells; (b) generating, for each image of a crowd provided as input data, a prediction map by processing said image by the convolutional neural network provided in step (a); (c) binarizing each prediction map generated in step (b) using a threshold value or a map of threshold values, each binarized prediction map being a binary image of connected components corresponding to the heads of the individuals.

[0016] Other advantageous embodiments are described below.

[0017] In a second aspect of the invention, there is provided a data processing device for implementing a method according to the first aspect of the invention.

[0018] In a third aspect of the invention, there is provided a computer program comprising instructions which, when the program is executed by a computer, cause the computer to implement a method according to the first aspect of the invention.

[0019] In a fourth aspect of the invention, there is provided a computer-readable recording medium comprising instructions which, when executed by a computer, cause the computer to implement a method according to the first aspect of the invention.

[0020] In a fifth aspect of the invention, there is provided a system for implementing a method according to the first aspect of the invention. Brief description of the drawings

[0021] [Fig-1] is an image of a crowd of individuals.

[0022] [Fig.2] is a flowchart of a method according to the first aspect of the invention.

[0023] [Fig.3] is an image of a crowd of individuals after a tiling treatment into adjacent cells in accordance with the first aspect of the invention.

[0024] [Fig.4] is a schematic representation of a tiling in adjacent cells.

[0025] [Fig.5] is an example of a binary image of connected components corresponding to the heads of individuals obtained using a method according to the first aspect of the invention applied to [Fig.l].

[0026] [Fig.6] is a schematic representation of annotations of an individual's head in an image of a crowd.

[0027] [Fig.7] is a schematic representation of a reduction in the size of boxes annotation in superposition condition.

[0028] [Fig.8] is an example of a binary image obtained at the end of a tiling treatment applied on [Fig.3].

[0029] [Fig.9] is a schematic representation of a tiling in adjacent cells after reduction into sub-cells.

[0030] [Fig. 10] is an image of a crowd of individuals whose heads are marked with of points corresponding to the centers of gravity of rectangular boxes enclosing the heads.

[0031] [Fig.11] is the image of a crowd of [Fig.10] after a paving treatment in adjacent cells.

[0032] [Fig. 12] is the image of [Fig. 11] after reduction of adjacent cells into sub- cells.

[0033] [Fig. 13] is the image of [Fig. 12] in which the heads of the individuals are annotated using rectangular boxes enclosing the heads.

[0034] [Fig. 14] is a binary image obtained from [Fig. 12] by the intersection of the sub-cells with rectangular boxes forming annotations.

[0035] [Fig. 15] is a schematic representation of a data processing device for implementing a method according to the first aspect of the invention. Detailed description of the embodiments

[0036] For the purposes of the present invention, the term "image of a crowd of individuals" should be understood to mean an image, such as a photograph or a video extraction, on which is represented a plurality of individuals whose heads and possibly certain facial elements are visible or discernible. The density of individuals, that is to say the number of individuals per unit of surface area in the image, is variable. A crowd is generally said to be sparsely dense when the number of individuals in the image is between 25 and 100, it is said to be moderately dense when it is between 100 and 250, and it is said to be very dense when it is greater than 250. Preferably, the images are perspective crowd images in which the individuals are at different depths of field.

[0037] An example image 1000 of a crowd 1001 in perspective is shown in [Fig.l]. A first individual 1001a appears in the foreground in the middle of the image, and a denser group 1001b of individuals is visible on the right in the background. Their head and sometimes certain elements of their face are discernible.

[0038] With reference to [Fig.l] to 5, according to a first aspect of the invention, there is provided a computer-implemented method 2000 for locating and counting individuals in a crowd 1001, said method 2000 takes, as input data, one or more images 1000 of a crowd 1001 of individuals, and provides, as output data, one or more binary images 5000 of related components 5001a-z cor corresponding to the heads of the individuals of the crowd 1001, said method 2000 comprises the following steps: (a) providing 2001 a convolutional neural network CNN previously trained on a TDS training set composed of images 3000 of crowds 3001 of individuals whose heads 3001a-z are annotated, the annotations of each image of said TDS training set having previously been modified using a tiling process in adjacent cells 3002a-z; (b) generating 2002, for each image 1000 of a crowd provided as input data, a PM prediction map by processing said image 1000 by the CNN convolutional neural network provided in step (a); (c) binarizing 2003 each PM prediction map generated in step (b) using a threshold value T or a threshold value map TM specific to said PM prediction map, each binarized BPM prediction map being a binary image 5000 of related components 5001a-z corresponding to the heads of the individuals.

[0039] With reference to [Fig. 3], in step (a), a convolutional neural network CNN is trained on a TDS training data set composed of images 3000 of crowds 3001 of individuals whose heads 3001a-z are annotated. The annotation of the heads is generally carried out manually or automatically in the form of distinctive signs affixed to the image so as to identify and locate the heads. The annotations can be incorporated directly into the image or, more commonly, be provided in the form of masks, for example binary masks, which, when superimposed on the images, identify and locate the heads. The distinctive signs forming the annotations can have different shapes.

[0040] With reference to [Fig. 6], according to one embodiment, in step (a) the heads 3001a of the individuals of the images 3000 of the TDS training set are annotated using boxes 6000 encompassing said heads 3001a-z. [Fig. 6] is deliberately simplified for purely illustrative purposes to represent only a single head surrounded by an annotation box. For a complete crowd of individuals, a box surrounds each of the heads. An example of a training set comprising annotations in the form of a box encompassing the heads is the NWPU-Crowd set, which can be advantageously used for training the CNN convolutional neural network of said step (a).

[0041] With reference to [Fig.7], according to another embodiment, in step (a) the heads 3001a-z of the individuals of the images 3000 of the TDS training set are annotated using boxes 6000 centered on said heads 3001a-z, the size of the boxes 6000a, 6000b in the superposition condition are reduced so that the distance, d, separating them is greater than a quarter of their smallest dimension, La, Lb, Ha, Hb. As an example, for rectangular-shaped boxes, such as those illustrated in the [Fig.7], the boxes 6000a, 6000b in the superposition condition can be reduced so that the distance d separating them is greater than a quarter of their smallest dimension among their width La, Lb or their height Ha, Hb. [Fig.7] is deliberately simplified for purely illustrative purposes to represent only two heads, each surrounded by a rectangular annotation box.

[0042] The operation of reducing the size of the annotation boxes can be implemented on any type of suitable training set such as, for example, the Shanghai Tech and UCF-QNRF sets. It has been found that such an operation before the tiling processing improves the performance of the method with regard to the localization and counting of heads.

[0043] With reference to [Fig.3], in step (a) the annotations of each image of said TDS training set have previously undergone a tiling process into adjacent cells 3002a-z. The tiling process is of any suitable type and allows a decomposition of the space of the images into adjacent cells.

[0044] According to a preferred embodiment, in step (a) the tiling is a Voronoi decomposition, also called Dirichlet tessellation. The cells obtained using such a decomposition are commonly called Voronoi polygons or Thiessen polygons. In this type of tiling, each adjacent cell 3002a-za for centroid 3003a-z a single point of the image representative of the head 3001a-z of an individual and is formed from the points of the image 3000 closest adjacent to said centroid 3003a-z. It has been found that a tiling treatment according to a Voronoi decomposition provides advantageous performance.

[0045] As an example, the tiling processing on the annotations can be implemented in the following manner. First of all, each image 3000 is decomposed into adjacent cells 3002a-z, each adjacent cell 3002a-z having as centroid 3003a-z a single point of the image representative of the head 3001a-z of an individual and is formed from the points of the image 3000 closest adjacent to said centroid 3003a-z. The single point representative of the head 3001a-z of an individual acting as centroid 3003a-z can be the center of a head and be obtained from the annotations of the image 3000. Then, an intersection operation is carried out between each cell of the decomposition into adjacent cells and the annotations such as bounding boxes.The intersection operation has the function of producing modified annotations from which a binary image can be derived, in which the pixels have a value of 1 (white pixels) if the pixels belong to the modified annotations or a value of 0 (black pixels) if the pixels are outside said annotations.

[0046] The CNN convolutional neural network trained in step (a) is of any suitable type. According to a preferred embodiment, the CNN convolutional neural network is a HRNet convolutional neural network. An example of an HRNet-like convolutional neural network is described in Wang et al. "Deep high-resolution representation learning for visual recognition." IEEE transactions on pattern analysis and machine intelligence 43.10 (2020): 3349–3364.

[0047] In step (b), the convolutional neural network CNN is applied to each image of a crowd 1000 provided as input data of the method 2000. A prediction map PM, also called an inference map, is generated for each image 1000, which is generally presented in the form of an image whose pixel value is a probability of the presence of a head identified and located by the convolutional neural network CNN.

[0048] In step (c), each prediction map PM is binarized using a threshold value T or a map of threshold values ​​TM specific to said prediction map PM, each binarized prediction map BPM being a binary image 5000 of related components 5001a-z corresponding to the heads of the individuals.

[0049] Typically, by way of example, the threshold value T or a threshold map TM can be generated by a binarization module from a feature map extracted from the convolutional neural network CNN used to generate the prediction map PM from the image 1000 provided as input.

[0050] In an exemplary embodiment, a binarization module BM may comprise - an adaptive encoder in the form of a BM-CNN convolutional neural network trained to generate, for each PM prediction map, a threshold value T or a TM threshold map from a feature map provided by the CNN convolutional neural network applied in step (b) on the image 1000 to generate said PM prediction map, and - a binarization layer in the form of a convolutional neural network configured to generate a binarized prediction map BPM from the prediction map PM generated in step (b) and the threshold value T or the threshold map TM generated by the adaptive encoder from said prediction map.

[0051] In [Fig. 5] is shown an example of an image 5000 of connected components 5001a-z obtained from the image of [Fig. 1] on which the method according to the first aspect of the invention has been applied. In the context of the present invention, by connected components is meant the connected components as defined in mathematical topology. In [Fig. 5] each connected component is formed from the space of the image corresponding to an individual head as it is located by the method according to the first aspect of the invention.

[0052] With reference to [Fig.9], according to certain preferred embodiments, in step (a), the tiling process comprises reducing each adjacent cell 3002a-z into a sub-cell 9001a-z, said sub-cell 9001a-z is inscribed in said adjacent cell 3002a-z and is separated from the other adjacent cells 3002a-z at the boundary F between said adjacent cell and the other adjacent cells by a separation zone G of a given width.

[0053] Reducing the cells 3002a-z into sub-cells 9001a-z makes it possible to reduce the connectivity of the cells by replacing the tiling in adjacent cells with a sub-tiling composed of separate and distinct sub-cells having as centroid the same unique points of the image representative of the head of an individual as that of the adjacent cells. It has been found that such sub-tiling contributes to more accurate training of the CNN convolutional neural network in identifying and counting the heads of individuals in an image of a crowd.

[0054] The width of the separation zone G can be fixed or variable. Fixed, it can be defined by a constant value previously chosen and applied uniformly to all sub-cells. Variable, it can be adapted for each sub-cell according to certain characteristics of the first adjacent neighboring cells.

[0055] As illustrated in [Fig.9], taking the example of sub-cell 9001e, the width of the separation zone G is the width between the contours of said sub-cell 9001e and those of the adjacent cells 3002a, b, c, d, n to the cell 3002e in which said sub-cell 9001e is inscribed. The sub-cell 9001e and the cell 3001e of which it is the reduction and in which it is inscribed have the same centroid 3003e. The total width of the separation zone between two adjacent sub-cells, for example between the two sub-cells 9001e and 9001b, is therefore equal to twice this width when it is fixed for all the sub-cells or to the sum of the separation widths on either side of the border F of the adjacent cells 3002b and 3002e when it is variable.

[0056] According to a particular embodiment, the width of the separation zone G is fixed. It is at most 5 pixels, preferably at most 2 pixels, or even at most 1 pixel. It has been found that these values ​​allow an advantageous separation of the sub-cells without excessively reducing their size. During its training on the training set, the convolutional neural network CNN benefits both from a maximum quantity of information relating to the areas of the images corresponding to the heads of the individuals and from an adequate separation to improve its ability to discern the heads in conditions of possible superposition.

[0057] According to other particular embodiments, the width of the separation zone varies for each sub-cell 9001e as a function either of certain characteristics of the adjacent first neighboring cells 3002a, b, c, d, n, or of certain characteristics of the adjacent cell 3001e of which it is the reduction and in which it is inscribed.

[0058] According to a first particular embodiment, for each sub-cell 9001a-z the width of the separation zone G is less than or equal to one eighth of the minimum value among the geometric dimensions of the annotations 6000 corresponding to the adjacent first neighboring cells of the adjacent cell in which the sub-cell is written, the number of first neighboring cells being at least 3, preferably at least 5. [Fig.8] provides an example of a binary image in which the width of the separation zone G between the sub-cells in accordance with this particular embodiment. The variations in width are illustrated by the variation in the thickness of the boundaries between the cells 3002a-z.

[0059] According to a second particular embodiment, the area of ​​the intersection of each sub-cell 9001a-z with the annotation 6000 associated with the adjacent cell 3002a-z in which said sub-cell 9001a-z is written is greater than or equal to half the area of ​​said annotation 6000.

[0060] A detailed example of the tiling process in accordance with certain embodiments of the first aspect of the invention is illustrated in [Fig. 10] to 14. With reference to [Fig. 10], an image 10000 of a crowd of individuals lOOOla-z is provided in which the heads of said individuals lOOOla-z are marked using points 10002a-z. These points correspond to the center of gravity of annotations in the form of rectangular boxes encompassing said heads. These rectangular boxes 13001a-z are illustrated in [Fig. 13].

[0061] With reference to [Fig. 11], the image 10000 of [Fig. 10] is subjected to a tiling process to form a second image 11000 decomposed into adjacent cells 1 lOOla-z, each adjacent cell 1 lOOla-z having as centroid a single point 10002a-z of the image representative of the head of an individual lOOOla-z and is formed from the points of the image 11000 closest adjacent to said centroid. In this case, the single point representative of the head of an individual lOOOla-z acting as centroid is constituted by the point 10002a-z marking the head of the individual lOOOOla-z.

[0062] With reference to [Fig. 12], the adjacent cells 1 lOOla-z of the image 11000 are then reduced into sub-cells 12001a-z. Each sub-cell 12001a-z is inscribed in the adjacent cell 1 lOOla-z of which it is the reduction. It is also separated from the other adjacent cells 11001a-z by a separation zone G of a given width. In the present example, the width of the separation zone G is equal to one eighth of the minimum value among the geometric dimensions of the annotations 13001a-z corresponding to the adjacent first neighboring cells of the adjacent cell in which the sub-cell is inscribed. The number of first neighboring cells is equal to 5. As indicated previously, with reference to [Fig. 13], the annotations are rectangular boxes 130001a-z encompassing the heads of the individuals. In [Fig. 13] are also shown, for illustration purposes, the sub-cells 12001a-z.

[0063] The intersection of the sub-cells 12001a-z with the rectangular boxes 13001a-z forming the annotations is then carried out. As explained previously, the intersection operation has the function of producing modified annotations from which a binary image can be derived, in which the pixels have a value of 1 (white pixels) if the pixels belong to the modified annotations or a value of 0 (black pixels) if the pixels are outside said annotations. The binary image 14000 derived from the intersection of the sub-cells 12001a-z with the annotation boxes 13001a-z is shown in [Fig. 14]. In this figure, the annotation boxes 13001a-z appear truncated. The truncated parts of the boxes 13001a-z correspond to the parts of said boxes in the condition of superposition with the separation zones G between the sub-cells 120001a-z.

[0064] When training a convolutional neural network, it is common practice to use an objective function, also called a "loss function" or "cost function", to quantify the deviation from the optimal solution. This function may include several terms, including at least one term used to characterize the deviation between an annotated image and a prediction map generated by the convolutional neural network from the same unannotated image during its training. An example of an objective function may be a pixel-wise L2 type function, also called a pixel-wise mean square error, or a pixel-wise cross-entropy type function between the annotated image and the prediction map.

[0065] According to certain embodiments, in step (a) the training of the convolutional neural network CNN comprises the use of an objective function, said objective function comprises a penalty parameter associated with the pixels of the image located on the common borders F of the adjacent cells 3001a-z and / or in the separation zones G between sub-cells 9001a-z.

[0066] According to an exemplary embodiment, the objective function may comprise several terms, such as quadratic differences, associated with each pixel of the image, each of the terms is assigned a penalty parameter in the form of a weighting factor whose value is higher when the pixels of the annotated image having undergone a tiling treatment and the pixels of the prediction map obtained from said image are located on the common borders of the adjacent cells of said image and / or in the separation zones of said adjacent cells. The value of the weighting factor may be fixed empirically or by a mathematical optimization method.

[0067] The method according to the first aspect of the invention is computer-implemented. With reference to [Fig.15], according to a second aspect of the invention, there is provided a data processing device 15000 comprising means for implementing a method according to any one of the embodiments of the first aspect of the invention.

[0068] An example of a means for executing the method is a device that can be instructed to automatically execute sequences of arithmetic or logical operations to perform tasks or actions. This device, also called a computer, can comprise one or more central processing units (CPUs) and / or one or more graphics processors (GPUs) 15001 as well as at least one control device adapted to the execution of these operations. It can also comprise other electronic components such as input / output interfaces 15002, non-volatile or volatile storage devices 15003, and communication buses for transferring data between internal components of the device or with external components. One of the input / output devices 15002 can be a user interface for human-machine interaction, for example a graphical user interface for displaying human-understandable information.

[0069] According to a third aspect of the invention, there is a computer program 115003 comprising instructions which, when the program is executed by a computer, cause the latter to implement a method according to any one of the embodiments of the first aspect of the invention.

[0070] Any type of programming language, compiled or interpreted, can be used to implement the steps of the method of the invention. The computer program can be part of a software solution, i.e. a collection of executable instructions, codes, scripts or others and / or databases.

[0071] According to a fourth aspect of the invention, there is provided a computer-readable recording medium 15003 comprising instructions which, when executed by a computer, cause the computer to implement a method according to any one of the embodiments of the first aspect of the invention.

[0072] The computer-readable storage medium 15003 is preferably a non-volatile memory, for example a hard disk or a solid-state drive. It may be a removable storage medium or a non-removable storage medium forming part of a computer.

[0073] The computer-readable recording medium 15003 may also be volatile memory within a removable medium. This may facilitate deployment of the invention in many production sites.

[0074] The computer-readable recording medium 15003 may be part of a computer used as a server from which executable instructions may be downloaded and, when executed by a computer, cause the computer to execute a method according to one of the embodiments described in the this document.

[0075] The computer program 115003 and the medium 15003 on which it is recorded may be implemented in a distributed computing environment, for example cloud computing. The instructions may be executed on a server to which one or more client computers may connect and provide encoded data as input data to a method according to any of the embodiments of the first aspect of the invention. Once the data has been processed, the result may be downloaded and decoded to the client computer or sent directly, for example, in the form of instructions.

[0076] According to a fifth aspect of the invention, there is provided a system for locating and counting individuals in a crowd. The system comprises: - a module for acquiring one or more images of a crowd of individuals; - a data processing device 15000 on any one of the embodiments of the second aspect of the invention and configured to receive and process one or more images acquired by the acquisition module.

[0077] The acquisition module is of any type suitable for acquiring one or more images of a crowd. It may be a digital camera or a digital video camera equipped with a CCD or CMOS type digital sensor.

[0078] According to a preferred embodiment, the acquisition module is configured for the acquisition of images of an aerial perspective image of a crowd of individuals. For example, the acquisition module may be a camera fixed on a mast at a height of between 1.5 and 5 meters. Examples

[0079] According to a first example of a method in accordance with the first aspect of the invention, in step (a), a convolutional neural network (CN) of the HRNet type is provided, trained on the NWPU-Crowd training set for a little over approximately 450 epochs. Before training, the annotations of the images in the training set were subjected to a tiling process in the form of a Voronoi decomposition in which each cell has as its centroid a single point of the image representative of the head of an individual. Each cell was then reduced to a sub-cell separated from the other adjacent cells by a separation zone with a width of 1 pixel. The annotations were modified by performing an intersection between said annotations and the sub-cells. Then, binary images were created from the modified annotations. These binary images served as target data for training the convolutional neural network.

[0080] The method according to this first example is applied to the images of the validation set corresponding to the NWPU-Crowd set. For each of these images, a prediction map is generated in accordance with step (b) of the method. This map is then binarized according to step (c) with a threshold value set to 0.5.

[0081] In a comparative example, the method described in Gao et al., “Learning In-dependent Instance Maps for Crowd Localization”, arXiv preprint arXiv:2012.04164v3, 2022 is used. The HRNT-type convolutional neural network of this example is trained on images from the same NWPU-Crowd training set. The images have not undergone any tiling processing. The method of this counterexample is then applied to images from the validation set corresponding to the NWPU-Crowd set.

[0082] Table 1 shows the values ​​of NAE, MAE and RMSE in the counting of the heads of individuals as obtained by the first example E1 in accordance with the invention and the counter-example CEI on images presenting crowds of individuals of different densities: 1 to 24 individuals, 25 to 100 individuals, 101 to 250 individuals, 251 to 500 individuals, and more than 500 individuals.

[0083] The NAE, "normalized absolute error", is the normalized absolute error. The MAE, "mean absolute error", is the average absolute error. The RMSE, "root mean square error", is the root mean square error. Tab. 1 NAE MAE RMSE Density [1.24] [25.100] [101.250] [251.500] [501 ; inf[ Total IEC 0.643 0.071 0.135 0.192 0.249 0.183 66.7 249.2 El 0.672 0.067 0.111 0.157 0.195 0.161 54.1 206.4

[0085] The results in Tab. 1 show that, compared to the counterexample method, a method according to the invention allows a significant average gain of 2.2% on the NAE error in counting individuals. This gain can reach 3.5% for high-density crowds. The gain on the RMSE error reaches 42.8 points. In other words, a method according to the first aspect of the invention is capable of locating and counting individuals that the method according to the counterexample does not allow. It is therefore more reliable and more accurate in counting individuals in a crowd, in particular a dense crowd whose number of individuals is greater than 25. References Patent literature

[0086] CN 102750539 A, SHENZHEN HIETECH ENERGY TECHNOLOGIES CO LTD, 24.10.2012.

[0087] WO 2016 155769 Al, TELECOM ITALIA SPA [IT], 06.10.2016.

[0088] CN 107657226 A, UNIV ELECTRONIC SCI & TECH CHINA, 02.02.2018.

[0089] CN 116012335 A, SHANDONG UNIVERSITY OF SCIENCE & TECHNOLOGY, 25.04.2023. Littérature non-brevet

[0090] Gao et al., “Learning Independent Instance Maps for Crowd Localization”, arXiv preprint arXiv:2012.04164v3, 2022.

[0091] Wang et al. "Deep high-resolution représentation learning for visual récognition." IEEE transactions on pattern analysis and machine intelligence 43.10 (2020): 3349-3364.

Claims

Claims

1. A computer-implemented method (2000) for locating and counting individuals in a crowd (1001), said method (2000) takes, as input data, one or more images (1000) of a crowd (1001) of individuals, and provides, as output data, one or more binary images (5000) of related components (5001a-z) corresponding to the heads of the individuals in the crowd (1001), said method (2000) comprises the following steps: (a) providing (2001) a convolutional neural network (CNN) previously trained on a training set (TDS) composed of images (3000) of crowds (3001) of individuals whose heads (3001a-z) are annotated, the annotations of each image of said TDS training set having previously been modified using of a tiling treatment in adjacent cells (3002a-z);(b) generating (2002), for each image (1000) of a crowd provided as input data, a prediction map (PM) by processing said image 1000 by the convolutional neural network (CNN) provided in step (a); (c) binarizing (2003) each prediction map (PM) generated in step (b) using a threshold value (T) or a threshold value map (TM), each binarized prediction map (BPM) being a binary image (5000) of connected components (5001a-z) corresponding to the heads of the individuals.;

2. Method (2000) according to claim 1, such that in step (a) the heads (3001a-z) of the individuals of the images (3000) of the training set (TDS) are annotated using boxes (6000) encompassing said heads (3001a-z).

3. Method (2000) according to claim 1, such that in step (a) the heads (3001a-z) of the individuals of the images (3000) of the TDS training set are annotated using boxes 6000 centered on said heads (3001a-z), the size of the boxes (6000a, 6000b) in superposition condition are reduced so that the distance, d, separating them is greater than a quarter of their smallest dimension, (La, Lb, Ha, Hb).

4. A method (2000) according to any one of claims 1 to 3, such that in step (a) the tiling is a Voronoi decomposition.

5. A method (2000) according to any one of claims 1 to 4, such that in step (a), the tiling process comprises reducing each adjacent cell (3002a-z) into a sub-cell (9001a-z), said sub-cell (9001a-z) is inscribed in said adjacent cell (3002a-z) and is separated from the other adjacent cells (3002a-z) at the border (F) between said adjacent cell and the other adjacent cells by a separation zone (G) of a given width.

6. Method (2000) according to claim 5, such that the width of the separation zone is at most 5 pixels, preferably at most 2 pixels, or even at most 1 pixel.

7. Method (2000) according to claim 5, such that for each sub-cell (9001a-z) the width of the separation zone (G) is less than or equal to one eighth of the minimum value among the geometric dimensions of the annotations (6000) corresponding to the adjacent first neighboring cells of the adjacent cell in which the sub-cell is written, the number of first neighboring cells being at least 3, preferably at least 5.

8. Method (2000) according to claim 5, such that the area of ​​the intersection of each sub-cell (9001a-z) with the annotation (6000) associated with the adjacent cell (3002a-z) in which said sub-cell (9001a-z) is inscribed is greater than or equal to half the area of ​​said annotation (6000).

9. Method (2000) according to any one of claims 1 to 8, such that in step (a) the training of the convolutional neural network CNN comprises the use of an objective function, said objective function comprises a penalty parameter associated with the pixels of the image located on the common boundaries (F) of the adjacent cells (3001a-z) and / or in the separation zones (G) between sub-cells (9001a-z).

10. A method (2000) according to any one of claims 1 to 9, such that the convolutional neural network (CNN) is an HRNet convolutional neural network.

11. Data processing device (15000) comprising means for implementing a method (2000) according to any one of claims 1 to 10.

12. A computer program (115003) comprising instructions which, when the program is executed by a computer, cause the computer to implement a method (2000) according to any one of claims 1 to 10.

13. A computer-readable recording medium 10003 comprising instructions which, when executed by a computer, cause the computer to implement a method (2000) according to one of any of claims 1 to 10.

14. System for locating and counting individuals in a crowd, said system comprises: - a module for acquiring one or more images of a crowd of individuals; - a data processing device (15000) according to claim 11 and configured to receive and process one or more images acquired by the acquisition module.

15. The system of claim 14, such that the acquisition module is configured for image acquisition of an aerial perspective image of a crowd of individuals.