{'fraction_non_alphanumeric': 0.04478267232547929, 'fraction_numerical': 0.008732133274793892, 'mean_word_length': 5.119402985074627, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Target identification for photon-counting image sensors, inspired by mechanisms of human visual perception

Paper presents the new objects identification/recognition method, designed for modern image sensors. One of the main features of the method proposed is that it is initially focused on presenting the input data as a discrete set of photocounts of image sensors. The developing of the method was based on the machine learning approaches, so the synthesized identification algorithms are principally focused on the modern embedded computations. The results of numerical simulation are given at the end of the paper.


Introduction
Besides such elements, as light detectors, modern (digital) image formation systems also contain microcontrollers, microprocessors, and special chips. The latter, apart from managing the detection of radiation falling onto the sensors, storing such recordings, adjusting the tone, maintaining the white balance, etc., also provide giant opportunities for further, more intelligent, processing of the registered images [1].
Essentially, the intelligent processing is analyzing images to extract specific data that may be important for some kinds of application, such as the computerized vision of industrial robots, automatic face or handwriting recognition, navigation of semi-autonomous or unmanned vehicles, etc. In theory, various tasks always require various image analysis methods. In practice, however, most analysis methods always include a number of general elements. Among such elements, object recognition methods should be mentioned first. Generally, recognition is the localization of objects in images and/or classification/identification thereof [2].
Today's recognition methods increasingly either include specific human vision mechanisms or try to imitate its structure [3]. The first group of methods comes with those using various preliminary image processing techniques that the retina is responsible for. Such methods include data compression, noise filtering, contrast, and edge enhancement, etc. Another group incorporates more intelligent methods that imitate cortex-based neurobiological visual information processing mechanisms. Machine learning methods are what should be mentioned first and foremost in this context, namely: subspace methods, slow feature learning, hierarchical feature analysis, etc. It should be noted that considerable results have been achieved so far in this field [5]. Therefore, the existing and known recognition methods implement and imitate human vision mechanisms with some higher or lower accuracy. However, registration data that are supposed to be processed by these methods, usually have different forms in the visual system and artificial image formation systems. The detected radiation is registered by microprocessors of most devices as digitalized intensity on discrete elements (pixels) of the imager. Intensity values are approximately proportional to the overall energy of photons accumulated by a pixel within the frame formation period and is expressed as an integer number varying across a wide range. Conversely, photoreceptor cells (rods and cones) of the retina, perceive only single radiation photons and convey registration signal further, to photosensitive ganglion cells, without accumulation. As a result, the asynchronous flow of action potentials (nerve impulses), constantly processed by the vision system, is formed [6].
Until quite recently, technological opportunities for creating image formation devices that would be similar in function to human vision systems were very restrained -this explains such a difference in data presentation between artificial and natural systems. However, research and development activities of the last decades led to well-known progress in developing image sensors (operating not only in the visible range), which opened up the whole new opportunities in this field. The major trend of this progress, which appeared in late 1960s with invention of charge-coupled devices (CCDs) and then established with invention of image sensors based on complementary metal-oxide-semiconductors (CMOS) in early 1990s, was related to the concern to decrease the pixel size (including the sizes lower than the diffraction limit). Together with enhancing the spatial resolution, this trend ensures the improvement of other registration features -e.g. increases the frame rate, widens the dynamic range, decreases the sensor size and lowers power consumption.
It should be noted that progressively as the pixel size decreases, radiation detection becomes more and more quantum, transforming into the detection of separate photons (photoelectrons) at the limit. Interestingly, this very limit has been reached by some technologies to datespecifically, production of photon-counting image sensors [7]. The vivid examples are electron-multiplying charge-coupled devices (EMCCD) [8], single-photon avalanche diodes (SPAD) [9], Geiger-mode avalanche photodiodes (GMAPD) [10].
In terms of formed images [11], a crucial feature of photon-counting sensors is that they eliminate the necessity for long-term exposingan image is not actually formed; instead, a time-continuous flow of photoelectrons with random data access is formed [12]. This is what significantly transforms the basic theoretical and practical concepts of image processing. For example, in traditional computerized vision tasks, the identification cycle goes step by step: first, photocounts are accumulated, then images are built with them and then analyzed. The photon-counting sensors allow combining data registration and processing, by making the identification procedure incremental, developing synchronously with counts registration. Such a concept eliminates the need for reconstructing the full image, bringing the new paradigm of "no-image vision" [12].
This paper presents the research results for the aforementioned concept of identifying (classifying) the registered objects by data regarding photocount flows of their radiation. By using photocount coordinates as input data, rather than images reconstructed based on them, it is possible to formally transform the primary task into the problem of the most optimal adjusting the registered data to one of the statistical descriptions of the previously-registered processes, which are called precedents [13]. This paper shows that the suggested approach can be developed up to the algorithmic implementation level. The synthesized identification algorithm, which is similar in structure to the algorithms of the well-known EM-family, is presented below.

The statistical description of photon-counting registration data
To make the suggested object identification approach statistically well-grounded, it is required to formalize how photon-counting sensors register object radiation. This leads to the necessity for a mathematical model that could adequately, in physical (quantum) terms associate the radiation intensity ( ⃗), coming on the sensitive surface Ω of the sensor with a set of registered photocount coordinates { ⃗ 1 , … , ⃗ }. Here, vector ⃗ ∈ Ω denotes point coordinates in some coordinate system in the plane of registration, ⃗ are pixel coordinates corresponding to photocounts.
If the sensor pixel sizes could be considered arbitrarily small, it would be an ideal case called continuous spatial photodetection [14]. In this case photocount coordinates { ⃗ } are the sets of random vectors (of random but finite number ), even for the deterministic, non-random intensity ( ⃗). The randomness of data is often interpreted as quantum/shot noise. As long as quantum noise is almost always the dominating noise source in the optic range of the spectrum [14], it is not reasonable to represent the intensity ( ⃗) by the object radiation intensity and additive background/noise, including the latter in the object description (if necessary).
The most common mathematical model of photon-counting sensor detection is random point processes [15]. According to the semi-classic photodetection theory, it is widely known that Poisson point processes (PPP) [15] are the appropriate processes that most adequately describe physical mechanisms of photon-counting registration [16]. For PPPs, full statistical description is defined by the only function -photocount intensity ( ⃗), which defines all finite-dimensional distributions of photocounts [15]: (1) The quantum theory specifies the relation between the PPP photocount intensity ( ⃗) and radiation intensity ( ⃗). This relation is given by simple linear equation where is the quantum efficiency of the sensor material, is the frame read time, ̅ is the center radiation frequency, ℎ is the Planck constant [14].
The mapping ( ⃗) → ( ⃗), together with distributions (1) define the mathematical model of the input-output relation ( ⃗) → { ⃗ } of an ideal (continuous) sensor. For real sensors with finite-size pixels, such a relation is obtained through pixel-surface integration of (1) accounting the number of photocounts detected by each of pixels. The real sensor model will be close to the ideal model (1) in cases when probabilities of two and more photocounts of a pixel are too low as compared with the probability of the single photocount. It can be easily shown that his condition is reduced to relation where is the pixel area. Therefore, during the detection of weak radiations ( ⃗) → 0, or at high shooting speed → 0, or for using the described in the introduction photon-counting sensors → 0, distributions (1) may be accepted as an adequate photocount detection model.
The primary task can be formalized even more if its statement is extended through clarifying the term of object identification. Supposing the object identification only by the form of their intensity, regardless of their full brightness (refer to [17] for a comprehensive discussion of this problem), the synthesis basis can be not distributions (1) with the arbitrary number of photocounts, but conditional distributions of photocount coordinates { ⃗ 1 , … , ⃗ }, for the given full number thereof : (2) Distributions (2) express the well-known PPP feature: the conditional (for fixed ) joint distribution of photocount coordinates is defined by the product of the identical distributions of coordinates of each photocount [15]. In other words, for the fixed , the photocounts { ⃗ } are the sample of independent identically distributed (iid) random vectors. Moreover, the distribution of sample data ( ⃗) (2) coincides with the (normed) intensity ( ⃗) ∫( ⃗) ⃗ ⁄ , i.e. does not depend either on the sensor material , or center radiation frequency ̅ , or detection time . The listed features make the distributions (2) independent of the specific technical sensor implementation details and very suitable for use as the general statistical basis for the approach formulated below.

Gaussian mixture model parameters for the precedent description
The suggested object identification approach is focused on machine learning methods [13], i.e. primarily, the precedents are represented as the photocount sets (registered during learning), whose statistics are defined by the distributions (2). However, the practice shows that it is irrational to use the precedent registration data "as is" for identification due to the low efficiency of obtained methods and high computing costs (big data, long target precedent search, etc.). The common way is to use registration data for forming the descriptions of original distributions (normed intensities ( ⃗) (2) of precedents), rather than for identification.
The standard approach to forming such descriptions is the approximation of ( ⃗) by model ( ⃗| ⃗ ) from some parametrical family of distributions with relatively few parameters ⃗ = { 1 , … , }. The GM are a special subset of the more general family of exponential mixtures, for which the further synthesis can be repeated in the same way. Throughout the rest of this paper, we will use GM, because we do not endeavore neither to provide general formulations, nor to customize the approach to any specific areas. Instead, we will focuse on the interpretation clarity, leaving the problem of selecting the most appropriate distributions for further studies.
When selecting the GM as the modeling family, it is supposed that the intensity of each ( -th) precedent can be defined by the mixture of two-dimensional Gaussian components (distributions): where parameters ⃗ are: -number of mixture components and the set of -triplets {( , , ⃗⃗⃗ , , , )}, which are probabilities , for belonging photocounts to the component mean and square-form , ( ⃗) matrix of which are, respectively, ⃗⃗⃗ , and , .
Besides modeling and analyzing convenience, GM (3) are beneficial, because machine learning comprises a set of efficient algorithms that allows finding the parameters of the most likely GM for samples of independent, equally-distributed random points { ⃗ }. This algorithm group includes popular EM-algorithms [19], [20].
For the precedent description forming method that we use, some variant of an EM-algorithm was chosen. In our approach, when initializing learning ( = 0) based on the -th precedent { ⃗ } data, the number of components was selected manually, probabilities  The last comment on the algorithm (4,5) is as follows. It is known that random initializing of EMalgorithms may lead to critical deficiencies of the resulting solutions. That is why the above initialization procedure should be considered as repeating until the results approvable by the supervisor are obtained. With that, not only parameters {( , , ⃗⃗⃗ , , , )} themselves, but their number are the learning subject. Figure 1 illustrates initialization cases that are less and more approvable by the supervisor.

Identification of registered data by Gaussian mixtures
As a final step after selecting the form of precedent descriptions (3) and the method for forming such descriptions (4,5) based on discrete photocounts { ⃗ }, we need to determine the type of the identification procedure applicable to these descriptions. For that, we have to select the qualitative applicability measure that would reflect the similarity between the tested PPP photocounts and precedents from the database. Due to (2)  (displacement by ⃗ and -scaling) and set the a priori distribution ( ⃗ , ) of parameters, then identification will be possible based on the maximum likelihood (7), but the similarity measure will be the logarithm of the mean over ( ⃗ , ) of all descriptions ( ⃗ − ⃗ | ⃗ ( * ) ) 2 obtained from ( ⃗ | ⃗ ( * ) ) by the selected group transformations: Essentially, the synthesized algorithm (9,10) recurrently calculates the values of parameters ⃗ and -⃗⃗ ( * ) , ̅ ( * ) , corresponding to the description of the -precedent ( ⃗| ⃗⃗ ( * ) , ̅ ( * ) ) (8) of the class determined by the description ( ⃗ | ⃗ ( * ) ) (3), which is the maximum likely to the registered photocounts { ⃗ }. It can be noted that the resulting solutions depend on the initialization ⃗⃗ (0) , ̅ (0) . However, generally, supervised learning here, in identification, is unreasonable for many reasons.
The following observation helped us to find the optimal choice of the identification procedure that can lead to adequate solutions. Based on the above presentation of objects by classes of affine descriptions, it is possible to select not the original precedent-based description for each class, but the affine transformation of such a description, i.e. the most convenient (in some sense, standard) representative. To define what is the standard representative, we should note that for the learning algorithm , the representative of the same class will be obtained, but with ⃗ ′ = 0 ⃗⃗ and = 1 in (12). We define it as the standard representative of the class. The number of its components will be the same as the precedent's, probabilities , will be the same, but means and square-form matrices will be, respectively, ⃗⃗⃗ , ′ = (⃗⃗⃗ , + ⃗ )⁄ and , ′ = 2 , . As ⃗ and are defined by only data based on photocount coordinates of the tested PPP { ⃗ }, and assuming ⃗ = ( ⃗ ′ + ⃗⃗ (0) ) ̅ (0) ⁄ in zero approximation, we will get: ̅ (0) = −1 and ⃗⃗ (0) = ̅ (0) ⃗ . Tests with relatively simple images have proved the effectiveness of the suggested solution.

Results of numerical modeling of algorithms for object identification on photocount images
The above similarity measure calculation procedure is the basic tool for identifying the PPP intensity form. It qualitatively characterizes the match between registration data of the identified PPP and the intensity form of a random precedent. The further identification steps include comparing similarity measures, obtained this way, for various precedents from the database, in order to select the most similar to the identified data.
We should note that for large databases, these scenarios can be rather complex, centered around the internal relations between precedents, the type of description similarity, hierarchical relations, etc. Using this information for the optimal search of the maximum-likelihood precedent may significantly reduce the computing costs. However, this paper is not concerned with this important and interesting topic.
Instead, we present the results of the computing experiment for a small artificially-formed database, in order to illustrate the suggested identification method. Descriptions of precedents from this database were obtained based on data of registering small simple-structure objects. The latter were binary (black-and-white) images from the widely-known base "MPEG-7 Core Experiment CE-Shape-1" [21]. This image base is generally used for the purposes of comparing object form recognition algorithms and includes 70 object categories, 20 object images in each.
From the database [21], images of 5 categories -"apple-10", "butterfly-15", "cup-19", "flatfish-10", "tree-14" -were randomly selected as precedents. The frames for precedents have been unified in size (256x256 pixels), and precedents were centered in them. As the intensity of precedents was very simple (evenly distributed across the object), precedent's data registration was also simple: from a large number of randomly-generated points evenly distributed across the frame, 1000 of the points that first got within the object boundaries, were picked. The selected precedents and corresponding registration data (1000 photocounts) are given in figure 2.

Figure 2.
Precedents from the database "MPEG-7 Core Experiment CE-Shape-1" [12] as binary images with the size 256 × 256 (top line) and models of data registered -1000 photocounts evenly distributed across the object fields (bottom line).
The standard EM-algorithm (4,5) was applied to form the description of the selected precedents as GMs with =10 components (for all precedents). The EM-algorithm was initialized through even Complete calculation results of the suggested mean-likelihood procedure, which include other tested objects ("apple-20", "butterfly-13", "cup-7", "flatfish-3) (see Figure 3), are given in table 1. We must note that identification based on the target precedent (category) criteria (7) turned out to be correct in all cases. Certainly, the objective and statistically-proper evaluation of the suggested approach requires testing of larger databases, but the actual results allow us to make optimistic forecasts regarding the potential of this approach.

Conclusions
This paper shows that formalization of photon-counting sensor registration (detection) of radiation by using the Poisson point processes [15] is the most adequate in terms of physics (quantum theory) [14], and exceptionally productive in terms of statistical data analysis [13]. Based on this, using the machine learning principles [13], we have managed to develop an efficient approach to the synthesis of the object identification procedures that belong to the reliable family of EM-algorithms. The obtained algorithmic architecture of the identification system was inspired by widely-known facts about the vision system; as it turned out, the synthesis results make it possible to significantly imitate the neurobiological mechanisms of visual information processing in the cortex [3][4][5]. Qualitative modeling showed that the developed identification procedure had a high convergence rate -for complex precedent description by Gaussian mixtures with ~ 10 components, the recurring computing operations (9,10) converge in ~ 10 iterations.