dataesr/scientific-paragraphs-categorization huggingface dataset:
Data Cleaning 2. 4. 1. Noise Filtering A routine beeping sound associated with the recording device was produced and recorded along with the cow sounds and was randomly dispersed in the dataset, and was removed to reduce interference with detection results (Figure  4 ). This beeping centerfrequency ranged from 3. 6 to 4. 5 kHz and could be effectively distinguished from cow ingesting sounds. A bandstop filter with a stopband frequency range of 3. 6-4. 5 kHz was used to exclude beeping sounds and maintain cow sounds.
Uninformative Data Removal The noise-filtered dataset was then further processed to remove uninformative data. To maximize the removal efficiency, data in 16 bits without normalization of time domain were used (Figure  5 ). The input data were vectorized and averaged for every 1100 acoustic samples. Several means were obtained at various steps of averaging but only the maxima within groups were retained. If the maximal mean was smaller than a threshold, the input data with the corresponding index were set FALSE and discarded once converted to frequency domain. Based on the preliminary verification, a threshold value of 100 was used as it can cover most uninformative data while reducing signal loss. Nothing needed to be supplemented for the discarded data in time domain. Because in later step, the MFCC.
After the two adjacent LSTM units, several dense layers and one flatten/softmax layer were built. The model size and number of parameters were 1862 kB and 392,050, respectively. with filtered and imbalanced dataset), the classification performance (0. 820-0. 867 for bites, 0. 895-0. 935 for chews, and 0. 824-0. 861 for chew-bites) outperformed or was comparable to previous studies. The successful classification could be attributed to obvious differences in the acoustic signals among bites, chews, and chew-bites, robust data cleaning, and appropriate design of model architectures. Current forage characteristics may have little influence on model performance improvement. Perhaps, more diverse forage characteristics should be included in future research for optimizing model performance. Notes: The positive performance includes accuracy, precision, recall, and F1 score.
Deep Learning Models To the authors' knowledge, this paper is the first to assess the application of deep learning models for classifying dairy cow ingestive behavior sounds. During model development, key features for effective classification were learned directly from the dataset, and exhaustive labeling and dedicated manual design were not required for feature extractors that are typically required in machine learning or knowledge-based algorithms  [24] , enabling scientists in other domains without extensive computer science expertise applying deep learning techniques. Deep CNNs are good at handling acoustic signals because of their efficient computation and powerful learning ability  [15, 25]. In this study, the Conv1D and Conv2D did not perform as well as the LSTM, due to two possible reasons.
Other Factors Influencing Classification Performance Other possible influencing factors should be considered as well for future model development of sound classification. Currently, deep learning experts are switching their attention from model-centric to data-centric to improve detection performance  [32]. Data quality plays a crucial role in deep learning, where improving the model hits a bottleneck now. For instance, particularly for acoustic datasets, data challenges of noise, balance, and quantity must be addressed. Considerable data noise can downgrade model performance to varying degrees. The dataset was recorded in a controlled environment with minimal introduced noises, and therefore, there was no significant model performance improvement after noise filtering. However, such a controlled environment with minimal background noise is hard to achieve in on-farm or in-field conditions.
Imbalanced datasets can result in biased inference for classes with the larger proportions  [33]. However, in this study the balanced dataset with the same number of audio files but uneven durations had poorer performance than the imbalanced dataset. Thus, the length of audio files may play a more important role in classification improvement than audio file quantity when selected for Sensors 2021, 21, 5231 balancing classes. Uneven duration of audio files also downgraded the performance for different forages. Sufficient data is necessary to explore the optimal performance of deep learning models  [34]. The current dataset contained only 27. 5 min of useful data, and such audio length became smaller when the dataset was split based on ingestive behaviors and forage characteristics. The relatively small ingestive sound dataset is typical of studies with dairy cows (i.
e. , 13 min in the study of Chelotti et al. [11] ) because of their quick ingestive actions, challenging environment for data collection, laborious manual labeling, etc. A large ingestive sound dataset is recommended to be built in the future to improve model performance. Forage characteristics also influenced the automatic classification of ingestive sounds. The best and poorest performance difference for classifying the ingestive behaviors was 0. 4-0. 5 among different forage characteristics. Chelotti et al. [11]  reported a 0. 11-0. 41 performance difference and Milone et al. [14]  demonstrated a 0. 11-0. 33 performance difference for classifying the ingestive behaviors under similar forage characteristics used in this study. Apart from uneven class balance and small datasets, similar acoustic features between the alfalfa and tall fescue or the two forage heights could decrease the classification performance.
Conclusions Classification of the three ingestive behaviors (bites, chews, and chew-bites) of dairy cows using deep learning models was conducted in this study. The results showed that forage species (alfalfa vs. tall fescue) and heights (tall and short) significantly influenced the amplitude and duration of the ingestive sounds of dairy cows. The LSTM using a filtered dataset with balanced duration and imbalanced audio files had better performance than its counterparts. Currently, it is difficult to differentiate the bites, chews, and chewbites between alfalfa and tall fescue under two different heights. In addition to training the LSTM with more temporal data, sophisticated feature extraction techniques will be considered in a future study.
[16]  first used faster R-CNN to detect individual pigs and their heads. Then, a behavior identification algorithm was implemented for feeding behavior recognition from a group-housed pen. Finally, the results of a precision rate with 0. 99 and recall rate with 0. 8693 can be obtained for feeding behavior recognition of pigs. Xue et al. [17]  proposed an approach based on a fully convolutional network (FCN)  [18]  and Otsu's thresholding to segment the lactating sow images. The approach achieved a 96. 6% mean accuracy rate. He et al. [19]  proposed an end-to-end framework named mask R-CNN for object detection and segmentation. The mask R-CNN achieved good results for the challenging instance segmentation dataset COCO  [13] , and was used in cattle segmentation  [20]. These recent research results show that pig detection and segmentation approaches, based on deep learning models, were effective and widely used under complex scene environments.
9405 on pig test datasets in our previous work  [23]. However, severe adhesion was not analyzed, but is further researched in these studies. Although these works have been performed effectively on pig detection and segmentation, most approaches are designed under fewer pigs/one pig environments or top view images; it is difficult for these algorithms to detect each pig in a group-housed condition when the pigs are closely grouped. Based on the previous work of our team  [23] , we propose a PigMS R-CNN model, which can efficiently obtain the instance segmentation mask for each pig, while simultaneously decrease the faulty detection results for group-housed pigs. To reduce the missed rate of pigs in group-housed environments, soft-NMS  [24]  was used in the PigMS R-CNN model. The algorithm gains improvements in precision measured over multiple overlap thresholds, which are especially suitable for group-housed pig detection.
Data Acquisition The experiment's dataset was collected in "Lejiazhuang Pig Farm" of live pigs in Foshan city, Guangdong Province, China. The settings of the cameras of the experimental pigsty are shown in Figure  1. In Figure  1a , the pigsty was 3 m high, 7 m long, and 5 m wide. Figure  1b ,c present the images, in video surveillance, of top view and front view. A camera was placed in the middle of the pigsty, 2 m above the ground. Another camera was placed in front of the pigsty, 1. 35 m above the ground. We used the FL3-U3-88S2C-C camera, which obtained images at 1920 × 1080 pixels. Sensors 2021, 21, x FOR PEER REVIEW 3 of 18 Finally, five ellipse-screening rules were developed. The ellipses, which did not comply with the rules, were integrated. The recognition accuracy of this method for pigs was over 86%.
A Kinect-based segmentation of touching-pigs was used for segmentation of touching-pigs, by applying YOLO and CPs  [8] , and this method was effective at separating touching-pigs with an accuracy of 91. 96%. Mask scoring R-CNN (MS R-CNN)  [22]  was explored for instance segmentation of standing posture images of group-housed pigs, from the top view and front view pig video sequences, which achieved a best F1 score with 0. 9405 on pig test datasets in our previous work  [23]. However, severe adhesion was not analyzed, but is further researched in these studies. Although these works have been performed effectively on pig detection and segmentation, most approaches are designed under fewer pigs/one pig environments or top view images; it is difficult for these algorithms to detect each pig in a group-housed condition when the pigs are closely grouped.
Data Acquisition The experiment's dataset was collected in "Lejiazhuang Pig Farm" of live pigs in Foshan city, Guangdong Province, China. The settings of the cameras of the experimental pigsty are shown in Figure  1. In Figure  1a , the pigsty was 3 m high, 7 m long, and 5 m wide. Figure  1b ,c present the images, in video surveillance, of top view and front view. A camera was placed in the middle of the pigsty, 2 meters above the ground. Another camera was placed in front of the pigsty, 1. 35 meters above the ground. We used the FL3-U3-88S2C-C camera, which obtained images at 1920 × 1080 pixels. To generate sufficient images in the experiments, we focused on 5 pigsties, where the number of pigs included is 3-20; video data were randomly obtained during a course of 10 days, each day containing over 7 h of video, from 9 a.
m. to 4 p. m. The video dataset was saved in AVI format and the frame frequency of the video was 25 fps. We chose 420 images as the dataset. Among 420 images, 290 images that included 2838 pigs were used for the training set, and 130 images that included 1147 pigs were used for the test set. We marked pigs manually with VIA software for these images. The typical augmentation methods, including left-right flipping, rotation, and re-scaling were automatically used to To generate sufficient images in the experiments, we focused on 5 pigsties, where the number of pigs included is 3-20; video data were randomly obtained during a course of 10 days, each day containing over 7 h of video, from 9 a. m. to 4 p. m. The video dataset was saved in AVI format and the frame frequency of the video was 25 fps.
We chose 420 images as the dataset. Among 420 images, 290 images that included 2838 pigs were used for the training set, and 130 images that included 1147 pigs were used for the test set. We marked pigs manually with VIA software for these images. The typical augmentation methods, including left-right flipping, rotation, and re-scaling were automatically used to enlarge the training dataset. With no external light used, all images showed uneven illumination. Therefore, the dataset reflected the common characteristics of pig monitoring, and it can objectively estimate a pig's instance segmentation performance in a group-housed condition. Sensors 2021, 21, 3251 time, the ResNet-101 network of a depth of 101 layers was used in the implementation of the mask R-CNN, and primarily extracted features from the three convolutional layers of the third, fourth, and fifth stages, as shown in Figure  3 , left, which fed to the next multiscale backbone architecture.
With the development of machine vision technology over the last 30 years, several researchers have searched for methods to estimate pig weight and body size using images to avoid direct measurements  [10] [11] [12] [13]. The estimation methods can be divided into four categories: (i) Projection method. Project a slide with grids onto the back of a pig, then calculate the pig shoulder height and area according to the principle of stereo projection to estimate pig weight  [14]. This method is difficult to automate. (ii) Two-dimensional image method. Extract the pig body size, back area size, and other parameters from 2D images of pig backs, and use the model of the relationship The system control program was developed based on the Internet of Things and the LabVIEW V18. 0 software development platform, using Client-Server (C/S) architecture.
The specific control scheme and program interface used are shown in Figure  2. The depth camera was connected to the server through a USB interface, and the pig weight data obtained by the weighing sensors were converted into a network signal by the USR-TCP232 and transmitted to the server through a switchboard. All software and hardware were controlled by the server, and MySQL version 5. 5 database was installed in the server to store pig weight and image data. To ensure the quality of the acquired images, the running time of the system for this study was 8:00-17:00. When the program started, the depth camera and weighing sensors were initialized. Then, the system read the weighing data every 0. 2 s. When 4 consecutive weighing data points were within the range of the pig population, and the difference between the maximum and minimum of the 4 data points was less than 0.
2 kg, it was assumed that there was a pig on the weighing platform and that the pig was relatively quiet. When these requirements were met, the camera acquired the 3D and 2D images of the pig back simultaneously and the pig weight data and back images were saved in the database, so pig weight and back image data were able to be acquired continuously. Pig back images could also be manually acquired by using the capture button. The acquired 3D and 2D images were in PNG and APD format, respectively, and the file name of the 3D and 2D images was the acquisition time (accurate to milliseconds).
Acknowledgments : This work was supported by  Nicola Lambe ,  Kirsty McLean  and  John Gordon  of the  SRUC CT  scanning and ovine research department by collecting such excellent paired and annotated training data. NVIDIA are acknowledged for their technical support of the  DGX Station  and software advice. Acknowledgments: We thank  K. Honkawa ,  D. V. M. for giving every convenience of the study in the ranch and his valuable advice.
Performance for Classifying the Ingestive Behaviors The performance for classifying the ingestive behaviors using three deep learning models is summarized in Table  3  and Figure  8. The precision, recall, and F1 score ranged from 0. 615-0. 941, 0. 533-0. 932, and 0. 599-0. 932 for classifying the ingestive behaviors. The precision, recall, and F1 score of the LSTM were averagely 0. 08 higher than those of Conv1D, and 0. 02 higher than those of Conv2D. Overall, the classification performance for the original dataset was similar to that of the filtered dataset with a <0. 01 difference on average, while the average performance for the imbalanced dataset was 0. 07 higher than that for the balanced dataset. Based on the confusion matrixes (Figure  8 ), chewing behavior was more accurately classified than biting and chewing-biting behaviors.
Performance for Classifying the Ingestive Behaviors under Various Forage Conditions The classification performance to identify particular ingestive behaviors associated with key forage characteristics was further investigated with the LSTM and filteredimbalanced dataset (Table  4  and Figure  9 ). The overall precision, recall, and F1 score were 0. 1-0. 2 lower than those in Section 3. 2. On average, the LSTM had similar classification performance for the two forage species (0. 758 for alfalfa and 0. 738 for tall fescue) and heights (0. 620 for short and 0. 620 for tall). By contrast, the overall classification performance of the ingestive behaviors for the forage species was approximately 0. 1 higher than for the two forage heights. As for forage species (Figure  9 ), classifying biting behavior under tall fescue had the lowest accuracy (0.
Overall Classification Performance The overall positive classification performance of this study and previous literature is presented in Table  5. The performance of previous studies was mainly obtained with machine learning models or knowledge-based models. One possible reason for the slightly reduced performance of the current study was the inclusion of all performance cases in the analysis (i. e. , Conv1D, Conv2D, balanced dataset, etc. ). With the optimal case (LSTM Author Contributions: Conceptualization, G. L. , Y. X. , and R. S. G. ; methodology, G. L. ; software, G. L. ; validation, G. L. ; formal analysis, G. L. ; investigation, G. L. ; resources, G. L. , Y. X. , and R. S. G. ; data curation, G. L. ; writing-original draft preparation, G. L. ; writing-review and editing, Y. X. , Q.
Experimental Results of the MS R-CNN Model We verified the reliability and effectiveness of the algorithm using the test dataset, which includes 130 images with 1920 × 1080 pixels. The precision-recall curve (PRC) of MS R-CNN is shown in Figure  9. The black dotted line expresses the points where recall and precision are identical. The more convex the purple line PRC is, the better the result is. The results of the red line PRC show that this method is suitable for pig detection and segmentation in a group-housed pig environment. Sensors 2021, 21, x FOR PEER REVIEW 10 of 18.
Experimental Results of the MS R-CNN Model We verified the reliability and effectiveness of the algorithm using the test dataset, which includes 130 images with 1920 × 1080 pixels. The precision-recall curve (PRC) of MS R-CNN is shown in Figure  9. The black dotted line expresses the points where recall and precision are identical. The more convex the purple line PRC is, the better the result is. The results of the red line PRC show that this method is suitable for pig detection and segmentation in a group-housed pig environment. The pig segmentation recall, and precision, are also shown in Table  1. Among 130 images, 50 images were taken from the front view images, including 352 pig objects. Moreover, 80 images were taken from the top view images, including 795 pig objects. Among a total of 1147 test pig objects, there were 1159 pigs detected, and 1064 pigs were correctly detected.
The K-means clustering algorithm was used to calculate the anchor ratios suitable for our dataset, which were (0. 7, 1. 4), (1. 0, 1. 0), and (1. 4, 0. 7). The same training environment and training parameters were used to train Efficient-D0-D5 based on the pretraining model. After training, the performance of different EfficientDet models was evaluated with test sets. The training set and validation set constructed in step (2) of Section 2. 2 were used to train the ID tag segmentation model YOLACT++. SGD was selected as the optimizer for model training, and the batch size was set to 4. The initial learning rate was set to 1 × 10 -4. The weight decay coefficient and the momentum coefficient were set to 1 × 10 -4 and 0. 9, respectively. In the training process, the maximum number of iterations of the model was 1 × 10 4.
The segmentation of tomographic images of the battery electrode is a crucial processing step, which will have an additional impact on the results of material characterization and electrochemical simulation. However, manually labeling X-ray CT images (XCT) is time-consuming, and these XCT images are generally difficult to segment with histographical methods. We propose a deep learning approach with an asymmetrical depth encode-decoder convolutional neural network (CNN) for real-world battery material datasets. This network achieves high accuracy while requiring small amounts of labeled data and predicts a volume of billions voxel within few minutes. While applying supervised machine learning for segmenting real-world data, the ground truth is often absent. The results of segmentation are usually qualitatively justified by visual judgement.
We try to unravel this fuzzy definition of segmentation quality by identifying the uncertainty due to the human bias diluted in the training data. Further CNN trainings using synthetic data show quantitative impact of such uncertainty on the determination of material's properties. Nano-XCT datasets of various battery materials have been successfully segmented by training this neural network from scratch. We will also show that applying the transfer learning, which consists of reusing a well-trained network, can improve the accuracy of a similar dataset.
The raw dataset often contains few gigabytes of projection and is then reconstructed into a stack of tomograms that typically includes a billion voxels for the analysis. The 3D analysis and electrochemical simulation are usually preceded by a step of semantic segmentation, which consists of digitally partitioning each voxel of the raw stack of tomograms (Fig. 1a  left part) into different phases (Fig. 1a right part ). The segmented volume of XCT can be used as an input of electrochemical models  [10] [11] [12] [13] [14]  to simulate electrochemical performance, which helps to understand transport phenomena in the electrode and to design a better electrode architecture. Pietsch et al. 15  has firstly discussed the impact of segmentation on the determination of morphological and transport properties for commercial anode materials.
Labonte et al. 31  studied the binarization of a graphite anode micro-XCT dataset with a more sophisticated 3D neural network capable of providing a segmentation uncertainty map with a stochastic neural network. For the first LiNi 0. 5 Mn 0. 2 Co 0. 3 O 2 (hereafter namely dataset NMC 1 ) cathode material, the goal is to distinguish the three phases in the electrode presented in the Fig. 1b : (a) the white NMC active material where the lithium is stored, (b) the carbon binder domain (CBD) of a mixture of polymer and carbon black surrounding the NMC, which maintains the mechanical cohesion of the material, and (c) the porosity impregnated by the liquid electrolyte where the ions circulate during the electrochemical reaction. The use of the thresholding approach (Fig. 1c ) or the automatic K-means method (Fig.
The throughput of CT images per second can reach twice as much as in the U-net and the prediction speed for a volume of billion voxels is a quarter faster. The Supplementary Note 3 explains intuitively the functioning of this network by visualizing the flow of images within it. To explore the best performance of the CNN), the HPs should be optimized for each dataset. In contrast to the trainable weights, the HPs are tunable by experimenters. They control the size of the network and determines the convergence of the training process. Comparing with the enormous datasets in the domain of object detection, real-world tomography datasets of battery materials contain fewer classes. The CNN is prone to overfitting certain class than other if the HPs are badly initiated. As such, the network can be easily trapped by a poor local minimum that predicts only the majority class.