dataesr/scientific-paragraphs-categorization huggingface dataset:
Domain adaptation The network is trained during 15 epochs of 200 iterations. This choice is driven to avoid overfitting on the smaller datasets. The learning rate is set to lr ¼ 3:5:10 À 4. Both triplet and cross-entropy losses are used during the training. Source and target share the same fully connected layer for classification. When using MMT, testing is systematically done on model number 1 as in real-world applications since determining which model performs best on the target is impossible. Indeed, the target dataset is not annotated. Concerning the adaptation on multiple target datasets, when applicable, DSBN is generalized so as to have one Batch Normalization (BN) per domain. During testing, the BN of the domain that is most similar in appearance to the tested domain is used. More specifically, the test domain BN is used if it has been computed during training.
Otherwise, the BN of CowFisheye is used when testing on Cows2021 or HolsteinCattle, and the BN of Cows2021 is used when testing on CowFisheye. 4. 2. 6. Testing Because most datasets are extracted from a unique camera, the evaluation is done without filtering images from the same camera. The mean Average Precision (mAP) is reported as evaluation metric. It is an indicator of the network ability to correctly recall the different shots in a gallery corresponding to a query individual, and should be maximized. For completeness sake, rank-1 is also reported in Appendix A. It indicates the accuracy of the rank-1 proposal for each query individual and is representative of the retrieval performance. However, rank-1 is sensitive to shortcomings in the dataset that are especially present in the studied cattle re-id use case (low diversity of images, noise etc.
HyPASS-SC HyPASS-SC optimizes the value of DBSCAN hyperparameter eps in the range 0:35, 0:65 ½ , which is the range of acceptable values for human datasets applications  Dubourvieux et al. (2021b). There is an order of magnitude difference in number of shots per individual between HolsteinCattle (9) and other datasets (48 and 112). Therefore, when dealing with HolsteinCattle as target or as source, HyPASS-SC resp. computes a subsampled or oversampled source validation dataset resp. , so that the number of shots per identity in the source validation set roughly matches the one of the target, as described in Sec. 3. 4. Impact on the performance of shots leveling will be shown in section 5. 3. Random subsampling Cows2021 or CowFisheye is straightforward, while oversampling HolsteinCattle is done by applying the same data augmentation than for training.
Effectiveness of our CUMDA, single target Supervised training & direct transfer. Supervised training results can be found in Table  2. These results, when training and testing on the same dataset, give an idea of the complexity of each dataset. From highest to lowest: CowFisheye, HolsteinCattle and Cows2021. We also show the cross-domain performance of models supervised on a source dataset and directly evaluated on the other datasets, without adaptation. The low performance on these datasets demonstrates the need for domain adaptation. In Table  2 , two cross-domain experiments stand out. First, the direct transfer Cows2021! HolsteinCattle shows the poorest performance on the target domain at 8. 0% mAP vs the 81. 2% which can be attained if annotations were available. Second, the direct transfer CowFisheye! Cows2021 shows the highest performance of all cross-domain experiments, with 71.
0% mAP on the target dataset. These results indicate that the domain gap between farms greatly influences the network ability to perform on a new style of images and is higher between HolsteinCattle and the other datasets than between CowFisheye and Cows2021. Also, the abundance of information present in CowFisheye with its varied viewpoints and occultations helps bridge the gap with other domains as shown by higher direct transfer scores when pre-training on CowFisheye. UDA baseline. In the rest of the paper, we will refer to domain adaptation without source guidance as UDA. Its functioning is illustrated in the upper part of Fig. 1. We remind the reader that the MMT framework has been chosen as baseline here  Ge et al. (2019)  and could be replaced by any other baseline as shown in  Dubourvieux et al.
(2021b)  and  Dubourvieux et al. (2022). As shown in Table  3 , the performance on the target dataset increases with Δ mAP values in the range [+1. 7 p. p. , +55. 5 p. p. ], meaning a lower bound for performance variation of +1. 7 percentage points (p. p. ) and an upper bound of +55. 5 p. p. This shows that the domain adaptation is efficient on the target dataset for all presented cases. However, the decrease seen in all diagonal elements of Table  3 , indicates that the source dataset is partially forgotten by the network. This effect is drastic with Δ mAP values in the range  [-61. 6 p. p. , -11. 2 p. p. ]. The generalization performance on an unseen dataset is inconsistent and seems to evolve towards that of a supervised network that is supervised on the target dataset. For example, in the case CowFisheye! HolsteinCattle, the performance of the network on Cows2021 decreases from 71.
0% mAP (cf. Table  2 ) before UDA to 30. 8% mAP after (cf. Table  3 ). This performance ressembles the 29. 1% mAP performance seen for a network solely supervised on HolsteinCattle (cf. Table  2 ). In conclusion, the UDA approach adapts the network to a single dataset, without ensuring performance gains on any other dataset. CUMDA. In the rest of the paper, we will refer to domain adaptation with source guidance, DSBN and HyPASS-SC as CUMDA. Its functioning is illustrated in the lower part of Fig. 1. The results with CUMDA are reported in Table  4. The improvements over UDA (cf. Table  3 ) are multiple. First, it outperforms the supervised network on source, target and a third unseen domain in a consistent way. On the source domain, the performance is equivalent or better, with a þ9:6 p. p.
increase in terms of mAP for CowFisheye. On the target domain, the performance increase is drastic with an average Δ mAP of þ38:9 p. p. , þ16:5 p. p. and þ7:8 p. p. on Cows2021, HolsteinCattle and CowFisheye when they are taken as target domains respectively. Generalization performance on the unseen domain increases on average of þ14:4 p. p. , þ2:7 p. p. and þ3:0 p. p. on the same datasets. Second, on the target domain, our proposed CUMDA method outperforms the UDA. To characterize this, we compute the increment in performance between Tables  4  and 3. On the source domain, the performance increase is drastic with values as high as 81:1 À 19:6 ¼ þ61:5 p. p. for the cross domain HolsteinCattle! CowFisheye. On the target. All these results demonstrate the network ability to both remember the source dataset and leverage information from all domains to increase performance steadily on all domains.
We compare these results to those of UDA, reported in Table  5. Providing the source as labeled data during training increases the performance drastically on the source dataset. Compared to regular UDA, the average performance increase is equal to 33:7 À 0:4 ¼ þ33:3 p. p. , þ58:1 p. p. and þ42:6 p. p. when considering Cows2021, HolsteinCattle and CowFisheye as source respectively. However, the performance on target dataset is approximately unchanged with an average delta in performance of À 0:1 p. p. , À 0:9 p. p. and þ1:1 p. p. The model better generalizes thanks to the knowledge of both source and target domains with an increase of þ21:4 p. p. , þ2:3 p. p. and þ5:5 p. p. on Cows2021, HolsteinCattle and CowFisheye respectively. In summary, compared to UDA, the source guidance allows the model to perform similarly on the target while ensuring good conservation of the source.
Benefiting from the information of both source and target, the model better generalizes to an unseen dataset. DSBN. In this paper, alleviating the domain gap is achieved with the use of DSBN. Averaged performance with source guidance + DSBN is reported in Table  7. We compare these results to those of the source guided approach, reported in Table  6. When compared to source-guided UDA, there is significant performance increase on the target of 40:2 À 36:6 ¼ þ3:6 p. p. , þ4:0 p. p. and þ2:5 p. p. for Cows2021, HolsteinCattle and CowFisheye respectively. However, performance on the source dataset slightly decreases with deltas of þ0:7 p. p. , À 1:8 p. p. and À 1:7 p. p. Overall, the generalization to an unseen dataset is unchanged. In summary, in our experiments, DSBN does not seem to guarantee better cow re-identification.
HyPASS-SC. The use of DSBN allows for source-guided selection of pseudolabeling hyperparameters, achieved here with HyPASS-SC. Averaged performance of UDA with source guidance + DSBN + HyPASS-SC = CUMDA is reported in Table  8. We compare these results to those of the source-guided + DSBN approach, reported in Table  7. In comparison with source-guided + DSBN UDA, the performance on the target domain HolsteinCattle increases of 16:5 À 10:0 ¼ þ6:5 p. p. This may be explained by the significant differences between HolsteinCattle and other domains, which may result in a significant shift of the optimal value of clustering parameters. On the Cows2021 dataset, HyPASS-SC seems to perform slightly worse than sourceguided + DSBN with a difference of À 1:3 p. p. This seems to indicate that HyPASS-SC may not be optimal in all cases, especially when the source test set has few images.
However, HyPASS-SC retains its usage by removing the need for user-set parameters. On the source domain, the performance increases with deltas of À 0:1 À 0:3 ¼ À 0:4 p. p. , þ2:1 p. p. and þ2:1 p. p. It even exceeds the performance of sourceguided UDA (cf. Table  6 ). The generalization performance is increased of þ1:4 p. p. , À 0:4 p. p. and þ0:5 p. p. In conclusion, we find that HyPASS-SC has a positive effect on performance on all datasets. Indeed, it ensures good clustering on all targets. This allows for better source conservation, target specialization and generalization on an unseen dataset than the other approaches presented here. For the cross-domain HolsteinCattle! CowFisheye, a t-SNE visualization of the effects of domain adaptation, source-guidance and other components of the CUMDA method on the embedding space, is proposed in Fig.
Benefit of the source calibration in HyPASS-SC As explained in section 3. 4, HyPASS is sensitive to dataset statistics. More specifically, in our case, to the number of shots per identity of Cows2021 (48), HolsteinCattle (9) and CowFisheye (112). To validate the importance of our proposed source validation set calibration, we compare the performance of HyPASS-SC and HyPASS on the cross domains HolsteinCattle! Cows2021 (oversampling use-case) and CowFisheye! HolsteinCattle (subsampling use-case). The quality of the clustering is evaluated with the Adjusted Random Index (ARI) which is a measure of the similarity between two data clusterings. It is computed between the target training set labels and the cluster predictions, using the scikit-learn implementation 2. Fig. 6  illustrates the evolution of ARI when leveling the source and target statistics.
Effectiveness of our CUMDA, multiple targets One of our goals is to generalize the domain adaptation to multiple target domains. This use-case reflects real-world needs where, from a labeled dataset, the model should be adapted to multiple farming exploitations. Averaged performance of our CUMDA approach (source guidance, DSBN and HyPASS-SC) is reported in Table  10. It is computed from the detailed results that can be found in Tables A. 11 -A. 16 of Appendix A. We compare these results to those of the source-guided approach, reported in Table  9. On the target datasets, our approach outperforms the source-guided UDA approach with Δ mAP of þ2:8 p. p. , þ6:0 p. p. and þ3:7 p. p. for Cows2021, HolsteinCattle and CowFisheye respectively. Besides, the performance on the source dataset is conserved.
This demonstrates the importance of the proposed CUMDA method when it comes to multiple datasets application. This performance increase can be explained by the complementarity of DSBN and HyPASS-SC. DSBN allows some domain gap alleviation through domain specific normalization. It also authorizes domains to share the same backbone, which helps generalization. HyPASS-SC provides optimized clustering parameters on each target dataset, depending on its statistics. This ensures good clustering quality on the target domains, which in turn increases the network performance on all datasets.
Limitations In this paper, we have shown significant improvements on unsupervised domain adaptation performance when compared with traditional pseudo-labelling-based UDA methods. However, it can be seen that the performance on a domain when it is unlabeled, taken as a target, remains far from the performance on the same domain when it is labeled, taken as a source. This is a peculiarity of the cow re-ID problem. Indeed, color information usually facilitates the pseudo-labeling in human re-ID and the performance of unsupervised UDA is close to the performance of supervised training  Ge et al. (2019). For cow re-ID, color does not contain relevant information for pseudo-labeling. Therefore, subtle information such as shape has to be considered instead. Also, in this paper and cow re-ID in general, the domain gap existing between the chosen datasets can be greater than the one usually seen in person re-ID.
Conclusion In this paper, we have proposed a new CUMDA re-ID method for efficient cumulative multi-domain adaptation motivated by practical cattle re-ID constraints and requirements. This work reflects real-world application needs for a model to perform better on all domains as the number of farms increase but annotation on them is not necessarily available. Indeed, it extends domain adaptation to multiple target domains, with high discrepancies in both target datasets statistics and domain representations, which are challenges often encountered in practical applications. The proposed CUMDA method consists in: source guidance, domain gap reduction and an automatic source-guided hyperparameter selection for clustering based on HyPASS. A source calibration method to increase HyPASS performance on datasets of great diversity, usually encountered in farming applications, has indeed been proposed.
Also, OMP needs prior knowledge of spectrum sparsity. We address these challenges via deep-learning-based architectures and efficiently map them on the ZSoC platform as second contribution. Via hardware-software co-design, different versions of the proposed architecture obtained by partitioning between software (ARM processor) and hardware (FPGA) are considered. The resource, power, and execution time comparisons for given memory constraints and a wide range of word lengths are presented for these architectures.
From an architecture perspective, in 5G and next-generation wireless networks, distributed base station approach where radio unit (RU), distributed unit (DU), and central unit (CU) may not be co-located is being explored  [21] ,  [22]. Such deployment demands the mapping of SNS algorithms on hardware platforms such as system on chip (SoC) under the limited computing resource constraints due to remote locations of the RU and DU. The first contribution of this work is to efficiently map statistical signal processing based OMP framework for SNS spectrum recovery on Zynq system-on-chip (ZSoC). The ZSoC is the heterogeneous SoC comprising of software (SW), i. e. , dual-core Cortex ARM A9 processor, and hardware (HW), i. e. , 7-series field programmable gate array (FPGA). To address the drawbacks of OMP and make the spectrum reconstruction agnostic to sparsity, we replace OMP with a convolutional neural network (CNN) based deep learning (DL) architecture and efficiently map it on the ZSoC platform as the second contribution.
Via hardware-software co-design, we explore different versions of the proposed DL architecture obtained by partitioning between SW (ARM processor) and HW (FPGA). Our study offers interesting insights which may not be visible in conventional theoretical and simulation-based analysis. For these architectures, we present the resource utilization, power consumption, and execution time comparisons for given memory constraints and a wide range of word lengths (WL) at the parameters and computation levels. We develop an end-toend application with a live graphical user interface (GUI) to demonstrate the real-time WSS on the ZSoC platform. The proposed work is an extension of our prior work in  [23]  where we demonstrated the superiority of DL-based architecture over OMP. In this paper, we further improve the performance of the DL algorithm.
The mapping of these algorithms on ZSoC and experimental performance analysis on the hardware platform are novel contributions of this work. Please refer to  [24]  for source codes, hardware IPs, datasets and detailed tutorial used for generating the results presented in this paper. The rest of the paper is organized as follows. We discuss the OMP architecture and experimental results in Section II. The DLWSS algorithm is presented in Section III and corresponding architecture in Section IV. Section V presents the performance analysis results and comparison of DLWSS with OMP followed by complexity analysis in Section VI. Section VII concludes the paper. II. Spectrum Recovery via OMP for SNS based WSS This section discusses the design and implementation of the OMP on the ZSoC. We demonstrate the various drawbacks of OMP via experimental analysis and results.
It comprises four main steps, i. e. , 1) Matching (Line 6-8); 2) Identification (Line 9-13); 3) Least squares (Line 14) and 4) Approximation (Line 15). We have realized the OMP in Algorithm 1 on ZSoC ZC706 comprising of Dual ARM Cortex A9 processor and 7-series FPGA with 1090 units of 18kB Block RAMs, 80 DSP48E units, 218600 units of 6-input look-up-tables (LUTs) and 437200 flip-flops (FFs). Table  I  shows the execution time, resource utilization, and power consumption comparison for the two best possible realizations of the OMP algorithm: 1) Only software (ARM), and 2) Software and hardware codesign (ARM+FPGA). Note that we have optimized the code for software implementation and carefully chosen the word Algorithm 1 OMP algorithm for WSS Require: Sensing matrix A[K][N], aliased sub-Nyquist samples Y [K] [Q], Sparsity S 1: occupied bands ← [] 2: A norm ← Column normalized A #Normalize A 3: Res ← Y #Initialize Residual 4: iter ← 1 5: while iter ≤ S do #No.
e. ,, 0 for vacant and 1 for occupied band). It is worth noting that P OB d is the preferred metric for a sparse spectrum consisting of fewer occupied bands since P AB d may give a high value even when the algorithm erroneously detects all bands as vacant. Similarly, P AB d is the preferred metric for spectrum with lower sparsity comprising the higher number of occupied bands. For such spectrum, P OB d may be high even if the algorithm erroneously detects all bands as occupied. We do not consider the spectrum recovery error as a performance metric since it does not offer additional insights for WSS. There are challenges in capturing a large number of samples from hardware for accurate error calculation of spectrum recovery error in real-time. 2) Dataset: Since SNS-based WSS is based on the underlining assumption of the sparse spectrum, we have generated various datasets with sparsity ranging from 50%-100%.
We consider the SNS with eight analog-to-digital converters (ADCs), which allow the recovery of the spectrum when the number of occupied bands is less than or equal to 8. We consider two groups of datasets: • Extremely Sparse Spectrum (ESS): This dataset contains the spectrum with the number of occupied bands between 1 and 3. • Highly Sparse Spectrum (HSS): This dataset contains the spectrum with the number of occupied bands between 4 and 7. As discussed before, we use P OB d and P AB d as performance metrics for ESS and HSS datasets, respectively. Interested readers can refer to  [24]  for datasets and source code used for the dataset generation. 3) OMP without Sparsity Knowledge: As discussed in Algorithm 1, the number of iterations in OMP algorithm depends on the sparsity, S (Line 5) and this requirement limits its usefulness in realistic applications.
We refer to this algorithm as OMP-. In a wireless environment, the wireless channel may vary depending on the deployment scenario. In Fig. 2 , we study the effect of wireless channel on the average value of obtained over wide range of SNRs, S NR. As expected, the effect of the channel on the WSS is limited since we do not need to recover the spectrum. Thus, we can fix a single value of S NR for all types of wireless channels. 4) Performance Analysis and Drawbacks: In Fig. 3 , we compare the performance of the OMP and OMP-for ESS and HSS datasets for a wide range of SNRs. As expected, the performance improves with the increase in SNR. In the case of ESS with P OB d as a performance metric, both OMPs achieve 100% accuracy at high SNR due to accurate estimation of. However, the difference between OMP and OMP-is around 10-40% at low SNR.
IV. Realization of DLWSS on ZSoC This section presents the complete architecture and mapping of DLWSS on ZSoC, and real-time demonstration via Linuxbased graphical user interface (GUI) deployed on ZSoC. In Fig. 4 , various building blocks of the DLWSS such as Preprocessing, CNN and FC layers, scheduler, DMA, interrupt, and GUI controller are shown. For illustration, we have shown the Pre-processing, CNN, and FC layer processing on FPGA. To enable this, we have developed AXI-stream compatible hardware IPs for Pre-processing, CNN, and FC blocks and interconnected them with PS via direct-memory access (DMA) in the scatter-gather mode for efficient data transfers. Later in Section VI, we considered various architectures via hardwaresoftware co-design by moving the blocks between ARM Processor and FPGA.
We have deployed Linux based operating system on PS, which takes care of various scheduling and As discussed in Algorithm 2, Pre-processing stage involves large-size matrix multiplication and inversion operations. We have modified Xilinx's existing matrix multiplication and matrix inversion reference examples to support the complex number arithmetic since the baseband wireless spectrum is represented using complex samples. The well-known lowerupper (LU) decomposition method is selected for matrix inversion. We have included data buffers using block memory to minimize the repeated data communication between SW and HW and enable matrix operations of different sizes. While the overall algorithm is sequential, we parallelize individual operations like Matrix Conjugate Transpose and Matrix Multiplication on FPGA.
The LUT-based approach is memory intensive, while the polynomial-based approach involves many arithmetic and logical operations. We have realized ReLU on FPGA and Sigmoid on ARM processor based on the experimental analysis. An end-to-end application with a live graphical user interface (GUI) is developed to demonstrate the real-time WSS on the ZSoC using the proposed architectures. The application running on a Petalinux-based operating system deployed on the ARM processor accelerates the computation of preprocessing algorithm and the DL model on the FPGA. The real-time predictions are obtained and stored on the SD-card by the application. The GUI application, shown in Fig. 7 , is deployed on the remote server and reads the contents of SD-card at regular intervals. The GUI is developed using the Tkinter  [30]  framework and provides visualization in real-time as and when the architecture predicts the status of frequency bands in the received digitized spectrum.