[2]Zainul Abidin

1]XI Natural Science, Darma Yudha Senior High School, 189 S.M. Amin Street,
Pekanbaru, 28292, Riau, Indonesia

[2]Simetri Foundation, Tangerang, Indonesia 15334

# Playing Lato-lato is Difficult and This is Why

Fansen Candra Funata<EMAIL_ADDRESS><EMAIL_ADDRESS>[  *

###### Abstract

Lato-lato, a pendulum-based toy gaining popularity in Indonesian playgrounds,
has sparked interest with competitions centered around maintaining its
oscillatory motion. While some find it easy to play, the challenge lies in
sustaining the oscillation, particularly in maintaining both ”up and down
collisions.” Through a Newtonian dynamics numerical analysis using Python
(code by ChatGPT), this study identifies two equilibrium phases - phase 1,
characterized by normal pendulum motion, and phase 2, the double collision
mode - by using the driven oscillation model. In addition, further analysis
and discussion are done using the obtained numeric data. The difficulty in
remaining in phase 2 highlights the intricate hand-eye coordination required,
shedding light on the toy’s appeal and the skill it demands.

###### keywords:

lato-lato, driven oscillation, pendulum-based toy, Newtonian dynamics, Python,
numerical analysis, ChatGPT

##  1 Introduction

Lato-lato, or better known as ”clacker balls” has existed since the 1960s,
originally made of tempered glass. Due to safety issues, the balls are then
changed to be made out of plastic [1]. It recently regained its popularity,
especially in Indonesia, because it was played by the president of Indonesia
[2]. Its appearance in social media, such as TikTok made it even more viral,
with videos soaring to millions of views. Furthermore, playing this game
positively impacts children’s behaviour, increasing the frequency of their
social interaction[3].
Previously some reports and articles have been written revolving around lato-
lato. However, most of them seem to focus on how educators can implement lato-
lato in teaching physics[4][5][6]. As we all know, the physical essence of the
toy lato-lato lies in the law of momentum conservation; the collisions that
occur between the plastic spheres are such that $p_{i}=p_{f}$[7][8]. However,
the dynamics of the lato-lato itself (2.3), involve gruesome mathematics, as
shown by Bartucelli et al[9]. In this paper, we will use the concept of phase
diagrams to explain why the lato-lato is such a difficult game. Moreover, A
diagram of the Amplitude Conditions111Variable defined to show which phase the
pendulum is in will be shown against the initial boundary conditions,
$\theta_{0}$ and $\dot{\theta}_{0}$. Further, we model the lato-lato as a 2
stick pendulum joint at both of its free ends.

Figure 1: (a) shows the model of the lato-lato used throughout our analysis.
We use the approximation $r<<l$, hence the sphere may be considered a point
mass. (b) Represents the motion of ”phase 1”, and (c) represents the motion of
”phase 2”. Figure (d) shows a special play style called the ”tornado style”
(more about it in Subsection 2.6)

##  2 Formula Derivations

The concept involved in playing with this toy lies mainly in Newton’s laws and
conservation of momentum and energy[10]. Some of the subsections we provide
here serve as preliminary materials to aid the readers in grasping the
materials as a whole (Section 2.1 and Section 2.2).
The formulas used are as follows

###  2.1 Single Pendulum Equation of Motion

We begin with a single pendulum case with its energy given as

$E=mgl(1-\cos\theta)+ml^{2}\frac{\dot{\theta}^{2}}{2}$ (1)

Where $E$ represents the energy of the system, $m$ represents the mass of the
bob, $g$ represents the gravitational acceleration ($9.8$ $m/s^{2}$), $l$
represents the length of the pendulum, $\theta$ represents the deviation angle
with respect to the y axis and $\dot{\theta}$ represents the derivative with
respect to time, as shown in Figure 1.

Without energy loss, we consider three separate cases, which are (a)
$E<<2mgl$, (b) $E=2mgl$ and (c) $E>2mgl$. Here, we ought to find the angular
momentum $L$ of the system to obtain plots of the system’s phase diagram

  1. (a)

$E<<2mgl$

$\displaystyle 1$ $\displaystyle=$
$\displaystyle\frac{2mgl\sin^{2}\frac{\theta}{2}}{E}+\frac{L^{2}}{2ml^{2}E}$
(2) $\displaystyle 1$ $\displaystyle=$
$\displaystyle\frac{mgl\theta^{2}}{2E}+\frac{L^{2}}{2ml^{2}E}$ (3)

It is possible to rewrite equation 2 into 3 using the small angle
approximation - $\sin\theta\approx\theta$. This is possible noting that when
$E=\frac{1}{2}m\omega^{2}l^{2}\theta^{2}$ (energy of harmonic oscillator) is
small, $\theta$ also becomes small. Physically, this condition represents a
small oscillation around its stable point.

  1. (b)

$E=2mgl$

$L=m\sqrt{2gl^{3}}\cos\frac{\theta}{2}$ (4)

Equation 4 may be obtained from equation 1, where we substitute the relation
$E=2mgl$. This marks a transition from the first phase to the second
phase222Refer to the final sentence in Abstract

  1. (c)

$E>2mgl$

$L^{2}=2ml^{2}[E-2mgl\sin^{2}\frac{\theta}{2}]$ (5)

Equation 5 may be obtained by simply rewriting equation 1 without making any
approximations. This equation can be used to draw the phase diagram of phase 2
in the pendulum system. Physically, this condition is reached when the
pendulum can perform a full rotation333All phase diagrams can be seen in
section 2.7

###  2.2 Slack Analysis

####  2.2.1 Conditions

For this part only, we consider a string pendulum. This time, specific
boundary conditions need to be fulfilled to perform a complete circular
motion.
We consider the following constraint

$ml\dot{\theta}^{2}+mg\cos\theta>0$

Insertion into the energy equation of the pendulum yields

$E>mgl-\frac{3}{2}mgl\cos\theta$

Notice how if $E=\frac{5}{2}mgl$, slack will never occur. Rewriting in terms
of E, yields

$\cos\theta>\frac{2}{3}[1-\frac{E}{mgl}]$ (6)

This means before the lower bound is reached, the strings will remain taut.
We may obtain the angular speed of the pendulum at this instant.

$\dot{\theta}^{2}=\frac{2g}{3l}[-1+\frac{E}{mgl}]$ (7)

####  2.2.2 Slack Time

We find the time required by the string to become taut again. Note that the
pendulum will undergo parabolic motion during this time range, and the
following equation must be fulfilled for it to become taut again444Due to the
complexity in the threaded lato-lato’s motion, we will refrain from using it
in our analysis. Instead, the focus will lie on a stick-based lato-lato..

$y^{\prime 2}+x^{\prime 2}=l^{2}$ (8)

Where $r^{\prime}=(x^{\prime},y^{\prime})$ is the instantaneous position of
the object. We define
$y^{\prime}=-l\cos\theta+v_{0}t\sin\theta-\frac{1}{2}gt^{2}$ and
$x^{\prime}=l\sin\theta+v_{0}t\cos\theta$. Insertion allows us to get the
nontrivial equation

$\frac{1}{4}gt^{2}-v_{0}gt\sin\theta+(v_{0}^{2}+gl\cos\theta)=0$
$gt=2v_{0}\sin\theta\pm\sqrt{-v_{0}^{2}\cos^{2}\theta-g^{3}l\cos\theta}$

inserting the value of $\cos\theta=\frac{-v_{0}^{2}}{gl}$, will allow us to
write

$t=\frac{4v_{0}\sin\theta}{g}$ (9)

From this point onward, the velocity component in the direction of the string
will be eliminated, leaving the tangential component. This process will result
in energy loss.

###  2.3 Pendulum Dynamics

In this part, we will be deriving the most important formula that is used in
the entirety of the paper. This is the equation of motion of the pendulum,
with its free end driven by an oscillating force
($\frac{F}{m}=-a_{0}\omega^{2}\cos\omega t$)555$a_{0}$ shows the amplitude of
the motion undergone by the pendulum’s free end and $\omega$ shows the angular
frequency of the oscillatory motion. We consider the frame of the oscillating
free end, such that the motion of the spheres is exactly circular.

$\displaystyle E$ $\displaystyle=$ $\displaystyle
mgl(1-\cos\theta)+ml^{2}\frac{\dot{\theta}^{2}}{2}+\int-
ma_{0}\omega^{2}\cos\omega tdy$ (10) $\displaystyle\frac{dE}{dt}$
$\displaystyle=$ $\displaystyle 0$ $\displaystyle 0$ $\displaystyle=$
$\displaystyle
mgl\sin\theta\dot{\theta}+ml^{2}\ddot{\theta}\dot{\theta}-ma_{0}l\omega^{2}\cos\omega
t\sin\theta\dot{\theta}$ $\displaystyle-\ddot{\theta}$ $\displaystyle=$
$\displaystyle(g-a_{0}\omega^{2}\cos\omega t)\sin\theta$ (11)

Equation 11 is known as the Mathieu’s equations[11], having a general solution
of[9]:

$u(t)=e^{i\mu_{0}t}p_{0}(t)$ (12)

In general, $\mu_{0}\in\mathbb{C}$. If $\mu_{0}\in\mathbb{R}$, the solution is
particularly bounded.

###  2.4 Kapitza Model

To perform code proof-testing later on in section 4, we will consider several
constraints to make equation (10) analytically solvable, which are[12]:

  1. 1.

Small value of $a_{0}$

  2. 2.

Fast oscillation frequency $\omega$

  3. 3.

This way we may rewrite $\theta=\gamma+\beta$, where $\gamma$ is the slow
varying term, with large amplitude and $\beta$ is the opposite of $\gamma$

We first try to obtain the value of $\beta$. We note that the second
derivative of $\gamma$ is way smaller than that of $\beta$. This way, we may
expand the terms, hence ending up with

$(g-a_{0}\omega^{2}\cos\omega t)\sin\gamma=\ddot{\beta}l$ (13)

noting that $\omega^{2}a_{0}>>g$, we end up with

$\beta=\frac{a_{0}}{l}\sin\gamma\cos\omega t$ (14)

Next, we iterate the obtained $\beta$ on the equation of motion to get
$\gamma$. We will neglect terms of the order $y^{3}$ and so on

$g\sin\gamma+g\cos\gamma\beta-a_{0}\beta\omega^{2}\cos\omega
t\cos\gamma=-\ddot{\gamma}$ (15)

Noting the 2nd approximation condition, we may average the previous function
to obtain:

$\frac{g\sin\gamma}{l}+\frac{a_{0}^{2}\omega^{2}}{l^{2}}\frac{\sin
2\gamma}{4}=-\ddot{\gamma}$ (16)

Next, we will find the average moment of forces acting on the pendulum

$\tau=m\ddot{\gamma}l^{2}$
$\tau=-(mgl\sin\gamma+ma_{0}^{2}\omega^{2}\frac{\sin 2\gamma}{4})$ (17)

Then, we define a scalar potential due to this torque

$V(\gamma)=-\int\tau d\gamma$ (18)
$V(\gamma)=mgl(1-\cos\gamma)+ma_{0}^{2}\omega^{2}\frac{\sin^{2}\gamma}{4}$
(19)

We continue by analyzing several stability options.

$\frac{dV(\gamma)}{d\gamma}=0$

from there, we obtain $\gamma_{1}=0$, $\gamma_{2}=\pi$,
$\cos\gamma_{3}=-\frac{2gl}{y_{0}^{2}\omega^{2}}$666We define $V_{max}$ as the
value of the scalar potential $V$ at which $\gamma=\gamma_{3}$.. The stability
for $\gamma=\pi$ only works if $\gamma_{3}$ has a real solution, such that
$\frac{d^{2}V}{d\gamma^{2}}$ at that point $<0$.

Here, we can define the energy of the system in the moving frame as

$E^{\prime}=V+\frac{ml^{2}\dot{\theta^{2}}}{2}$ (20)

defining $L$,

$L^{2}=2ml^{2}(E^{\prime}-mgl(1-\cos\gamma)+ma_{0}^{2}\omega^{2}\frac{\sin^{2}\gamma}{4})$
(21)

###  2.5 Energy Loss

We consider an energy loss proportional to $e^{2}$, where $e<1$ represents the
coefficient of restitution of the two bobs. Due to this, we can write $E_{n}$,
that is the energy to the nth collision as $E_{n}=e^{n}E_{0}$.

$L^{2}=2ml^{2}[E_{n}-2mgl\sin^{2}\frac{\theta}{2}]$

Notice that the system will lose kinetic energy after several collisions,
which means that additional energy must be given every time energy is
dissipated. For every energy loss, the following $\delta W$ must be given.

$\delta W=\Delta E_{n}=E_{n-1}[e-1]$ (22)

We can now see the importance of giving additional work to keep the pendulum
at its original energy state. We may do this by lifting the pendulum system up
and down, with the power defined as:

$<P>=<\vec{F}\cdot\vec{v}>$ (23)

###  2.6 Tornado Play Style

Apart from the regular pendulum play style, the lato-lato can also be played
less conventionally. To model this style, we refer to Figure 1. In this model,
we will consider the human finger as a cylindrical wheel having radius $R$,
where ($r<<R<<l_{0}$), rotating at a constant angular velocity $\omega$.

To analyze the dynamics of the system we shall first consider the movement of
the pendulum in the rotating frame $\omega$, and then we will transform the
kinematic properties back into the inertial lab frame. This will ease the
maths involved. The following formula for transformation will be used[13]

$\vec{v}_{lab}=\vec{v_{0}}+\vec{\omega}\times\vec{r}+\vec{\dot{\rho}}_{r}$
(24)
$\vec{a}_{lab}=\vec{a_{0}}+\vec{\omega}\times(\vec{\omega}\times\vec{r})+\dot{\vec{\omega}}\times\vec{r}+2\vec{\omega}\times\vec{\dot{\rho}}_{r}+\vec{\ddot{\rho}}_{r}$
(25)

where $\vec{v_{0}}$ defines the velocity of the origin in the lab frame,
$\vec{\omega}$ defines the angular velocity of the rotating frame,
$\vec{\dot{\rho}}_{r}$ defines the velocity of the object in the rotating
frame, and lastly $\vec{\ddot{\rho}}_{r}$ defines the acceleration experienced
by the object in the rotating frame.

####  2.6.1 Wrapping

For the initial part, we will derive the time taken for the pendulum to be
fully retracted until $l=0$. This can be done by giving the sphere an initial
momentum such that the string winds around our finger. By assuming the initial
speed given is such that $v_{0}^{2}>>gl$, we may ignore the effects of
gravity. Therefore, one could write

$v_{0}=\dot{\theta}l=constant$ (26)

where $\theta$ is the wrapping angle and $l=l_{0}-R\theta$. Solving the above
differential equation yields the following analytical result

$t=\frac{l_{0}\theta-R\frac{\theta^{2}}{2}}{v_{0}}$ (27)

inserting $\theta=\frac{l_{0}}{r}$ (under the approximation $r<<l$), will
yield the final result $t_{R}=\frac{l_{0}^{2}}{2v_{0}R}$.

####  2.6.2 Unwinding

This part will now use the formulas provided at the beginning of this
subsection. The model used here is that we quickly rotate our finger with a
constant angular velocity $\omega$. We again assume that gravity is
negligible. We first notice that considering a frame rotating at angular speed
$\Omega=\omega+\dot{\theta}$ will be much easier. This is because, by
considering this frame, we will be given a system where the pendulum’s string
just changes in length, without any rotational motion. In this frame, the
kinematic properties are simply :

$\vec{\dot{\rho}}_{r}=\dot{l}\hat{l}=R\dot{\theta}\hat{l}$ (28)
$\vec{\ddot{\rho}}_{r}=\ddot{l}\hat{l}=R\dot{\theta}\hat{l}$ (29)

Subsequently, insertion into equation Equation 23

$\displaystyle\vec{a}_{lab}$ $\displaystyle=$
$\displaystyle-\Omega^{2}\vec{R}-\Omega^{2}\vec{l}+\ddot{l}\frac{l}{R}\hat{e_{t}}+2\omega\dot{l}\hat{e_{t}}+\ddot{l}\hat{l}$
$\displaystyle(\vec{a}_{lab})_{\hat{e_{t}}}$ $\displaystyle=$
$\displaystyle-(\omega+\frac{\dot{l}}{R})^{2}{R}+\ddot{l}\frac{l}{R}+2\Omega\dot{l}$
$\displaystyle(\vec{a}_{lab})_{\hat{e_{t}}}$ $\displaystyle=$
$\displaystyle\frac{\dot{l^{2}}}{R}+\frac{\ddot{l}l}{R}-\omega^{2}R$ (30)

The vector $\hat{e_{t}}=\frac{\vec{e_{t}}}{e_{t}}$, represents the direction
perpendicular to the string $\hat{l}$. Notice that the force in this direction
is negligible (gravity), therefore we may immediately set it to 0. The
equation can be turned into a perfect integral

$0=\frac{d}{dt}(l\dot{l})-\omega^{2}R^{2}$ (31)

integrating both sides by $dt$, and setting the initial condition $l_{0}=0$,
allows us to write

$\displaystyle l\dot{l}$ $\displaystyle=$ $\displaystyle\omega^{2}R^{2}t$
$\displaystyle\int_{0}^{l}l\,dl$ $\displaystyle=$
$\displaystyle\frac{1}{2}\omega^{2}R^{2}t^{2}$ $\displaystyle l$
$\displaystyle=$ $\displaystyle\omega Rt$ (32)

It turns out, the $l(t)$ function is linear, hence we may write unwinding time
$t_{u}$ as

$t_{u}=\frac{l_{0}}{\omega R}$ (33)

####  2.6.3 Total time

We assume motion starts from unwinding, and when $l$ reaches $l_{0}$, the
$\omega$ value is immediately set to 0. Hence, by combining the total time
$T=t_{R}+t_{u}+t_{t}$ (third term = transition time), we can approximate the
period of each ”tornado” motion as

$T=\frac{l_{0}}{R}(1+\frac{\omega l_{0}}{2v_{0}})+\frac{\pi}{v_{\hat{e_{t}}}}$
(34)

Noting that $\vec{v}=-(\omega{R})\hat{l}+\omega l\hat{e_{t}}$, we can find the
velocity of the sphere when the length has reached $l_{0}$,
$v_{\hat{e_{t}}}=\omega l_{0}$. The radial velocity can be ignored because
when the string quickly goes back to being taut - noting ($R<<l$) - the radial
component just vanishes. $v_{0}$ defined previously is also equal to
$v_{\hat{e_{t}}}$, due to the periodicity defined. Our expression simplifies
into:

$T=\frac{3l_{0}}{2R}+\frac{\pi}{\omega}$ (35)

###  2.7 Preliminary Figures

Figure 2: The orange contours in the plots show the phase of the pendulum
system, whereas the green contour shows the potential barrier experienced by
the pendulum in the kapitza model. Figures (a),(b), and (c) show the phase
diagram of the special cases, where its equations are given in subsection 1,
representing a simple mathematical pendulum. Meanwhile, figures (d), (e),(f),
and (g), represent the phase diagram for the kapitza model, that analyzes the
conditions $0<E^{\prime}<2mgl$, $2mgl<E^{\prime}<V_{max}$,
$E^{\prime}=V_{max}$, and $E^{\prime}>V_{max}$ respectively. The orange
contour in the four figures represents a plot of the system’s potential
barrier, whereas the red contour shows the phase diagram $E^{\prime}$ vs
$\theta$ of the kapitza model. Finally, (h) and (i) show the phase transitions
that occur for a simple pendulum and the kapitza model. Both are done at the
most extreme case of each respective condition.

In this part, we have provided the plots of trivial single pendulum phase
diagrams, as well as other figures that might aid in illustrating Section 2.

##  3 Application in Lato-lato

Having derived all the necessary equations we may now solve the equation of
motion (equation 10) numerically. Notice how this equation shows how the lato-
lato is usually moved around by the player. Since equation 10 only shows the
motion of a single pendulum, it is required that we add specific constraints,
characterizing the geometry of a double pendulum system. The constraints are
as follows: We apply 2 boundary conditions at $\theta=0$ and $\theta=\pi$.
Forcing, $\dot{\theta}_{(0)}$ and $\dot{\theta}_{(\pi)}$ to always be
reversed.

$(\dot{\theta}_{0})_{i}=-(\dot{\theta}_{0})_{i+1}$ (36)
$(\dot{\theta}_{\pi})_{i}=-(\dot{\theta}_{\pi})_{i+1}$ (37)

This represents the almost elastic collisions between the plastic spheres,
which immediately models the momentum conservation law between the plastic
spheres. The codes needed to solve the equation numerically and to obtain
plots of the system are all provided by chatGPT. These codes can be seen in
the Appendices.

##  4 Code Proof-testing in Kapitza Model

To test the performance of the code, we simulate a special case called the
Kapitza model, as in section 2.4 To do this, we just need to use code (b)
($\theta$ as a function of time) and insert some numeric constants which are
in agreement with the approximations in section 2.4. It is also important to
note that the equation of motion - equation 11 \- of the pendulum is strictly
independent of the bob’s mass, hence for convenience, we may as well set
$m=0.020$kg. In addition, to cover all ranges of mass, we define the specific
energy $E^{\prime}$ as the energy per unit mass (kg). We use the following
numeric values:

  1. (a)

$a_{0}=0.01$ m

  2. (b)

$l=0.25$ m

  3. (c)

$g=9.81$ $m/s^{2}$

  4. (d)

$\omega=100$ rad/s

  5. (e)

$\theta_{(0)}=1.5$ rad

  6. (f)

$\dot{\theta}_{(0)}=0$ rad/s

Figure 3: We notice the $\theta$ may be decomposed just as our approximation
in section 2.4 ($\theta\approx\gamma+\beta$)

From here, it is safe to say that the codes provided should work just fine

##  5 Results in Lato-lato

Now that we have the codes that represent the lato-lato’s mechanics, we can
analyze the reason why playing the lato-lato is difficult. In general, we have
observed that there are 2 main phases in the system’s motion. To analyze we
will use the 4 codes we have attached in GitHub[14].

###  5.1 Maximum Amplitude

The code provided in [14] will plot a graph of the maximum amplitude vs
$\omega$. From this graph, we can see that there are 2 phases. The first phase
represents the normal pendulum motion and the second phase represents the
condition at which the spheres collide at both $\theta=0$ and $\theta=\pi$
rads.

Figure 4: The maximum amplitude is only considered within the 3-second range
after the motion starts. This is done to imitate the way people usually play
the lato-lato. The figures are plotted for $a_{0}=0.05$ m, $a_{0}=0.1$ m,
$a_{0}=0.5$ m and $a_{0}=1$ m.

The three graphs represent the plots for different $a_{0}$. The graph in the
upper left corner shows the plot for $a_{0}=0.5$ m, the one in the upper right
corner is the zoomed version of the latter, the one in the lower left shows
for $a_{0}=0.1$ m, and in the lower right corner shows for $a_{0}=1$ m. Notice
how different $a_{0}$ yield different maximum $\omega$ graphs.
Generally, one may observe that when the driven amplitude $a_{0}$ is
increased, the minimum driven angular frequency $\omega$ needed to reach phase
2 is lower. For lower amplitudes on the other hand, specific $\omega$ should
be maintained to reach phase 2. This strengthens the argument as to why the
lato-lato is a difficult game.

###  5.2 $\theta$ as a function of time

In this part, we can see the graph that represents the polar coordinates of
the lato-lato as a function of time. Through these plots, we should be able to
get a general feel of the system’s motion.

(a) (b)

Figure 5: Figure on the left shows $\theta$ as a time function for $\omega=1$
rad/s and the one on the right shows for $\omega=10$ rad/s. For the smaller
$\omega$, we have a sinusoidal amplitude function and a less periodic wave
function for $\omega>10$ rad/s

Figure 4 shows the $\theta$ vs time function for $a_{0}=0.5$ m. In general, we
can see that increasing the $\omega$ whilst keeping the $a_{0}$ constant will
help the lato-lato reach the 2nd phase. However, this will not be the case if
$a_{0}$ is too small.
At lower angular frequencies, we may observe an amplitude undergoing
sinusoidal change. Furthermore, at higher angular frequencies, the second
phase is easily reached, though the motion does not seem as periodic as the
latter.

###  5.3 Energy as a function of time and $\theta$

Figure 6: Figures on the left show one of the pendulum’s energy as a time
function and $\theta$ for $\omega=1$ rad/s and the on the right shows for
$\omega=10$ rad/s. For the smaller $\omega$, we have a periodic graph, whereas
the larger one shows a rather irregular progression. All the graphs are
plotted at $a_{0}=0.5$ m

Through the plots in this section, we should be able to understand the energy
transfer777Energy transfer here, refers to how much work is being transferred
from the person’s hand to the lato-lato system. that occurs between the system
and the driving force. We will yield plots that show how the energy transfer
varies as a function of the driven $\omega$. Consequently, one may compare how
the energy of the system relates to the lato-lato’s position.

First, it is important to notice that at lower angular frequency $\omega$, the
energy indeed has an amplitude varying periodically, similar to the $\theta$
plot we have obtained. Likewise for higher $\omega$, a fluctuating pattern can
be seen. Moreover, notice how the energy transfer is larger for a higher
$\omega$. The energy reached at $\theta=0$ may yield relatively high values,
reaching a maximum of $E_{max}=17.60$ J/kg and minimum $E_{min}=2.23$ J/kg for
$\omega=1$ rad/s. A less orderly graph can be seen, with a maximum energy of
$E_{max}=86.88$ J/kg and $E_{min}=0.01$ J/kg for the higher $\omega=10$ rad/s.
This explains why it is easier for the system to reach the 2nd phase when
given a higher angular frequency, recalling that the energy transfer is higher
in the high angular frequency case.

###  5.4 System’s stability

The mesh plots provided in this section will directly show us the phase
conditions in the lato-lato’s phase diagram, that is whether it reaches the
2nd phase or not. The mesh plots will give a diagram representing the
amplitude conditions vs the initial boundary conditions $\theta_{0}$ and
$\dot{\theta}_{0}$. In this section, we will be able to analyze which sort of
amplitudes will give the easiest condition required to reach the 2nd phase of
the motion. We will compare three driven amplitudes, which are (1)
$a_{0}=0.1m$, (2) $a_{0}=0.5m$, and (3) $a_{0}=1m$.

####  5.4.1 $a_{0}=0.05m$

We can see the yellow dot reaches the 2nd phase at around $\omega=13-16$
rad/s888People usually play the lato-lato at this angular frequency,
equivalent to a frequency of about 2-3 Hz). From the mesh plots, we can also
see more unstable999”unstable” refers to not being able to reach phase 2
(colored red). regions (there is a larger blue area in between the red ones),
especially at around 15-18 rad/s. Due to the irregularity in the region
distribution, we may infer that relatively small changes in the angular
frequency can cause huge changes in the system’s mesh plots. For the purpose
of our analysis, we will focus on the transition experienced by the yellow dot
at around $\omega=16.25$ rad/s, and $\omega=13$ rad/s.
Taking the average of the lower (13 rad/s) and upper limit (16.25 rad/s) of
the typical $\omega$ values, yields $\omega=14.625$ rad/s. This gives a
$\delta_{low}$101010Defined as $\frac{\Delta\omega}{\omega}$. $\Delta\omega$
is calculated as $\omega_{f}-\omega_{0}$, where $\omega_{f}$ represents the
$\omega$ at which the point experiences a transition in phase. A lower value
of $\delta$ shows a larger sensitivity of 12.5$\%$ and $\delta_{high}$ of
about 11.1$\%$. At this $\omega$, we get a relatively stable condition.
Therefore, to reach phase 2 in the lato-lato’s motion, one has to maintain a
specific angular frequency and initial conditions.

Here, we have made the assumption that the changes are done at the yellow dot.
This means if the error is done at random initial conditions $\theta_{0}$ and
$\dot{\theta}_{0}$, for instance at ($1$ rad, $-1.5$ rad/s ), the system will
no longer be able to reach the desired phase 2, in 3 seconds.

Figure 7: Mesh plot progression for $a_{0}=0.05m$, $a_{0}=0.5m$ and $a_{0}=1m$
showing Amplitude Conditions for different $\omega$. Phase 1 in the mesh plots
is denoted by the color blue and phase 2 by the color red. The yellow dot
shows the observed condition, that is at $\theta_{0}=2$ rad and
$\dot{\theta_{0}}=-0.5$ rad/s

####  5.4.2 $a_{0}=0.5m$

Notice at a very high $\omega$, the system will reach the 2nd phase regardless
of the boundary conditions. Focusing on the yellow dot, it can be seen the
system starts to enter the 2nd phase at $\omega=6.1$rad/s and $\omega=6.5$
rad/s. Subsequently, it enters the 2nd phase again at $\omega=8$rad/s, from
which it stays there for any $\omega$ larger than the former. If we consider
the $\omega=6.3$ rad/s, the $\delta$ towards $\omega=6.1$ rad/s is about
$3.8\%$ and $3.17\%$ towards $\omega=6.5$ rad/s. This shows that at the hill-
like contour, the system is not very stable when compared with the case
$(a_{0},\omega)=(0.05$ m, $14.63$ rad/s). However, specific initial
conditions, such as (3,1.5), allow a very stable condition, as shown in the
mesh plot progression.

####  5.4.3 $a_{0}=1m$

Even though the numeric value for this consideration may be considered
unrealistic, we may still get a decent analysis by considering this case.
Notice how the small budge in Figure 3 now reaches the maximum $\theta=3.14$
rad. This means that when we increase the driven amplitude $a_{0}$, it becomes
easier to reach the 2nd phase of the lato-lato’s motion. The yellow dot
quickly reaches the 2nd phase at $\omega=5$ rad/s, and for all $\omega$ bigger
than 5, it stays in the 2nd phase. Moreover, it becomes clearer that the
considered initial condition reaches the “all-red” part of the diagram more
quickly, as expected when the amplitude is increased.

Therefore, it is better to just play at a high frequency, because that way we
can guarantee a larger energy transfer111111Energy transfer here, refers to
the energy transfer from the player’s hand to the lato-lato system (stable at
phase 2).

##  6 Conclusion

Having analyzed the conditions for reaching phase 2 of the lato-lato’s motion,
we may finally infer that there are certain driven angular frequencies and
amplitudes required to maintain its motion. These characteristics may be
sensitive as observed in Section 5.4.1, for $a_{0}=0.05m$. Even at a very
specific $\omega=14.63$ rad/s, we only get a $\delta$ of as much as 12%, which
can be considered extremely sensitive. As a result, subtle changes at the
incorrect moment may prevent continuous collisions between the bobs. Through
the analysis of phase diagrams, we have qualitatively proven that playing the
lato-lato is indeed difficult. Furthermore, throughout this paper, we have
only considered the dynamics of a stick-based pendulum, which is easier to
control than the one made of string. Therefore, trained muscle memory and
experience are some of the necessities required if we wish to master this
game.

Acknowledgments We would like to deliver our deepest appreciation to Sandy
Adhitia Ekahana for the spark of ideas[15]. Further, this paper would not have
been made possible without the codes required for the numerical analysis which
are provided by the AI ChatGPT.

## References

  *   * Ben [2001] Ben, S.: Working the Web: Retro Toys (2001). https://www.theguardian.com/technology/2001/jul/26/internet.shopping
  * [2] Jokowi Main Lato-lato di Pasar Subang, Ridwan Kamil Ikut Jajal. https://www.cnnindonesia.com/nasional/20221228085611-32-892950/jokowi-main-lato-lato-di-pasar-subang-ridwan-kamil-ikut-jajal Accessed 2023-11-10
  * Udasmoro [2022] Udasmoro, W.: The impact of lato-lato games on behavioral changes in elementary children. Journal of Contemporary Gender and Child Studies 1(2), 30–35 (2022)
  * Akhsan et al. [2023] Akhsan, H., Putra, G.S., Ariska, M.: Newtonian yoyo (lato-lato) phenomenon in indonesia: An innovative resource for igcse physics teaching and learning? Jurnal Penelitian & Pengembangan Pendidikan Fisika 9(1), 119–126 (2023)
  * Wibowo [2023] Wibowo, E.: Determine g using lato lato. Physics Education 58(4), 045009 (2023) https://doi.org/10.1088/1361-6552/acdb39
  * Wibowo et al. [2024] Wibowo, E., Ulya, N., Marwoto, P.: Demonstration of conservation of momentum using lato lato 2.0. Physics Education 59(2), 025025 (2024) https://doi.org/10.1088/1361-6552/ad240c
  * Gauld [2006] Gauld, C.: Newton’s cradle in physics education. Science & Education 15, 597–617 (2006) https://doi.org/10.1007/s11191-005-4785-3
  * Cross and Gauld [2020] Cross, R., Gauld, C.: Understanding newton’s cradle. ii: exploring a real cradle. Physics Education 56(2), 025002 (2020) https://doi.org/10.1088/1361-6552/abc637
  * Bartuccelli et al. [2002] Bartuccelli, M., Gentile, G., Georgiou, K.: Kam theory, lindstedt series and the stability of the upside-down pendulum. Mathematics 9 (2002) https://doi.org/10.3934/dcds.2003.9.413
  * Morin [2008] Morin, D.: Introduction to Classical Mechanics: With Problems and Solutions. Cambridge University Press, Cambridge (2008)
  * M. V. Bartuccelli and Georgiou [2001] M. V. Bartuccelli, G.G., Georgiou, K.V.: On the dynamics of a vertically driven damped planar pendulum. Proceedings of the Royal Society A 457, 3009 (2001) https://doi.org/10.1098/rspa.2001.0841
  * Butikov [2021] Butikov, E.I.: Kapitza’s pendulum: a physically transparent simple treatment. EI Butikov’s Personal Web page http://butikov. faculty. ifmo. ru/, retrieved 7 (2021)
  * Greenwood [2003] Greenwood, D.T.: Advanced Dynamics. Cambridge University Press, Michigan (2003)
  * Funata [2024] Funata, F.C.: All Lato-Lato Code. Online; accessed 13-April-2024 (2024). https://github.com/FansenCandra/All-Lato-Lato-Code
  * Ekahana [2023] Ekahana, S.A.: Lato-lato dan Frekuensi Natural. Online; accessed 9-November-2023 (2023). https://sandyekahana.wordpress.com/2023/01/10/lato-lato-dan-frekuensi-natural/


# BBA-net: A bi-branch attention network for crowd counting

###### Abstract

In the field of crowd counting, the current mainstream CNN-based regression
methods simply extract the density information of pedestrians without finding
the position of each person. This makes the output of the network often found
to contain incorrect responses, which may erroneously estimate the total
number and not conducive to the interpretation of the algorithm. To this end,
we propose a Bi-Branch Attention Network (BBA-NET) for crowd counting, which
has three innovation points. i) A two-branch architecture is used to estimate
the density information and location information separately. ii) Attention
mechanism is used to facilitate feature extraction, which can reduce false
responses. iii) A new density map generation method combining geometric
adaptation and Voronoi split is introduced. Our method can integrate the
pedestrian’s head and body information to enhance the feature expression
ability of the density map. Extensive experiments performed on two public
datasets show that our method achieves a lower crowd counting error compared
to other state-of-the-art methods.

Index Terms—  Crowd Counting, Convolutional Neural Networks, Regression,
Attention Mechanism, Voronoi Split

##  1 Introduction

Crowd counting plays an important role in public safety, especially in crowd
scenes such as concerts, sporting events, and celebrations. Without proper
management, stomping events can occur and the basic premise of management is
to count people. Crowd counting is a challenging task due to the occlusions,
perspective distortions, and person distributions. Many researches have been
done to solve these problems. Among them, the CNN-based regression methods
take a crowd image as input and produce a density map which is further
accumulated to get the number of people. The head sizes in the same image may
greatly vary, which poses a problem for CNN to extract scale-invariant
features. Many methods focus on dealing with this problem, including multi-
column networks, scale aggregation modules, and scale invariance
architectures. The typical multi-column methods include multi-column fusion
[1] and deep-shallow network fusion [2]. The typical scale aggregation modules
[3, 4] aggregate scale-invariant features by different kernel sizes. The
typical scale invariance architectures [5, 6, 7, 8, 9, 10] focus on the design
of single-column architectures. Other works also explore the weak supervision
[11, 12, 13] to leverage unlabeled data.

Fig. 1: A crowd image with its corresponding density map. Fig. 2: The
architecture of the proposed method.

We focus on resolving two challenges in this paper: 1) The previous crowd
counting algorithms [1, 14, 2, 3] only predict the density map, which cannot
see the heads been successfully or unsuccessfully detected. Thus, the
performance of the network cannot be explained. For example, which factor
contributes the most to total losses? To tackle this problem, we innovatively
design a bi-branch network via adding a head location map (also head anchor
map) prediction branch. The predicted head anchor map is sparse so we can get
head detection boxes by post-processing. Besides, we propose to use the
attention mechanism to refine pedestrian features, which can reduce the error
responses shown in the network’s output. 2) Most of the previous crowd
counting algorithms [3, 2, 1] adopt a geometry-adaptive method to produce
density maps. We find that using such a method, the network can misrecognize
traffic signs and billboards as pedestrian’s heads. Because the network can
only learn pedestrian’s head features without context such as body features.
To this end, we exploit a Voronoi-based method to produce context-awareness
density maps. By combining the geometry-adaptive method and Voronoi-based
method, our experiments show that this strategy can increase effectiveness and
robustness.

We evaluate our method on two crowd datasets ShanghaiTech and UCF_CC_50. The
results show that our method can consistently outperform state-of-the-art
methods.

##  2 Proposed Method

###  2.1 Voronoi-Based Density map

Most of the previous methods adopt a geometry-adaptive algorithm [1] to
produce the ground truth density map $F_{geo}$,

$F_{geo}(x)=\sum_{i=1}^{N}{\delta(x-x_{i})*G_{\delta_{i}}(x)}$ (1)

where $\delta_{i}=\beta\overline{d}_{i}$, and
$\overline{d}_{i}=\frac{1}{m}\sum_{j=1}^{m}d_{j}^{i}$. $\overline{d}_{i}$
represents the average distance from the annotated point to $m$ nearest
neighbors. This method ignores the pedestrian’s body features, which may
affect the high-quality feature extraction and density map regression. The
misrecognition of traffic signs and billboards are due to it. To resolve this
problem, we propose a new density map generation method based on Voronoi
split.

Fig. 3: The left figure is a demo of Voronoi split and the middle figure shows
the Gaussian kernel considering the body contexts of pedestrians.

As shown in Fig. 3, Voronoi split is operated on all annotated points (head
anchors) in the images. After splitting, each pixel is affiliated to the
closest annotated point. Then, we draw a vertical line from the head anchor
$F$ downward and intersect the corresponding Voronoi polygon at $D$. An
ellipse is constructed inside the polygon, whose semi-axis $a$ and $b$ can be
estimated by:

$f+a=\gamma d\ \ ,\ b=\overline{l}$ (2)

where $f$ indicates the focal length, $d$ denotes the distance between $F$ and
$D$, $\overline{l}$ represents the average distance from the annotated point
to $k$ nearest Voronoi polygon edges, and $\gamma$ is an empirical parameter
and we set $\gamma=0.8$. We take $a$ and $b$ as standard deviations of
Gaussian kernel, so the proposed density map is given by

$F_{vor}(x)=\sum_{i=1}^{N}{\delta(x-x_{i})*G_{\delta_{i}^{1},\delta_{i}^{2}}(x)}$
(3)

where $\delta_{i}^{1}=\eta a$ , $\delta_{i}^{2}=\eta b$, and we set the
empirical parameter $\eta=1$.

Due to the pedestrian’s body block one another in highly crowded scenes, the
head may be the only source for feature extraction. The above-mentioned
methods are combined to produce the final density map.

$F=(1-\lambda)F_{geo}+\lambda F_{vor}$ (4)

where $\lambda$ indicates the weight of two density maps, and we set $\lambda$
is set to 0.5 in the following experiments.

###  2.2 Network Architecture

As shown in Fig. 2, the designed architecture consists of three stages: 1)
feature extraction that aims to learn low-level features, 2) self-attention
that aims to refine the learned features and 3) map regression that aims to
learn anchor map and density map simultaneously.

The feature extraction module is constructed by stacking the first 13 layers
of VGG16 [15], which contains three max-pooling layers. The self-attention
module [16] is adopted to generate attention map, targeting to attend to
pedestrian relative features. In particular, features from the feature
extraction module are fed into a self-attention module which consists of two
paths, one for high-level feature extraction and the other for attention
estimation. The feature extraction path is built by two residual blocks [17]
that act as multiple detectors to extract semantic structures. Inspired by the
attention mechanism that coherently understands the whole image and further
focus on local discriminative regions, we adopt attention blocks here. The
attention path is built by an encoder-decoder network that acts as a mask
function to re-weight the features for automatic inference of regions of
interest. It is difficult to directly learn anchor map from the extracted
feature since the anchor map is more discrete than the density map. On the
other hand, density map regression can provide common information for high-
quality anchor map learning. Moreover, it is easy to converge, due to the
smoother Gaussian filter. Inspired by this observation, we design a novel map
regression strategy, which decomposes regression into a density map regression
component and an anchor regression component. The decomposition facilitates
the optimization significantly without bringing extra complexity in inference.

We use Euclidean distance as the loss function for both two branches, which
can be defined by:

$L_{den}(\Phi)=\frac{1}{2N}\sum_{i=1}^{N}{\|F^{den}(X_{i};\Phi)-F^{den}_{i}\|_{2}^{2}}$
(5)
$L_{anc}(\Phi)=\frac{1}{2N}\sum_{i=1}^{N}{\|F^{anc}(X_{i};\Phi)-F^{anc}_{i}\|_{2}^{2}}$
(6)

where $\Phi$ is a set of learnable parameters in our model, $N$ is the number
of training image, $X_{i}$is the input image. $F^{den}_{i}$ and $F^{anc}_{i}$
are the ground truth. $F^{den}(X_{i};\Phi)$ stands for the estimated density
map, and $F^{anc}(X_{i};\Phi)$ stands for the estimated anchor map. The final
combinatorial loss $L$ is formulated as a weighted sum of $L_{den}$ and
$L_{anc}$ as:

$L=\omega L_{den}+(1-\omega)L_{anc}$ (7)

where $\omega$ is a factor to balance the contributions of $L_{den}$ and
$L_{anc}$. We empirically set $\omega=0.5$ in our experiments.

###  2.3 Training Details and Post Processing

We train our model in an end-to-end manner from the VGG16 pre-trained model.
Moreover, we optimize the network parameters based on the stochastic gradient
descent (SGD) optimizer. The batch size is set to 50, and the initial learning
rate is set to $10^{-6}$. The learning rate is decreased by a factor of 0.1
every 5 iterations.

The produced head anchor map is more sparse than the density map as depicted
in Fig. 5. Thus, the post-processing method can be used to roughly calculate
the head detection box. The post-processing algorithm first performs a
threshold to erase noise, then uses non-maximum suppression to extract head
anchor. Finally, the bounding box is estimated by using the above mentioned
geometry-adaptive method.

##  3 Experiments

###  3.1 Evaluation Metrics

We use mean absolute error (MAE) and mean squared error (MSE) to evaluate our
model’s performance. The MAE and MSE are defined by:

$MAE=\frac{1}{N}\sum_{i=1}^{N}{|C_{i}-C_{i}^{GT}|}\ \ \ \
MSE=\sqrt{\frac{1}{N}\sum_{i=1}^{N}{|C_{i}-C_{i}^{GT}|}^{2}}$ (8)

$C_{i}$ is the estimated number of person and $C_{i}^{GT}$ means the ground
truth number of person. In general, the MAE and MSE can show the accuracy and
robustness, respectively.

###  3.2 Evaluation Results

Fig. 4: Examples of the predicted head detection box and density map on the
ShanghaiTech dataset. The ground truth numbers and the estimated results are
also shown below.

ShanghaiTech. This dataset consists of Part_A and Part_B which contains 1198
images, with a total number of 330,165 labeled heads. There are 482 congested
images in part_A which are downloaded from the Internet, and 716 images in
Part_B which are taken from busy streets in Shanghai. We slice the training
images to patches and double them by PCA whitening. The comparison results are
shown in Table 1, we find that our model achieves 0.4 lower MAE than the
previous state-of-the-art methods in the ShanghaiTech B. Besides, our method
also increases prediction robustness.

Table 1: Comparing the performances of different methods on the ShanghaiTech
dataset and UCF_CC_50 dataset.

Method | Part_A | Part_B | UCF_CC_50
---|---|---|---
MAE |  MSE |  MAE |  MSE |  MAE |  MSE
Zhang et al.[18] |  181.8 |  277.7 |  32.0 |  49.8 |  467.0 |  495.8
CP-CNN [19] |  73.6 |  106.4 |  20.1 |  30.1 |  295.8 |  320.9
SaCNN [20] |  86.8 |  139.2 |  16.2 |  25.8 |  314.9 |  424.8
ACSCP [21] |  75.7 |  102.7 |  17.2 |  27.4 |  291.0 |  404.6
IG-CNN [22] |  72.5 |  118.2 |  13.6 |  21.1 |  291.4 |  349.4
DeepNCL [23] |  73.5 |  112.3 |  18.7 |  26.0 |  288.4 |  404.7
CSRNet [5] |  68.2 |  115.0 |  10.6 |  16.0 |  266.1 |  397.5
SANet [3] |  67.0 |  104.5 |  8.4 |  13.6 |  258.4 |  334.9
PACNN [24] |  66.3 |  106.4 |  8.9 |  13.5 |  267.9 |  357.8
HACCN [10] |  62.9 |  94.9 |  8.1 |  13.4 |  256.2 |  348.4
TEDnet [25] |  64.2 |  109.1 |  8.2 |  12.8 |  249.4 |  354.5
Ours |  63.8 |  93.8 |  7.8 |  12.0 |  230.5 |  316.9

UCF_CC_50. This dataset [26] contains 50 congested images of varying
resolutions. The number of labeled head ranges from 94 to 4543, which is very
unbalanced. We used 5-fold cross-validation to validate the performance.
Considering that this dataset is so small, we use ShanghaiTech A pre-trained
model to finetune it. The training just needs 5 epochs to converge. The
results show that our model achieves the lowest MAE and obtains 19 lower MAE
than the previous state-of-the-art methods.

###  3.3 Ablation Studies and Analysis

Baseline. Our baseline model consists of a VGG16 front-end and a density map
regression branch. The density map is calculated by a geometry-adaptive
method. We perform ablation studies on the ShanghaiTech B dataset. The results
are shown in Table 2.

Attention. Attention block is a crucial module for improving performance,
which aims to extract useful features. Besides, the residual units inside skip
connections of the attention blocks can speed up convergence during the
training phase. We also assess the effectiveness of the different number of
attention blocks. The results show that we achieve the most effective
performance with two attention blocks.

Anchor Map Branch. We measure the gain of adding bi-branch architecture. The
results show that the anchor map branch largely improves performance. We also
illustrate the visualization results of the density map and anchor map using
the PSNR (Peak Signal-to-Noise Ratio) and SSIM [27] metrics. As shown in Fig.
5, the anchor map is more discrete than the density map. Due to this
attribute, the anchor map branch can add strongly prior information of head
location for the density map learning, meanwhile, the density map branch
promotes the anchor map branch convergence.

Voronoi-based Method. We further evaluate the effect of the Voronoi-based
method. As shown in Table 2, the performance is improved by 1.28. The results
show that using the Voronoi-based method could effectively enhance
performance. We also evaluate the Voronoi-based method on the UCF_CC_50
dataset, due to the inadequate body context information in such a crowd scene,
that is the reason why it has slight improvement, so the network can only
extract head features.

Visual Analysis. As shown in Fig. 4, we find that when people are close to
another person, the network usually misrecognizes them. Furthermore, in an
extremely crowded scene, the output response of the density map is locally
plain. It means that strong supervision is required to extract a tiny head. It
validates the utilization of our bi-branch architecture that simultaneously
learning general features and head locations.

Table 2: Ablation studies of self-attention, anchor map branch, Voronoi-based
method on the ShanghaiTech B dataset

Method |  MAE |  MSE
---|---|---
Base |  33.8 |  50.6
Base+Anchor |  21.2 |  32.4
Base+Attention(2) |  13.1 |  18.9
Base+Anchor+Attention(1) |  11.0 |  17.3
Base+Anchor+Attention(2) |  9.2 |  13.3
Base+Anchor+Attention(3) |  10.6 |  16.0
Base+Anchor+Attention(2)+Voronoi |  7.8 |  12.0

Fig. 5: The middle and right figures are the density map and anchor map
produced by our network. PSNR and SSIM are also calculated below.

##  4 Conclusion

In this paper, we propose a Bi-Branch Attention Network for crowd counting.
The Bi-Branch architecture and attention blocks make the model extract more
detailed and accurate pedestrian features. Besides, a new density map
generation method based on Voronoi is also been exploited. Extensive
experiments demonstrate that our method can significantly improve the baseline
model and outperforms the state-of-the-art methods.

## References

  * [1] Yingying Zhang, Desen Zhou, Siqin Chen, Shenghua Gao, and Ma Yi,  “Single-image crowd counting via multi-column convolutional neural network,”  in Computer Vision & Pattern Recognition, 2016.
  * [2] Lokesh Boominathan, Srinivas S. S. Kruthiventi, and R. Venkatesh Babu,  “Crowdnet: A deep convolutional network for dense crowd counting,”  in ACM Multimedia, 2016.
  * [3] Xinkun Cao, Zhipeng Wang, Yanyun Zhao, and Fei Su,  “Scale aggregation network for accurate and efficient crowd counting,”  in Proceedings of the European Conference on Computer Vision (ECCV), 2018, pp. 734–750.
  * [4] Lingke Zeng, Xiangmin Xu, Bolun Cai, Suo Qiu, and Tong Zhang,  “Multi-scale convolutional neural networks for crowd counting,”  in 2017 IEEE International Conference on Image Processing (ICIP). IEEE, 2017, pp. 465–469.
  * [5] Yuhong Li, Xiaofan Zhang, and Deming Chen,  “Csrnet: Dilated convolutional neural networks for understanding the highly congested scenes,”  in Proceedings of the IEEE conference on computer vision and pattern recognition, 2018, pp. 1091–1100.
  * [6] Ze Wang, Zehao Xiao, Kai Xie, Qiang Qiu, Xiantong Zhen, and Xianbin Cao,  “In defense of single-column networks for crowd counting,”  arXiv preprint arXiv:1808.06133, 2018.
  * [7] Siyu Huang, Xi Li, Zhi-Qi Cheng, Zhongfei Zhang, and Alexander Hauptmann,  “Stacked pooling: Improving crowd counting by boosting scale invariance,”  arXiv preprint arXiv:1808.07456, 2018.
  * [8] Mohammad Asiful Hossain and Mehrdad Hosseinzadeh,  “Crowd counting using scale-aware attention networks,”  2019 IEEE Winter Conference on Applications of Computer Vision (WACV), pp. 1280–1288, 2019.
  * [9] Mohammad Hossain, Mehrdad Hosseinzadeh, Omit Chanda, and Yang Wang,  “Crowd counting using scale-aware attention networks,”  in 2019 IEEE Winter Conference on Applications of Computer Vision (WACV). IEEE, 2019, pp. 1280–1288.
  * [10] Vishwanath A Sindagi and Vishal M Patel,  “Ha-ccn: Hierarchical attention-based crowd counting network,”  IEEE Transactions on Image Processing, vol. 29, pp. 323–335, 2019\.
  * [11] Xialei Liu, Joost van de Weijer, and Andrew D. Bagdanov,  “Leveraging unlabeled data for crowd counting by learning to rank,”  2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7661–7669, 2018.
  * [12] Xialei Liu, Joost Van De Weijer, and Andrew D Bagdanov,  “Exploiting unlabeled data in cnns by self-supervised learning to rank,”  IEEE transactions on pattern analysis and machine intelligence, 2019\.
  * [13] Deepak Babu Sam, Neeraj N Sajjan, Himanshu Maurya, and R Venkatesh Babu,  “Almost unsupervised learning for dense crowd counting,”  in Proceedings of the Thirty-Third AAAI Conference on Artificial Intelligence, Honolulu, HI, USA, 2019, vol. 27.
  * [14] Deepak Babu Sam, Shiv Surya, and R Venkatesh Babu,  “Switching convolutional neural network for crowd counting,”  in 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). IEEE, 2017, pp. 4031–4039.
  * [15] Karen Simonyan and Andrew Zisserman,  “Very deep convolutional networks for large-scale image recognition,”  CoRR, vol. abs/1409.1556, 2015.
  * [16] Fan Yang, Ke Yan, Shijian Lu, Huizhu Jia, Xiaodong Xie, and Wen Gao,  “Attention driven person re-identification,”  Pattern Recognition, vol. 86, pp. 143 – 155, 2019.
  * [17] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun,  “Deep residual learning for image recognition,”  2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 770–778, 2016.
  * [18] Cong Zhang, Hongsheng Li, Xiaogang Wang, and Xiaokang Yang,  “Cross-scene crowd counting via deep convolutional neural networks,”  in Proceedings of the IEEE conference on computer vision and pattern recognition, 2015, pp. 833–841.
  * [19] Vishwanath A Sindagi and Vishal M Patel,  “Generating high-quality crowd density maps using contextual pyramid cnns,”  in Proceedings of the IEEE International Conference on Computer Vision, 2017, pp. 1861–1870.
  * [20] Lu Zhang, Miaojing Shi, and Qiaobo Chen,  “Crowd counting via scale-adaptive convolutional neural network,”  in 2018 IEEE Winter Conference on Applications of Computer Vision (WACV). IEEE, 2018, pp. 1113–1121.
  * [21] Zan Shen, Yi Xu, Bingbing Ni, Minsi Wang, Jianguo Hu, and Xiaokang Yang,  “Crowd counting via adversarial cross-scale consistency pursuit,”  in Proceedings of the IEEE conference on computer vision and pattern recognition, 2018, pp. 5245–5254.
  * [22] Deepak Babu Sam, Neeraj N Sajjan, R Venkatesh Babu, and Mukundhan Srinivasan,  “Divide and grow: Capturing huge diversity in crowd images with incrementally growing cnn,”  in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018, pp. 3618–3626.
  * [23] Zenglin Shi, Le Zhang, Yun Liu, Xiaofeng Cao, Yangdong Ye, Ming-Ming Cheng, and Guoyan Zheng,  “Crowd counting with deep negative correlation learning,”  in Proceedings of the IEEE conference on computer vision and pattern recognition, 2018, pp. 5382–5390.
  * [24] Miaojing Shi, Zhaohui Yang, Chao Xu, and Qijun Chen,  “Revisiting perspective information for efficient crowd counting,”  in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019, pp. 7279–7288.
  * [25] Xiaolong Jiang, Zehao Xiao, Baochang Zhang, Xiantong Zhen, Xianbin Cao, David Doermann, and Ling Shao,  “Crowd counting and density estimation by trellis encoder-decoder networks,”  in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019, pp. 6133–6142.
  * [26] Haroon Idrees, Imran Saleemi, Cody Seibert, and Mubarak Shah,  “Multi-source multi-scale counting in extremely dense crowd images,”  in Computer Vision & Pattern Recognition, 2013.
  * [27] Zhou Wang, Alan C Bovik, Hamid R Sheikh, Eero P Simoncelli, et al.,  “Image quality assessment: from error visibility to structural similarity,”  IEEE transactions on image processing, vol. 13, no. 4, pp. 600–612, 2004.