# EGCY-Net: An ELAN and GhostConv-Based YOLO Network for Stacked Packages in Logistic Systems
## 2 Materials and Methods
### Box Type and Quantity Recognition
#### 2.2.3 The GhostConv Module  
Neural networks usually contain extensive numbers of parameters, particularly in fully connected layers. The advancement of convolutional neural networks has made it possible to use filters that drastically cut down on the number of parameters. In order to create a network suited to performing detection tasks, a large model is generally required, which in turn demands a lot of feature maps, each of which typically contains hundreds of channels. The model is bloated because of the number of layers, even in SOTA models. By reducing the number of parameters in a neural network, we can make it easier to deploy on devices. Illustrations of the convolution layer and GhostConv are presented in Figure 10.  
The input feature map is represented by \(X\in R^{c\times h\times w}\), where \(c\) denotes the number of channels in the input feature map, and \(h\) and \(w\) denote the feature map's height and width, respectively. The standard convolution method is presented in Equation (1), as follows:  
\[Y=X*f+b. \tag{1}\]  
In that equation, \(Y\in R^{n\times h^{\prime}\times w^{\prime}}\) represents an output feature map with \(n\) channels, where \(h^{\prime}\) and \(w^{\prime}\) represent the height and width, respectively, of the output feature map. The convolution filters are denoted by \(f\in R^{c\times h\times k\times n}\), and \(*\) indicates the convolution operation. The size of the convolution kernel is \(k*k\), and \(b\) represents the bias term. The regular convolution computation, excluding the bias term, is approximately equal to \(n\times h^{\prime}\times w^{\prime}\times c\times k\times k\). In a shallow layer of the network, the values of \(h^{\prime}\) and \(w^{\prime}\) are more expansive, whereas in a deeper layer, the values of \(n\) and \(c\) are larger. The ghost convolution [17] method was introduced, which comprises two components: a regular convolution kernel that produces a limited number of feature maps and the creation of additional feature maps in a lightweight linear transform layer. This can be mathematically represented as follows:  
\[Y^{\prime}=X*f^{\prime}+b. \tag{2}\]  
Figure 10: **(a)** The convolution layer and (b) the ghost convolution layer.  
Equation (2) represents a standard convolutional layer that produces only a small number of feature maps. Here, \(Y^{\prime}\in R^{l^{\prime}\times w^{\prime}\times m}\) represents the resulting feature output, and \(f^{\prime\in R^{c\times k\times k\times m}}\) represents the size of the convolutional kernel used. The output feature map has fewer channels compared to the standard convolutional layer, specifically \(m<n\).  
\[y_{ij}=\phi_{i,j}(y^{\prime}_{i}). \tag{3}\]  
The linear transformation layer--responsible for producing redundant feature maps--is represented by Equation (3), where \(y_{i}\) represents the m feature maps of \(Y^{\prime}\). In order to generate s feature maps, a lightweight linear transformation operation is applied to each feature map in \(Y^{\prime}\). When the \(d\times d\) convolution is employed as the linear transform, the final linear transform is mandatorily specified as a constant transform. Consequently, linear transformations of the \(m\times(s-1)\) feature maps yield \(m\) feature maps. Using ghost convolution, the total computation is \((s-1)\times m\times h^{\prime}\times w^{\prime}\times k\times k\).