3.2 Human Recognition Circuit
Integrating Hardware-oriented
GMM-MRCoHOG and BNN
We designed a dedicated human recognition circuit
using the proposed coarse angle calculation algorithm
and the responsibility inference method proposed by
Nagamine et al. (Nagamine et al., 2019), as shown in
Fig. 6.
This circuit receives a 32 × 64 pixels image as in-
put and continuously transfers one pixel at a clock
cycle from the top-left to the bottom-right pixel of
the image to the image buffers. Here, we set the
GMM-MRCoHOG extract features from three reso-
lution images: the original size image, a 1/2-resized
image, and a 1/4-resized image; therefore, we im-
plemented three image buffers for these resolutions.
Each of the buffers is a three-line buffer to calculate
the luminance gradient from 3 × 3 pixels in the im-
age. The derivative filter blocks receive three lines of
pixels and calculate the horizontal and vertical lumi-
nance differences. The angle calculation blocks cal-
culate the angles of the luminance gradients, and the
results are stored in the two-line buffers of the second
stage. Then, the gradient co-occurrence is calculated,
and the GMM-MRCoHOG feature is extracted. The
obtained feature is fed into the BNN, which classifies
the input image as human or not human. The synaptic
weights and activation of the BNN are binarized such
that the circuit requires small memory resources.
Here, the number of mixtures of the Gaussian dis-
tribution used in the GMM-MRCoHOG is 6. The
BNN has three layers: input, hidden, and output lay-
ers, and the number of neurons in the hidden layer is
1.
4 EXPERIMENT
We verified the proposed coarse angle calculation
method, implemented a human recognition circuit
integrating the hardware-oriented GMM-MRCoHOG
and the BNN using high-level synthesis, and esti-
mated the processing speed and circuit size. The ex-
perimental environment is presented in Table 1.
4.1 Coarse Angle Calculation Method
using the Fixed-point Tangent Table
In this experiment, we verified the proposed coarse
angle calculation method with respect to circuit size,
estimated the angle matching rate to true angles, pro-
cessing speed of the circuit, and the approximation
effect on accuracy for human recognition tasks.
First, we verified the circuit sizes of the tanθ table
when the integer part of the fixed-point numbers in
the table was fixed to three bits, and the fraction part
was varied from zero to seven bits. The target device
was a Xilinx Zynq XC7Z020 FPGA on a Zedboard
with a clock frequency of 200 MHz.
Next, we verified the matching rate between
the estimated angles calculated using the proposed
method and the true angle values. The bit width set-
ting of the fixed-point numbers in the table was the
same as the circuit size verification. The true an-
gle values were calculated by feeding f
x
and f
y
into
the atan2 function of the cmath library in C language
and discretized in 36 directions. In addition, we com-
pared the proposed method with the angle approxima-
tion method from a previous study (Nagamine et al.,
2019).
Next, we compared processing speeds of angle
calculations of the following three methods:
1. Software implementation of angle calculation by
atan2 function
2. Software implementation of angle calculation by
the proposed method
3. Hardware implementation of angle calculation by
the proposed method
In the software implementation, the average of the
calculation times of all 261,121 input luminance gra-
dients executed on an Intel Core i7-8700K central
processing unit (CPU) was used as the angle calcu-
lation time for software. In the hardware implemen-
tation, clock cycles to calculate an angle by the circuit
multiplied by the clock cycle time was used as the an-
gle calculation time. Here, the fraction part of the
fixed-point numbers in the table was set to six bits,
and the target board and its clock frequency were the
same as the circuit size verification. Thus, the clock
cycle time was set to 5 ns.
Next, we verified the approximation effect of the
proposed method on the accuracy of human recog-
nition tasks. To avoid the effect of the binarization
of the discriminator using the BNN, we used a sup-
port vector machine (SVM) (Cristianini and Shawe-
Talor, 2000), which is a floating-point number model,
as a discriminator. Here, we compared the accuracy
of three algorithms for GMM-MRCoHOG: the origi-
nal algorithm, the hardware-oriented algorithm of the
previous study (Nagamine et al., 2019), and the pro-
posed algorithm. We set the number of mixtures of
Gaussian distribution as 16 and 32. The datasets used
in this experiment were the Daimler Pedestrian Clas-
sification Benchmark Dataset (Gavrila and Enzweiler,
2008) and INRIA Person Dataset (Dalal and Triggs,
VISAPP 2022 - 17th International Conference on Computer Vision Theory and Applications
752