{'fraction_non_alphanumeric': 0.03241158200581104, 'fraction_numerical': 0.015228934976455265, 'mean_word_length': 4.621796676992396, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Object Recognition Inspiring HVS

Received Apr 9, 2018 Revised May 20, 2018 Accepted Jul 11, 2018 Human recognize objects in complex natural images very fast within a fraction of a second. Many computational object recognition models inspired from this powerful ability of human. The Human Visual System (HVS) recognizes object in several processing layers which we know them as hierarchically model. Due to amazing complexity of HVS and the connections in visual pathway, computational modeling of HVS directly from its physiology is not possible. So it considered as a some blocks and each block modeled separately. One models inspiring of HVS is HMAX which its main problem is selecting patches in random way. As HMAX is a hierarchical model, HMAX can enhanced with enhancing each layer separately. In this paper instead of random patch extraction, Desirable Patches for HMAX (DPHMAX) will extracted. HVS for extracting patch first selected patches with more information. For simulating this block patches with more variance will be selected. Then HVS will chose patches with more similarity in a class. For simulating this block one algorithm is used. For evaluating proposed method, Caltech 5 and Caltech101 datasets are used. Results show that the proposed method (DPMAX) provides a significant performance over HMAX and other models with the same framework.


INTRODUCTION
The Human Visual System (HVS) is able to recognize objects easily in a cluttered scene in less than a second. Recent works inspiring the Human Visual System (HVS) in image processing are such as image enhancement [1], data hiding [2,3], digital image fusion [4], robust object recognition [5]. HVS processes images easily, while the most powerful computer systems are generally not capable of doing so. Due to the tremendous complexity of HVS and amazing connections in visual pathway, computational modeling of HVS for image processing applications directly from its overall anatomy and physiology is not possible [6]. One of way to overcome the limitation is the input-output modeling of the visual system (i.e. the saliency map) [7,8].
Another way is modeling of the simple subsystems and their systematically combination based on the HVS structure (i.e. edge and line detection, contour extraction and texture diagnose) [9,10]. It seems that the manner of the HVS in the object description stage and object recognizing (matching) process is optimized. In the first step of modeling the visual system behavior in object recognition, an appropriate object descriptor should be presented. This descriptor must be independent to scale and rotation [5,11,12].
HVS for object description uses processes such as saliency map, edge detection, line detection, contour extraction and texture diagnose. The saliency map [7,8] is the first topographically arranged map that represents visual saliency of a corresponding visual scene. For edges detection [13,14] the retina and LGN cells are inspired. They don't have directional selection because of the circular receptive field. For line detection [15] the human primary visual cortex (V1) simple cells are inspired because of their directional receptive field. A set of adaptive filters is derived by learning mechanism which emulates the V1 simple cells. These filters are applied at every position of the input image to get a line feature representation. Non-classical receptive field (N-CRF) inhibition mechanism is an example to design physiologically plausible contour detection models [13,16,17]. N-CRF mechanism suppresses edges which make part of the texture, while it does not suppress edges that belong to the contours of objects.
Since HVS at first isolates contour of objects from scene images in its early stages of visual cortex, it is able to distinguish the texture edges and boundary of objects in scene images, known as the contrast [18,19].
After object description, its recognition can be modeled by using the extracted features [20,21]. For this purpose, in addition to simple cells, complex cells of the cortex must be modeled. Thus, the models are consist of two kinds of layers, each of which emulates the functions of V1 simple and complex cells. Thus, hierarchical models are created. One cases inspired by the hierarchical nature of primate visual cortex, is HMAX hierarchical model [22] (the neural network model for image classification). The HMAX model can be described as a four-level architecture with a first level consisting of multi-scale and multi-orientation local filters (i.e. Gaussian derivatives or Gabor filters). These networks combine the low level representations into object level representations suitable for recognition tasks [20].
Serre et al. [5] extended the original HMAX model to add multi-scale representations as well as more complex visual features. Huang et al. [38] also improved the HMAX model with constraints, a different pooling strategy and a feedback mechanism to improve feature learning. David et al. [23] has shown how HMAX filters can outperform state-of-the-art filters such as SIFT under various controlled invariance tasks on synthetic images.
Theriault et al. [22] First, HMAX was improved by integrating the local filters at the first level into more complex filters at the last level, providing a flexible description of object regions and combining local information of multiple scales and orientations. Second, a multi-resolution spatial pooling was introduced. This pooling encodes both local and global spatial information to produce discriminative image signatures.
Itti et al. [7] has introduced the hierarchical approach based on three parameters: intensity, orientation and colors for image saliency map diagnosis. The final model obtained by combining the output models of these features. In [34,35] saliency map are affected by the properties of the object. Pourasad [24] proposed a Modified HMAX model based on combined with the visual featured model for HMAX (henceforth referred to as MHMAX) by calculating optimum patches based on their information. Ghodrati et al. [25] found the better patches for HMAX by using genetic algorithm (henceforth referred to as GMAX).

REVIEW OF BACKGROUND WORKS
In this section we introduce a brief review of HMAX models. The original HMAX model is inspiring the hierarchical theory of visual processing. Its architecture is derived from the well-known model introduced by Hubel & Wiesel [3,18sabouri4]. HMAX models the ventral visual pathway from first processing part in the visual cortex (V1) to higher levels of visual cortex (e. g. IT and PFCA). Schematic of the HMAX model is shown in Figure 1. As shown: The basic architecture of the HMAX model has four modules called and . The selectivity and invariance increase as the layers progress along the hierarchical structure of model. These layers imitate the behavior of cells from V1 to IT cortex. As the main problem of HMAX is random patch extraction and in this paper we solve it, it is considered as a separate module. Patches are extracted in training step and used in testing step. In the following, we explain these modules. Let the number of training image be denoted by Ntr, for each module we will discuss about input and output of module.

S1 Module
The first layer of the HMAX model called 1 S , receives images as its input. Afterward, these images are used to a set of edge detector filters to detect their edges. These filters are built based on the Gabor function. These Gabor filter formula is mentioned as Equation 1 and Equation 2: Where the parameters γ, σ, θ, and λ are aspect ratio, effective width, orientation and the wavelength of the Gabor filter, respectively. The output of this module obtained by convolving the input imageby Gabor filters. This layer parameters (Gabor filter parameters) are shown in Table 1. As shown in Table 1, Gabor filter parameters are in 16 rows. Important note is these parameter are for each orientation (θ={0˚,45˚,90˚,135˚}). For an input image, 64 images are produced such that edges are extracted with different sizes and orientations. Gabor filters mentioned in Table 1 (for 16 sizes and 4 orientations) are shown in Figure 2. Note that the size of output and input are equal in this layer. As S1 module produces 64 outputs, the inputs of this module are Ntr training images and the outputs are 64Ntr images (S1l,θ).

C1 Module:
This module is the second layer in HMAX model which emulates the complex cells activity in the cortex. This layer parameter is shown in Table 1. As shown Band-7 contains scales 13,14 which are produced by Gabor filters with sizes 31×31 and 33×33. Let two consecutive scales be denoted by S1l,θ and S1l+1,θ. These images are segmented into blocks with Ns×Ns size. Output of this layer is calculated as as Equation 3: where b is band, θ is orientation, and l are the number of scales. This process is for all orientations and all bands independently, so 32 matrices with K×L size, will produce for any input image (of size K×L).

RPE Module:
This module is just for training step, this module extracts patches from each of the 32 output images (C1b,θ) produced by C1 module. For C1b,θ from i-th training image (i=1,…,Ntr), patches with four sizes (4h×4h; h=1,2,3,4) are extracted. For each size, m patches are ectraced. Hence for C1b,θ from i-th training image, 4m patches will be exracted. Let this extracted patches be denoted by Pi,b,θ,h,n, where i is the number of training image, b is the number of the band, θ is orientation, h is the patch size definer and n is the number of patch. These patches will be set as patchs. The inputs of this module are C1b,θ from C1 which for each band and orientation the number of them are Ntr, hence 4mNtr patchs for each band and orientation will be produced in total.

S2 Module:
The inputs of this module are taken from C1 and RPE modules. This module calculates the template matching between C1b,θ from i-th (i=1,…,Ntr) training image and all patchs in band b and orientation θ. As mentioned in RPE, the number of patchs in band b and orientation θ are 4mNtr. Hence 4mNtr matrices will be produced for each band and orientation and 32×4mNtr=128mNtr matrices for i-th training image. For all training image, S2 output is a cell with Ntr×128mNtr matrices. In this module, each patch Pi,b,θ,h,n is slided across an intermediate output matrix C1b,θ, and the template matching is calculated in a Gaussian-like way on the Euclidean distance between the local C1b,θ block and Pi,b,θ,h,n. Assume that the size of the patch Pi,b,θ,h,n is W×W. Let the W×W block from eth C1b,θ, starting at coordinate (p,q) be denoted by X. The output S2i,b,θ,h,n is then calculated as Equation 4: Where i is the number of training image (i=1,…,Ntr) the parameter ( >0) defines the sharpness of the exponential function and ‖ ‖ is an Euclidian norm.

C2 Module:
The inputs of this module are S2 output matrices (S2i,b,θ,h,n). In this module, to find best matching, the maximum of these matrices are computed as Equation 5.  (Pi,b,θ,h,n). Hence in the same way, S2 has 128mNtr matrices for each testing image. Let the total number of testing images be denoted by Ntest. The output of S2 module will include is a cell with Ntest× 128mNtr matrices. C2 calculates the max of S2 output matrices. Hence the testing features will be a matrix with Ntest×128mNtr elements. Total tasks of HMAX model is shown in Figure 3.
Simple linear classifier: For image classification application, the output image features may be passed through a classifier (e.g. SVM) to classify an image.

PROPOSED TECHNIQUE
The basic architecture of the proposed model has six modules in training step and four modules in testing step (testing model is like HMAX testing model). The architecture is based on HMAX model. We introduce two main contributions to HMAX model that improve the recognition rate of HMAX model. First contribution is eliminating of background to avoid patch extraction from background that there is no appropriate information, second contribution is using optimum patch for HMAX model instead of random patch, third contribution is using 12 orientations instead of 4 orientations (the third contribution have done before). The proposed training step is different and has six modules: EB, S1, C1, OPE, S2, C2. EB is a new module, OPE is instead of RPE, S1 and C1 are based on HMAX model but they are slightly different, finally other modules (S2, C2) are as the same as the HMAX modules. In the following we explain our modules separately:

EB:
In HMAX we extracted Random patches from image, first step for extracting optimum patch is eliminating background. When our system use patches from background there will be two important problems: first we will force system to do additional computational work second we will direct our system to the wrong result, because of our wrong information. An example of eliminating background on airplane from CALTECH101 dataset is shown in Figure 4. In this module we first, eliminate some rows of pictures from up and down of it, because almost there is no image information in these places but there is some information like explain about images that they are not useful. Then we use eliminate background algorithm [26]. After using eliminate algorithm we will extract four points: minimum row, maximum row, minimum column and maximum column. We extracted windowing image with rows from minimum row to maximum row and column from minimum column to maximum column.

S1:
In this module we use Gabor filter with Table 1. Parameters, like original HMAX model. But we use Gabor filters in 12 orientation as Equation 6.

C1:
In original HMAX model the patches are extracted from C1 module across all four orientations, patches sizes are n×n (n=4, 8,12,16). In our model we extracted patches with one size for every band. As we explain before, we get max with windows from Table 1. So the output of C1 module is different, for example the size of output of C1 module for image with size of 140×140 is from 30×30 to 10×10. This should be mentioned that if after eliminating background, if the size of output is small we should resize it to prepare size (i.e, 140×140).

OPE:
In HMAX model patches are extracted randomly. In our model, first backgrounds are eliminated, then among the image the optimum patches are extracted. We extracted optimum e in two steps:

Step1:
As HVS is sensitive to edges and lines, so it seems that optimum patches should be involve more edges and lines. Hence for our model, patches with more edges and lines are extracted instead of the dense inputs and blind patch selection in HMAX model. As seen in the Algorithm1, choosing optimum patch is based on choosing mm random patch and arrange them based on variance. Suppose the number of optimum patch is m and in this algorithm we find less optimum patch than m. So it is the problem of this algorithm. For solving this problem, first we select m random patches and save their value as an array. We arrange them according to their variance from worst to best. We repeat patch selection in random mode for mm times. If variance of new patch is more than the variance of the best random it will be one step for this algorithm. We will shift all patches and replace the best patch with new patch. In this step we will extract patches with more information (with more lines and edges).

1) Extract m random patches (like HMAX), arrange them from worst to best and save them as m best patches. 2) Repeat random patch extraction for mm times, If var(new patch)>var(old patch) then:
(I) shift all saved patches from best to worst. (II) replace the best patch with new patch. We sure that there will be m best patches in (m+mm) iterations. 3) These m patches are input of f( ) according to Equation 8. and we will find the minimum of this function. Then will be the best patches.

Step2:
In this step we will extract patches with the best performance, among the patches that were extracted in step1. HVS in classification finds a patches that are the same in one category and has a most difference with other category. So we will extract patches that have most similarity with other patches in the same category and in other hand have the most difference with patches in other categories. For doing this with define a formula like Equation 8. With the best patches this formula will be minimum. So in simulation if we find minimum of this formula, the patches will be the best patches that have the maximum similarity with other patches in the same category and have most difference with other patches in other categories. We use equation for each band and orientation separately. We show the class number of patch with i and the j is the number of training image that patch is extracted (Pi,j). Then the function definition is as Equation 7: Where CN in the number of class and TN is the number of Training image in each class. The total number of pair patches in each class are TN(TN-1), so for CN class we will have TN(TN-1)×CN pair patches in same category. In the same way we will have CN(CN-1)×TN pair patches in different category. It is important that value of pairs be equal so we multiple the result with second term. This module activity is explained in Algorithm 1. As explained before, in HMAX model patches are extracted randomly in RPE module, which may not be optimal. The extracted patches by the HMAX model are from random position. So, these patches may come from background or other irrelevant objects rather than the target object. In the other hand they may come from target object but all the pixels are the same, so there is no information in it. The C2 features that are obtained from these patches are not very useful for recognizing a target object. They may also make the feature space more complex for classification [22]. The proposed module (OPE) selects patches with more information by employing optimum patch selection method which is explained in algorithm 1. As a result, less patches in training step in our model have the same result in training step in HMAX model that is good for system speed.

S2 and C2:
Two modules S2 and C2 are as the same as original HMAX model and we have explained it before.

EXPERIMENTAL RESULTS
We have tested our model on the CalTech5 and CalTech101 dataset of images. We have compared the

Image Datasets
To evaluate our model on classification tasks, we use CalTech5, Caltech101 and GRAZ-01 datasets.

Classification results
We randomly chose 10, 20, 30, 40 and 50 images from each category of the datasets as training images, other images are considered as testing images. for Caltech5 and Caltech101 datasets, objects are positive images and background is negative images. for GRA-01 dataset, people and bike are positive images and other images are negative images (we make a negative images from combining other categories). All results reported were generated with 10 random splits. The results are shown in Figure 8. As shown, except in car-side from Caltech101, the proposed method provides a significant performance improvement over other methods.

CONCLUSION
In this paper a new framework for robust object recognition based on previous hierarchical model is proposed. A novel Desirable Patch extraction method for HMAX hierarchical model (OPHMAX) is proposed. For this purpose, first we eliminate the background, then we extracted the best patches that they are the same in the same category and they are more different in the different category. This improvement is only in training stage so it do not need more time in recognition stage. Optimum patches are the best patches to represent discriminative and invariant features. They solve the main limitation in the H AX "dense inputs and blind feature selection''. Experiments based on three different kinds of datasets have demonstrated that the DPHMAX performs much better than the other methods in various visual recognition tasks.