## 4 Experiments  
### Curated Video Data  
We used thirty-two 30-s videos for our experiments from two BeePi monitors. Both monitors were deployed in an apiary in Logan, Utah, USA from May to November 2018. The raw videos captured by BeePi monitors have a resolution of 1920 \(\times\) 1080 pixels, H.264 Codec, and a frame rate of 25 frames per second. In our current implemented version of  
Figure 15: Flowchart of BeePIV.  
BeePIV with which we performed the experiments described in this section, each video frame is resized to a resolution of 60 \(\times\) 80 for faster processing on the raspberry pi platform.  
We selected the videos to reflect varying levels of bee traffic across different backgrounds and under different weather conditions. Of these videos, we randomly selected 20 videos for our experiments to obtain plausible, data-driven parameters for the \(\Gamma\) function in Equation (15) and \(\Theta^{V}\) in Equation (16) and evaluate the experimental findings on the remaining 12 videos. We refer to the set of 20 videos as the testbed set and to the set of 12 videos as the evaluation set. By using these terms we seek to avoid confusion with the terms training set and testing set prevalent in the machine learning literature, because BeePIV does not use machine learning techniques.  
For ease of reference and interpretation of the plots in this section, we explicitly state that our testbed consisted of videos 5-8 and videos 10-25 and our evaluation set consisted of videos 1-4, 9, and 26-32. Since our testbed set contained 20 videos, each of which had 744 frames with the raspberry pi camera's frame capture rate of \(\approx\)25 frames per second, the total frame count for this set was 14,880 (i.e., 744 \(\times\) 20). Since our evaluation set included 12 color videos, each of which had 744 frames, the total frame count for this set was 8928 (i.e., 744 \(\times\) 12).  
For each video in both sets, we manually counted full bee motions in each frame and took the number of bee motions in the first frame of each video (Frame 1) to be 0. A full bee motion occurs when the entire body of a bee (tail, thorax, wings, head) moves from frame to frame. If a bee's head or tail appears in a frame, it is not considered a full bee motion. In each subsequent frame, we counted the number of full bees that moved when compared to their positions in the previous frame. We also counted as full bee motions in a given frame (except in Frame 1) bees flying into the camera's field of view that were absent in the previous frame.  
For 27 out of the 32 videos we also marked each moving bee with polygons of different colors easily distinguishable from the background, as shown in Figure 16, for faster verification of each other's counts. We compiled a CSV file for each curated video with a count of bee motions in each frame. For example, the CSV file for the video out of which the two frames in Figure 16 were taken, has entries 2 for \(F_{l}\) and 3 for \(F_{l+1}\), because \(F_{t}\) has 2 marked bee motions and \(F_{l+1}\) has 3 marked bee motions. It took us \(\approx\)10 h to curate each video for a total of \(\approx\)320 h of manual video curation. Higher traffic videos took, on average, 2-3 h longer to curate than lower traffic videos. We used the 32 CSV files with manual bee motion counts as the ground truth for our experiments. In all 32 videos, we identified 25,090 full bee motions: 20,590 motions in the testbed dataset and 4500 in the evaluation dataset.  
Figure 16: Two consecutive curated frames from a BeePi video; in both frames each full bee motion was marked by a human curator with a green polygon.