## 2 Materials and Methods
### Bee Motion Counting and Image Data
#### 2.2.3 BEE2 Dataset  
The second dataset of 112,879 labeled images for this investigation, henceforth referred to as BEE2, was obtained from the videos captured by four BeePi monitors on four Langstroth beehives with Carniolan honeybee colonies in Logan, UT, USA (41.7370\({}^{\circ}\) N, 111.8338\({}^{\circ}\) W) in May and June 2018. All colonies were hired in late April 2018 by the first author. We refer to the four hives with BeePi monitors as M\({}_{18}^{2}\), M\({}_{18}^{2}\), M\({}_{18}^{3}\), and M\({}_{18}^{4}\). (The superscripts denote monitor numbers; the subscripts refer to year 2018.) M\({}_{18}^{4}\) and M\({}_{18}^{2}\) were approximately 10 m apart with M\({}_{18}^{4}\) facing south and M\({}_{18}^{2}\) facing southwest. South-facing M\({}_{18}^{3}\) was approximately 30 m north of M\({}_{18}^{4}\) and M\({}_{18}^{2}\). M\({}_{18}^{4}\) was approximately 20 m west of M\({}_{18}^{3}\) and faced south-west. M\({}_{18}^{4}\) and M\({}_{18}^{2}\) were completely under trees with only occasional  
Figure 6: A sample of images from BEE1. The first four rows include images classified as BEE. The last three rows consist of images classified as NO-BEE.  
sun rays penetrating the foliage. M\({}_{18}^{3}\) was under the sun from 9:00 to approximately 13:00. M\({}_{18}^{4}\) received direct sunlight from approximately 15:00 to 16:30.  
A total of 5509 1-super videos and 5460 2-super videos were captured. All videos had a resolution of 1920 \(\times\) 1080 pixels. The 1-super videos were captured from 5 May 2018 to the first week of June 2018, when the second supers were mounted on all four beehives and the BeePi monitors started capturing videos from the second deep supers. The 2-super videos were captured from the first week of June 2018 to the end of the first week of July 2018, when the third supers were mounted on all four beehives.  
We randomly selected 50 1-super videos and another 50 2-super videos. The ground truth was obtained by using the MOG2 algorithm to automatically extract 58,201 150 \(\times\) 150 detected motion regions from the 1-super videos and 54,678 90 \(\times\) 90 detected motion regions from the 2-super videos. We manually labeled each region as BEE (if it contained at least one bee) or NO-BEE (if it contained no bees or only a small part of a bee). Figures 7 and 8 show samples of 1-super and 2-super images, respectively. We refer to the 1-super image dataset as BEE2_1S and to the 2-super image dataset as BEE2_2S. Table 1 gives the exact numbers of labeled images in BEE2_1S and BEE2_2S used for training, testing, and validation. In both BEE2_1S and BEE2_2S, the images used for training and testing came from \(M_{18}^{1}\) and \(M_{18}^{2}\), while the validation images came from \(M_{18}^{3}\) and \(M_{18}^{4}\).  
We executed the MANOVA [54] analyses of BEE2_1S and BEE2_2S to determine whether its training (class 0), testing (class 1), and validation (class 2) images are statistically significantly different. We used the following image features as independent variables: contrast [55], energy [56], and homogeneity [57]. The dependent variables were class 0, class 1, and class 2. For BEE2_1S, the MANOVA analysis gave the Pillai coefficient of 0.28849, the \(F\) value of 168.33, and \(Pr(>F)<2.2\times 10^{-16}\). For BEE2_2S, the MANOVA analysis gave the Pillai coefficient of 0.067891, the \(F\) value of 35.091, and \(Pr(>F)<2.2\times 10^{-16}\). Thus, since the \(p\)-value is \(<\)0.05 for both datasets, in both BEE2_1S and BEE2_2S, the training, testing, and validation images are significantly different from each other in terms of contrast, energy, and homogeneity.  
Figure 7: A sample of 1-super images from BEE2 (BEE2_1S). The first four rows include images classified as BEE. The last three rows consist of images classified as NO-BEE.