## 2 Related Works  
### Channel State Information and Its Relation to Wi-Fi Sensing  
CSI in a Wi-Fi system is a collection of data that describes how a wireless signal propagates from a transmitter to a receiver. CSI captures the characteristics of wireless signal propagation in physical environments, which includes the combined effect of diffraction, reflection, and scattering. Contemporary wireless networks adhering to the IEEE 802.11 standard employ advanced techniques like Multiple-Input Multiple-Output (MIMO) and Orthogonal Frequency Division Multiplexing (OFDM) at the physical layer. These technologies aim to enhance the data capacity and improve channel orthogonality in the environments affected by multipath propagation. For each transmitter-receiver antenna pair, CSI provides detailed information about the phase shift and amplitude attenuation experienced by the signal across multiple paths for each subcarrier. Specifically, the CSI for a subcarrier \(k\) between a transmitter with \(N_{t}\) antennas and a receiver with \(N_{r}\) antennas is often represented by a complex matrix \(H(k)\)  
\[H(k)=\begin{bmatrix}h_{11}(k)&\cdots&h_{1N_{t}}(k)\\ h_{21}(k)&\cdots&h_{2N_{t}}(k)\\ \vdots&\vdots&\vdots\\ h_{N_{t}1}(k)&\cdots&h_{N_{t}N_{t}}(k),\end{bmatrix},\quad k\in[1,K]\]  
where \(K\) represents the number of subcarriers used by a Wi-Fi system, and \(h_{rc}(k)\) represents the complex channel gain from the \(c\)-th transmitting antenna to the \(r\)-th receiving antenna. Each element \(h_{rc}(k)\) in the CSI matrix \(H(k)\) can be further decomposed into the amplitude and phase components as follows:  
\[h_{rc}(k)=|h_{rc}(k)|*exp(j\theta_{rc}(k)), \tag{1}\]  
where \(|h_{rc}(k)|\) is the amplitude component, and \(\theta_{rc}(k)\) is the phase component of \(h_{rc}(k)\).  
Since CSI contains both amplitude and phase information for each subcarrier and each transmitting antenna and receiving antenna pair, it offers higher-resolution data compared to simple RSS measurements. Therefore, CSI data can be regarded as Wi-Fi images of the signal propagation environment. The changes in the environment by the presence and movement of people affect the Wi-Fi signal propagation, and these alterations in the signal path cause variations in the CSI. Since different number of people create subtle but different patterns in the CSI, it is possible to count the number of people by learning the patterns of CSI variations, which is the principal concept behind the CSI-based people-counting system.  
Among the two components in each \(h_{rc}(k)\), the phase component has been mainly used in model-based Wi-Fi sensing systems that aim to explicitly describe the Wi-Fi signal propagation environment [22]. However, the presence of random offsets in the phase component makes it challenging to extract stable phase values when compared to the amplitude component [23]. Therefore, in general, deep learning-based Wi-Fi sensing systems usually utilize the amplitude component. Specifically, deep learning-based Wi-Fi sensing systems stabilize the amplitude component through preprocessing to make it more suitable for deep learning model training [9]. Our research aligns with this trend. We utilize only the amplitude component of CSI data. It is well established that even a sophisticated deep learning model can only perform as well as the quality of the data fed into the input layer of the model allows. With this in mind, we propose an enhanced CSI amplitude data preparation method to increase the accuracy of a deep learning-based Wi-Fi sensing system for detecting the number of people in a wide range of real-world scenarios.