## 3 Data Collection and Experimental Procedure  
In this study, the data from 10 different dogs were fetched from varied sizes, breeds, and ages. The data regarding the sizes, breeds, genders, and ages of the dogs are depicted in Table 2. Prior approval was taken from the dog owners before collecting the data for our research. For the activity detection, wearable sensors were placed at the neck and tail, as shown in Figure 1a,b. These sensors were fastened to the neck and tail using straps. Wearable sensors with a sampling frequency of 33.33 Hz (Sweet Solution, Busan, South Korea) were used. The wearable sensors were equipped with accelerometer and gyroscope sensors that could measure the linear motions and the rotational motions in all the directions. The neck and tail-wearable devices used in the study were lightweight in nature and are depicted in Figure 1c,d. The dimensions of the neck-worn device used in the study were \(52\times 38\times 20.5\) mm and it weighed 16 g; and the dimensions of the tail-worn device used in the study were \(35\times 24\times 15\) mm, and it weighed 13 g. The scale factor of the accelerometer was \(-4\) g to \(4\) g and gyro was \(-2000\) dps to \(+2000\) dps. Moreover, the data was processed and analyzed using a system with the following specifications: Windows 10, 3.60 GHz 64-Bit Intel Core i7-7700 processor, 24 GB RAM, Python 3.7, and TensorFlow 1.4.0. The data collection procedure was performed on trained dogs who were accompanied by their personal trainers. The complete data extraction procedure, as shown in Figure 2, was performed by four people who were responsible for activity determination, recording the activity for determining the ground truth using video recorders, monitoring of the environment and IMU data recording, and checking the position of the sensors on the necks and tails of the dogs, respectively. During the data extraction procedure, the required activity whose data needed to be fetched was communicated to \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Serial** & **Size** & **Name** & **Breed** & **Age** & **Gender** \\ \hline
1 & Large & [PERSON] & Border Collie & 2 & Male \\
2 & Large & Ringo & Border Collie & 6 & Female \\
3 & Small & Deogu & French Bull Dog & 6 & Male \\
4 & Small & Inter & Sichuan & 5 & Male \\
5 & Medium & Barley & Golden Retriever & 3 & Male \\
6 & Large & Cannes & Cannes Korso & 4 & Male \\
7 & Large & Sohee & Lot Willer & 2 & Female \\
8 & Large & Saaldog & Dalmatian & 1 & Male \\
9 & Small & [PERSON] & Beagle & 5 & Female \\
10 & Medium & [PERSON] & Rhodesian Ridgeback & 7 & Male \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The data regarding the subjects (Dogs) from which data was fetched. Figure 1: (**a**) Neck-wearable and tail-wearable devices placed on the dog for activity detection. (**b**) The tail-wearable device is placed for emotion detection. (**c**) Neck-wearable device. (**d**) Tail-wearable device. the specific dog trainer, who in turn, asked the dog to perform the specific activity. Simultaneously, when the dog was performing the activity, one of the people recorded the IMU data of the dog that was transmitted to the system from the neck and tail-wearable device and another person used a video recorder for recording the activity of the dog. The video was recorded with the exact number of frames per second as the sampling rate of the wearable device. Therefore, the frames of the video were further used to derive the ground truth for a particular set of IMU data. The data collected for the activity detection were encapsulated for seven different activities; namely, walking, sitting, \"stay,\" \"sideways,\" eating, jumping and nose work. The distribution of data that was received from the data collection procedure has been depicted in Figure 3. From the figure, it can be duly observed that the distribution of data across all the classes is highly imbalanced in nature.