dataesr/scientific-paragraphs-categorization huggingface dataset:
To do so, we will present a few 1-to-1 comparisons for simple tasks and discuss how the code for ezomero differs from Blitz API code. The first 1-to-1 comparison we want to present is a very simple workflow that might precede data analysis, consisting of creating a connection to an OMERO server and retrieving a 5-dimensional image as a numpy array. The ezomero workflow tracks our natural language description of the problem pretty closely. Listing 1 shows us that: the workflow is simply 1) connecting to the server, and 2) retrieving an image. These actions are a single line each. Additionally, the connection parameters are either retrieved automatically by ezomero, and/or requested from the user at runtime. On the other hand, the same pipeline using the Blitz API, presented on Listing 2, requires 1) creating a connection object from a CLI client, 2) retrieving a Blitz gateway-wrapped Image object from the server, 3) getting the wrapped Pixels object, 4) getting the dimensions of the image, 5) creating a list of planes, and 6) iterating over that and passing it to getPlane to achieve the same result.
Our second featured use case is a simple administrative workflow, where a user (or an administrator) wants to create a new Dataset inside an existing Project in an OMERO server. Again, the ezomero version presented in Listing 3 tracks our natural understanding of the problem, requiring 1) a single line for connecting to the server, and 2) a single line for posting a Dataset (with an optional project_id parameter). The same workflow using the Blitz API version is shown in Listing 4. We see that this verbose process requires: 1) a new DatasetI object to be created, 2) the Dataset's name set, 3) the connection object's UpdateService retrieved and used to save the DatasetI object. That only solves half the problem. We then need to: 4) create a ProjectDatasetLinkI object, and finally 5) set the Child and Parent attributes of the ProjectDatasetLinkI object before saving.
Only then will the Dataset be correctly linked to the intended Project. import ezomero # uses parameters from. ezomero conn = ezomero. connect() ds_id = ezomero. post_dataset(conn, "New Dataset", project_id=projId) conn. close() Listing 3. Connecting to an OMERO server and adding a new dataset to an existing project using ezomero. Our third and last proposed use case extends our first example. Here we want to attach a dictionary as keyvalue pairs to a specific image from a Dataset with a key-value pair "analyze: true". Such dictionary is generated by an analyze_data function applied to that specific image. Once more, we find that the ezomero version presented in Listing 5 follows a simple, intuitive flow that closely tracks our description of the problem. Here, we 1) retrieve the image IDs on that dataset, 2) filter them by key-value pair to find the image of interest, 3) retrieve the image, 4) pass it to analyze_data, and 5) create a map annotation with the results.
The Blitz API version presented in Listing 6, again, is more complex and verbose. We need to 1) retrieve a Dataset object, 2) iterate over its children to get the image IDs linked to that dataset, 3) use the QueryService from the connection object to create an HQL query that returns the image ID with the desired key-value pair, 4) use a structure similar to Listing 2 to retrieve the full image and pass it to analyze_data, 5) reshape the returned Python dictionary into a list, 6) create a wrapped MapAnnotation, 7) set the namespace and value of the MapAnnotation object, and 8) save the MapAnnotation and link it to the correct image. These use cases cover a range of relatively simple workflows for users and administrators interacting with an OMERO server, and in each one of them we can see how ezomero leads to fewer lines of code and lesser cognitive load.
It allows for cleaner, more easily maintainable code, and decreases the necessary knowledge of the full OME data model and OMERO Blitz API significantly. tion and reproducibility in our day-to-day OMERO tasks. We believe this to fill an important niche in the imaging data management community, decreasing the necessary technical expertise for creating code-based workflows that can be shared, reviewed and developed upon more easily. Importantly, OMERO itself is not static: it is also software that is under constantly development. We believe the OMERO platform is uniquely positioned to be a future-proof data management platform, becoming more a metadata repository and discovery layer, and aggregating distributed data across on-premises and cloud storage sources. In this environment, programmatic access will be more important than ever, and creating tools to facilitate such access is paramount.
analyze_data NS = "annotation_namespace" # uses parameters from. ezomero conn = ezomero. connect() img_ids = ezomero. get_image_ids(conn, dataset=ds_id) to_analyze = ezomero. filter_by_kv(conn, img_ids, key="analyze", value="true") im, pix = ezomero. get_image(conn, to_analyze[0]) results = analyze_data(pix) # returns a dict _ = ezomero. post_map_annotation(conn, 'Image', to_analyze[0], results, NS) conn. close() Listing 5. Using ezomero in an analysis workflow.
import omero from omero. gateway import BlitzGateway from omero. rtypes import rstring from omero. cli import cli_login Connecting to an OMERO server and adding a new dataset to an existing project using the Blitz API. with cli_login() as cli: conn = BlitzGateway(client_obj=cli. _client) conn. connect() dataset_obj = omero. model. DatasetI() dataset_obj. setName(rstring("New Dataset")) upd_svc = conn. getUpdateService() dataset_obj = upd_svc. saveAndReturnObject(dataset_obj, conn. SERVICE_OPTS) link = omero. model. ProjectDatasetLinkI() link. setChild(omero. model. DatasetI(dataset_obj. id. val, False)) link. setParent(omero. model. ProjectI(projId, False)) upd_svc. saveObject(link) conn. close() Listing 4.
For this purpose, we first divide the LFI into a massive number of non-overlapping PVBSs, which simultaneously contain spatial and angular information of LFI. Then, we propose a novel network (named PVBSNet) based on Convolutional Neural Networks (CNNs) to extract the spatio-angular features of PVBS and further evaluate the PVBS quality. The proposed PVBSNet consists of four stages: multi-information division, intra-feature extraction, cross-feature fusion, and quality regression. Finally, a Saliency-and Variance-guided Pooling (SVPooling) method is presented to integrate all the PVBS quality into the overall quality of LFI. The proposed PVBLiF metric has been extensively evaluated on three widely-used LFI datasets: Win5-LID, NBU-LF1. 0, and SHU. Experimental results demonstrate that our proposed PVBLiF metric outperforms state-of-the-art metrics and is capable of highly approximating the performance of human observers.
ACCEPTED MANUSCRIPT / CLEAN COPY In order to develop a CNN-based metric based on PVS, two challenges are faced. First, although PVS is a video-like 3D representation with the same structure as conventional videos, the feature extraction networks for video quality assessment (e. g. ,  [28] ,  [29] , and  [30] ) are not suitable for PVS. The main reason is that the temporal dimension of conventional video only contains 1D motion information, while the temporal dimension of PVS consists of the scrambled 2D angular information of LFI. Based on this characteristic, an objective LF-IQA metric needs to extract the spatio-angular features instead of temporal-spatial features in PVS, which has not been studied in the quality assessment domain. Second, due to the limited size of the existing LFI datasets, directly using PVS for training can easily lead to the over-fitting problem.
3) A novel Pseudo Video-based Blind quality assessment metric for Light Field image, abbreviated as PVBLiF, is proposed in this paper. Extensive experimental results on three representative LFI datasets show that the proposed PVBLiF metric outperforms the state-of-the-art LF-IQA metrics by a large margin, while having low computational complexity. The rest of this paper is organized as follows. Section II introduces the related works. Section III describes the proposed metric in detail. Section IV provides experimental results and discussions. Finally, conclusions will be drawn in Section V.
Compared to the FR/RR LF-IQA metrics, the NR LF-IQA metrics evaluate the distorted LFI quality without any ACCEPTED MANUSCRIPT / CLEAN COPY reference information, which are more applicable in most realworld scenarios. In general, existing NR LF-IQA metrics can be further divided into two types: Natural Scene Statisticsbased (NSS-based) and CNN-based. Among NSS-based NR LF-IQA metrics, some metrics  [42] ,  [43] ,  [44] ,  [45] ,  [46]  extract NSS features from the original 2D representations of LFI, e. g. , SAI, RI, EPI, and MLI. Luo et al. [42]  utilize the information entropy of SAIs and naturalness distribution of MLI to measure the spatial quality and angular consistency of LFI, respectively. Shi et al. [43]  combine the naturalness distribution features of the light field cyclopean image array and the global and local features of EPIs to measure the LFI quality.
Although the redundancy in LFI can be greatly reduced after using Tucker decomposition, some angular nuances that lead to quality degradation may be overlooked in the meantime. More recently, compared to the previous works that focus on extracting 2D NSS features, Xiang et al. [50]  extract naturalness distribution and energy features of distorted LFI in 4D frequency domain. For CNN-based NR LF-IQA metrics, Guo et al. [51]  present a deep CNN model based on SAI fusion and global context perception modules. ALAS-DADS  [52]  designs a depth-wise separable convolution-based CNN model to evaluate the LFI quality. However, these two metrics take the whole LFI as input which may suffer from the problem of overfitting and high computational complexity. To alleviate these problems, DeLFIQE  [31]  proposes to evaluate the LFI quality via discriminative EPI patches.
B. PVBSNet Previous studies on LF-IQA  [43] ,  [49]  have demonstrated that the potential interaction between spatial and angular information, called spatio-angular information, is more closely related to the LFI quality than the spatial information. Although the 3D structure of PVBS has great potential in simulating how LFI is presented to human eyes, two challenges are encountered when extracting spatio-angular features for quality assessment. First, during the generation of PVBS, the original 2D angular information of LFI is scrambled as it is transformed into the 1D temporal information of PVBS. Second, extracting spatio-angular features from a 3D ACCEPTED MANUSCRIPT / CLEAN COPY  representation to evaluate quality in an end-to-end manner is non-trivial. To address the above challenges, we propose a CNNbased network, named PVBSNet, to extract the spatio-angular features of PVBS and further evaluate the PVBS quality.
Let F G represent the ACCEPTED MANUSCRIPT / CLEAN COPY feature vector output from stage 3, the process of stage 3 is described in Eq. (6). F G m = GRU m (AP (F 5 m )) (6) where GRU m (•) denotes the GRU model, AP (•) denotes the average pooling layer. Stage 4: Quality regression. In the final stage, we quantify the extracted spatio-angular features into quality score following  [32]. Specifically, the concatenation operation is applied for F G h and F G v , followed by two Fully Connected (FC) layers to predict the quantified quality score. The generation of PVBS quality score Q is described in Eq. (7). Q = F C2(F C1(Concat(F G h , F G v ))) (7) where Concat(•), F C1(•), and F C2(•) represent the concatenation, first FC, and second FC layers, respectively.
To prove our conjecture, we conducted an experiment on the Win5-LID dataset  [19]  and visualized the experimental results as suggested in  [61]. Fig. 6  shows the scatter plots of all PVBSs in terms of quality prediction error against variance. Here, the prediction error is calculated as the square error between the quality prediction and its corresponding Mean Opinion Score (MOS). It can be found that low-variance PVBSs are not reliable for evaluating the quality of PVBSs as their prediction errors are quite scattered. In other words, although some low-variance PVBSs have accurate predictions, it is difficult to discern the prediction quality of low-variance PVBSs. In contrast, the error distribution of high-variance PVBSs is more concentrated in low prediction error, implying that high-variance PVBSs should be biased when pooling the overall LFI quality.
For this reason, we propose to discard the low-variance PVBSs directly to avoid introducing inaccurate predictions from lowvariance PVBSs. In this way, the predicted overall LFI quality will be dominated by the quality of high-variance PVBSs. In order to distinguish between low-variance and high-variance PVBSs, for simplicity, we divide all PVBSs into two equal parts sorted by their variances. Let Ω denote the assemble of high-variance PVBSs, the generation of Ω is described in Eq. (  9 )-  (10). T = M edian{V PB1 , V PB2 ,. , V PB K } (9) PB k ∈ Ω, if V PB k > T (10) where PB k and V PB k denote the k-th PVBS and its variance, respectively, T denotes the threshold, M edian{•} represents the median operation. ACCEPTED MANUSCRIPT / CLEAN COPY 3) Pooling. Finally, we obtain the overall LFI quality score using only high-variance PVBSs and their corresponding weights, as described in Eq.
IV. EXPERIMENTAL RESULTS AND DISCUSSIONS To verify the effectiveness of our proposed PVBLiF metric, we conduct extensive experiments on three publicly available LFI datasets, including Win5-LID  [19] , NBU-LF1. 0  [25] , and SHU  [26]. For all datasets, all SAIs of real-world and synthetic LFIs are with spatial resolutions 434×625 and 512×512, respectively. Therefore, each real-world LFI can produce 247 PVBSs, whereas each synthetic LFI can generate 256 PVBSs. The Win5-LID dataset consists of 6 real-world reference scenes and 4 synthetic reference scenes. There are 220 distorted LFIs subjected to 6 types of distortions, including HEVC, JPEG2000, Linear interpolation (LN), and Nearest Neighbor interpolation (NN) with 5 distortion levels, and two CNN models with only 1 distortion level. The subjective experiments are conducted using interactive mode and Double-Stimulus Continuous Quality Scale (DSCQS) method.
ACCEPTED MANUSCRIPT / CLEAN COPY The NBU-LF1. 0 dataset provides 14 reference scenes, of which 8 are from the real world and 6 are synthetic. The dataset contains 210 distorted LFIs disturbed with 5 types of distortions, i. e. , NN, Bicubic Interpolation (BI), learning based reconstruction (EPICNN), disparity map based reconstruction  (Zhang) , and spatial super-resolution reconstruction (VDSR). Each distortion type has 3 distortion levels. Based on DSCQS, subjective experiments are carried out in a combination of passive and interactive modes. The MOS on a 5-point discrete scale is provided. The SHU dataset comprises of 240 distorted LFIs derived from 8 real-world reference scenes, with 5 distortion types and 6 distortion levels. These distortion types include JPEG, JPEG2000, Gaussian blur (GAUSS), white noise, and motion blur.
The passive mode and DSCQS method are adopted in the subjective evaluation. Different to the above two datasets, the SHU dataset provides the MOS ranged from 0 (bad) to 5 (excellent). Most existing LFI datasets for quality assessment contain only hundreds of distorted LFIs generated from a small number of reference LFIs (always less than 20). If we randomly split the whole dataset into training and test sets, these two sets may contain distorted LFIs derived from the same reference LFI. Therefore, in order to ensure that the training set and test set are completely independent, we use leave-two-foldout cross-validation to conduct the experiments following  [50] ,  [32]. Specifically, for each dataset, all the distorted LFIs generated from the same reference scene are considered as one fold.
In this way, a LFI dataset containing K reference scenes will be divided into K folds of distorted LFIs, and each fold contains all distorted versions of only one reference scene. Then we randomly select K-2 folds for training and report the performance on the remaining 2 folds. There are a total of K(K-1)/2 possible combinations. Hence, we conduct the experiments based on all possible combinations and take the average result as the reported performance. Additionally, we adopt three standard criteria to evaluate the performance, including Pearson Linear Correlation Coefficient (PLCC), Spearman Rank Order Correlation Coefficient (SROCC), and Root Mean Square Error (RMSE). Among them, PLCC is used to evaluate the linear relationship, SROCC focuses on the monotonicity while RMSE measures the prediction accuracy.
For 3D-IQA metrics, we measure the quality of every two horizontal adjacent SAIs of LFI, and report the average performance. Note that the performance of all ACCEPTED MANUSCRIPT / CLEAN COPY metrics is reported using leave-two-fold-out cross-validation for fair comparison. Specifically, the learning-based metrics are trained with K-2 folds and tested on the remaining 2 folds, while the non-learning-based metrics are directly executed on the same test set. The reported performance of all metrics is reproduced using the released code and default parameter settings from their authors to avoid bias. TABLE II exhibits the overall performance of the proposed metric compared with state-of-the-art IQA metrics on the Win5-LID, NBU-LF1. 0, and SHU datasets. From the table we can find that traditional 2D/3D/multi-view IQA metrics cannot perceive the quality of LFI accurately, because these metrics do not consider the effect of angular consistency degradation on human perception.
In contrast, FR/NR LF-IQA metrics can better reflect the LFI quality owing to the additional consideration of angular quality deterioration. Among them, our previous metric DeeBLiF outperforms other existing metrics probably due to the powerful representative ability of the CNN features. This phenomenon also occurs in NR 2D-IQA metrics, where two CNN-based metrics, i. e. , HyperIQA and GraphIQA, achieve better performance than other handcrafted feature-based metrics. However, most existing LF-IQA metrics (including DeeBLiF) assess the LFI quality by evaluating the quality of its 2D representations, as a solution to the inherently high-dimensional attributes of LFI. Compared to previous methods, our proposed PVBLiF metric consistently achieves the best performance on three datasets. Moreover, our metric shows significant improvement over the second best metric on the Win5-LID and NBU-LF1.
0 datasets. The reason may be that the Win5-LID and NBU-LF1. 0 datasets contain more reconstruction distortions in LFI while the SHU dataset mainly includes common distortions in 2D images. These experimental results fully demonstrate the effectiveness of the proposed 3D representation (i. e. , PVBS) for LFI quality evaluation. Additionally, we provide the scatter plots of the objective prediction versus the subjective MOS for more intuitive visualization, as shown in Fig. 7. Due to the space constraint, we only show the scatter plots of the FR/NR LF-IQA metrics on the Win5-LID dataset. M OS p and M OS denote the prediction and its corresponding MOS, respectively. It can be found that the prediction of our metric is more in line with the subjective MOS, further demonstrating the validity of our metric.
B. Ablation study The proposed PVBSNet contains four stages with different functions, and the efficacy of each stage deserves further investigation. For this goal, the ablation studies of multiinformation division (stage 1), intra-feature extraction (stage 2), and cross-feature fusion (stage 3) are performed on the Win5-LID and NBU-LF1. 0 datasets, and the results are reported in TABLE IV. Here, we do not delve into the efficacy of the stage 4, as it is deemed necessary in our metric. From the table we can see that without stage 1, it is difficult for CNNs to learn discriminative spatio-angular features from the scrambled temporal information in PVS, thus the quality assessment performance drops dramatically. Likewise, stage 2 also shows a crucial role in extracting deep feature for quality assessment.
The incorporation of stage 3 promotes a marginal improvement in the final performance. The proposed PVBLiF assesses the LFI quality by evaluating the quality of each PVBS, thus a post-processing method is required to pool all the PVBS quality into the overall LFI quality. Most previous works, including our previously proposed DeeBLiF, adopt the commonly-used average pooling to obtain the LFI quality. In this subsection, to verify the effectiveness of the proposed SVPooling method and its two components, Saliency and Variance, we conduct the corresponding experiments on the Win5-LID and NBU-LF1. 0 datasets. The experimental results are reported in TABLE V. From the table we can see that using Saliency or Variance alone for post-processing can improve performance to a certain extent. The combination of Saliency and Variance, i.
C. Hyperparameter dependency As mentioned before, our metric involves two manual hyperparameters that determine the length and the spatial resolution of the generated PVBS, i. e. , A and S. In this subsection, we investigate the performance dependency of different hyperparameter values in our metric. TABLE VI exhibits the experimental results of different hyperparameter values on the Win5-LID dataset. When the hyperparameter S is fixed, it is observed that setting a small value for A leads to relatively poor performance, whereas similar performance can be achieved by setting A to 5 or higher. One possible explanation is that the selection of A directly determines the amount of angular information, and the lack of angular infor- In our metric, we use raster order to generate PVBS due to the availability of the regular horizontal and vertical information.
To investigate the impact of different generation orders, we conduct comparative experiments on the Win5-LID dataset with two other widely-used generation orders  [53] , i. e. , serpentine and spiral orders, as shown in TABLE VII. It can be seen that using serpentine or spiral order results in a performance degradation compared to raster order. The reason behind this is that with raster order, the subsequent multiinformation division can extract effective angular information, which facilitates learning the influence of different distortions on reference LFIs. In addition, it is necessary to investigate the dependency of different saliency models in the SVPooling method. Here, three saliency models are adopted to validate the effectiveness of SVPooling, including Wavelet  [74] , Cluster  [75] , and SDSP  [60].
D. Cross-dataset validation To investigate the cross-dataset robustness of the proposed PVBLiF, we conduct the cross-dataset experiments in this subsection. Specifically, we train our metric on the NBU-LF1. 0 and SHU datasets, and report the performance on the Win5-LID dataset. Note that both Win5-LID and NBU-LF1. 0 datasets contain the NN distortion, while both Win5-LID and SHU datasets include the JPEG2000 distortion. As shown in TABLE  IX , even when trained on other dataset, our proposed PVBLiF still achieves competitive performance, which proves that our metric has strong cross-dataset robustness.