dataesr/scientific-paragraphs-categorization huggingface dataset:
IMPLEMENTATION In this work, we seek to use the DIVA VR visualization context with 3D image analysis. We focused on the acceleration of image annotation with the objective of exploit new data without prior information or a pre-trained model. We aimed at reducing the burden of data tagging, which can require a large amount of user interaction. Our procedure consists of rapid 3D tagging in VR, simple classifier training and inference on the entire dataset with iterative corrections performed within VR. The complete procedure, Voxel Learning, is described schematically in Figure  3A  and in the included Supplementary Video S1.
Annotation in VR and Feature Extraction In this updated version of the DIVA software, we implemented a VR tagging functionality which allows voxel annotation i. e. , associating an identifier (ID) to individual voxels. Tagged voxels appear in different colors, in a transparent wireframe mesh around the tagged voxel, allowing simultaneous visualization of the voxel and its tag. In the application shown in Figure  3B , the two colors are cyan and magenta as they highly visible in most situations. Tags can be updated or erased if necessary. The clipping plane tool (CPT)  (El Beheiry et al. , 2020)  is also available to ensure more precision in ambiguous situations (see Figure  1C ) and fluid tagging within the volume. Most importantly, the CPT allows annotating data at the frontier between different domains with geometries that do not align along the natural axis of data acquisition.
Inside the VR environment, the properties of the interface and the transfer function are instrumental in accelerating the annotation process. We demonstrate the tagging procedure in Supplementary Video S2 on a medical example. We additionally integrated the ability to calculate image features with the DIVA software. An efficient feature evaluation was implemented for each voxel, using a small subset of features  (Arganda-Carreras et al. , 2017). It includes a wide variety of spatial filters (Gaussian, median, mean, etc. ) with different kernel sizes for gathering simple multi-scale features in the vicinity of the voxels. Features are then associated with a unique voxel ID, and the list of annotated voxels is stored. In the case of iterative tagging, the iteration number is also stored and associated with the voxel IDs.
Training and Inference Our application here consists of accelerating data annotation using a simple one-shot learning procedure based on a few VR controller "strokes" performed by the user on the image stack. We follow the same principles as those used in ilastik  (Berg et al. , 2019) , Weka  (Arganda-Carreras et al. , 2017)  or behavior detection in larva  (Masson et al. , 2020) , by tagging limited sets of data and stacking simple learners in order to train a collectively stronger classifier. Specifically, features are associated with tagged voxels, and learning is performed using robust classifiers in limited amounts of data. Furthermore, data tagging iterations allow the correction of anomalies in the learning to process the data. We updated the DIVA desktop user interface to allow users to create quickly, load, and export classifiers.
Basic classification approaches were used since they are known to provide robust classification on small datasets, such as Random Forest Classification (RFC), Multi-Layer Perceptron (MLP), Gradient Boosting (XGB), Support Vector Machine (SVM), and Naive Bayes (NBC) as implemented in the Scikit-learn  (Pedregosa et al. , 2011)  Python package. In addition, hyperparameters were tuned to adapt to the problem being investigated and set to ensure rapid learning. Note that in this application, the usual problem of overfitting  (Mostafa, 2012)  is less present, as the goal is to annotate the data being explored and not to find a general learning scheme. Once the user has finished the annotation step, features associated to voxels are evaluated locally. They are then transferred in JSON format to the cloud, where a model is trained to classify all voxels in the 3D data stack.
The models and their associated parameters are saved locally in a Pickle (Python) format. They can afterwards be loaded to perform inference on the entire dataset or, if found robust, provide initial annotations on new, previously unseen, data. The resulting inference is then broadcasted back from the cloud for local rendering in DIVA. VR provides a significant advantage in the data annotation task by properly overlaying the classification result on the raw data in a volumetric representation. The representation of both the raw data and the annotated data provided by the classifiers helps correct errors and ensures proper annotation. We integrated a channel-based representation to DIVA in which raw data and classifier-generated data are associated with different channels allowing separate and fused views of both raw and classified data.
DIVA Cloud DIVA Cloud allows users to interact with data in VR and perform the analysis via Python scripts (see Section 6) whose calculations are performed on a remote web server. This development is motivated by the computational costs required for detailed VR volumetric rendering, leaving limited calculation bandwidth. Accordingly, to ensure fluid interactions and precise annotation dynamics, computationally costly operations are performed on the remote web server (i. e. cloud). We used Django, a Python Framework, as an application programming interface (API) provider for this project. Django features a system of data models and serializer links to a PostgreSQL database, enabling the management of jobs and file objects to track the life cycle of the learning jobs and various input and output files.
This system is instrumental, as it permits performing a limited set of queries to interact with the cloud component. The REST web service is used to provide an API with specific endpoints accessible from DIVA using HTTP methods. Celery, a task queue intermediate between the web server and the Python scripts, enables jobs to run asynchronously in a multi-threaded fashion. At the same time, the broker, Redis, allows communication with Celery. We implemented DIVA Cloud within a Docker container to ensure portability on most platforms since it does not depend on the user installation. The layers implemented in the container consist of 1) the Django webserver, 2) the Celery task queue that integrates learning scripts (with their associated packages), 3) the Redis broker, and 4) the PostgreSQL database.
RESULTS Our analysis was performed on a Windows 10 based ×64 system with an Intel i7-7700 CPU clocked at 3. 60 GhZ, with 32 GB of RAM and an NVIDIA GeForce RTX 2080 Ti graphics card. An HTC Vive headset with its controller were used through SteamVR to perform the tagging procedure in VR. This particular VR headset has a total screen resolution of 2,160 × 1,200 pixels (1,080 × 1,200 for each eye). Analysis scripts were coded in Python 3. 7. The DIVA Cloud configuration was also tested on a NVIDIA DGX-1 workstation as the remote server performing the computationally challenging tasks. The frame rate of DIVA Cloud is highly dependent on the hardware configuration, image size, interface (Desktop interface in 2D or VR interface), and the user's movements in VR. Detailed information on the frame rate regarding this study can be found in Supplementary Table  S3.
If the status is "running", the status of the job is requested (Step 4 again). If the status is "done", continue. If the status is "error", it is managed. 5) GET request to the/jobs/jobid/files/endpoint to get the output list 6) GET request to the/jobs/jobid/files/fileid to download the output. For medical images, we used raw and annotated images in order to compare the one-shot annotation to the expert full tagging. We computed Dice coefficient and Residual Mean Square Errors (RMSE) between our inferred probabilities and the given segmentation. The goal here was to evaluate how fast annotation in VR and quick simple learning can reduce the tagging of new data to a few complementary VR strokes. Performance depends on the nature of the features extracted from the dataset. As features were designed to cover a large variety of patterns and scales, our method can see use in many additional applications and data types.
The procedure was assessed on a various range of examples: annotation of pancreas (Supplementary Figures  S3, S4 ) and hepatic vessels (Supplementary Figures  S5, S6 ) in CT-scans, annotation of mouse microglia in two-photon fluorescence microscopy (Supplementary Figure  S7 ) and mouse hippocampal neurons in SEBI microscopy (Supplementary Figures  S8, S9 ). With a total size of more than 400 million pixels, this last example confirms that our pipeline is compatible with large datasets.
DISCUSSION Virtual and augmented reality will likely play an increasingly important role in research and medical applications. More specifically, leveraging VR as part of analysis pipelines will be essential in defining algorithms and processes. This paper focused on performing interaction and analysis in VR. We developed libraries and toolboxes allowing data annotation and analysis where computationally intensive operations are done on servers or the cloud and data fusion within the VR environment. Our approach combines several updates of the DIVA platform and a generalist interface allowing cloud computing from the VR environment. We showed proof-of-concept results on an accelerated image annotation task in which new data requires human-in-theloop intervention to provide initial results.
g. , the pink streaks in Figure  6 ), will be instrumental in accelerating data annotation by easing learning. When compared to ground truths, the inspection of learned results is often a time-consuming task, especially when dealing with 3D data. Through its capacity to fuse different volumes in the representation, DIVA offers a suitable and time-saving environment to perform such a comparison. In turn, it allows exploring the reliability of the learning procedure and assess the quality of the ground truth itself when dealing with ambiguous data. It provides the possibility of re-annotation where anomalies are detected to feed the re-training procedure. In this paper, we focused on the handcrafted procedure and simple ensemble learning approaches. While some of the data shown were noisy (e.
g. , Figure  7 ) or subject to artifacts (e. g. , Figures 6A-F), they were relatively unambiguous. Local handcrafted features were sufficient to allow efficient semiautomated annotation. Furthermore, we limited ourselves to cases where data were completely new, and the learner would be mainly used on the explored dataset. However, complex data or the design of reusable learners may require learned features. The current pipeline can perform more complex learning. We showed (see https://github. com/DecBayComp/VoxelLearning) an example where VR annotation was directly used to capture a volume of voxels around the annotated ones and where learning was directly performed on these volumes with learned features. Finally, large-scale deep convolution-based learning can be performed by directly transmitting the full data to the cloud and using DIVA Cloud to link annotation to learning by simply exchanging voxel identifiers.
Our future initiatives will center on two topics. First, we will 1) extend DIVA and DIVA Cloud to run on AR headsets and tablets. AR involves overlaying the visual representation of the data onto the world while not immersing the user in an artificial environment. However, AR often involves representation of lesser quality than VR when used in glasses or headsets and have limited computational resources, especially when used in phones or tablets. The initiative's core is to reduce the computational burden of full volumetric rendering to allow visualization and interaction in an AR environment. Second, we will 2) extend DIVA Cloud to allow rendering computation on the cloud and stream to the VR headset. This cloud extension will pave the way to large dataset rendering and more computationally involved rendering approaches, such as path tracing.
ACKNOWLEDGMENTS We thank  Alexandre Baffet  ( Institut Curie ),  Thomas Rubin  and  Jean-Ren Huynh  ( Collège de France ) for the microscopic image datasets provided to generate the figures. We also thank  Jebrane Bouaoud  ( AP-HP ) for the medical images provided to generate the figures. We acknowledge  Stephane Fournier , the naviscope  Inria  project lab teams & Thomas Isenberg for fruitful discussions.
FUNDING We acknowledge funding from the Institut Pasteur, the Institut Curie, the Paris Science lettre (PSL) University, the sponsorships of CRPCEN, Gilead Science and foundation EDF, the INCEPTION project (PIA/ANR-16-CONV-0005, OG), the LabEx "Revive" (ANR-10-LABX-73), the programme d'investissement d'avenir supported by L'Agence Nationale de la Recherche ANR-19-P3IA-0001 Institut 3IA Prairie and the support of the AVIRON grant from the Région Ile-de-France (DIM-ELICIT). We acknowledge funding from the Fondation pour la recherche médicale (FRM; DEI20151234398), the Agence National de la recherche (ANR-19-CE42-0003-01), the LabEx CelTisPhyBio (ANR-10-LBX-0038, ANR-10-IDEX-0001-02) and the Institut Curie. We recognize the support of France-BioImaging infrastructure grant ANR-10-INBS-04 (Investments for the future).
Building on near-real-time and spatially explicit estimates of daily carbon dioxide (CO 2 ) emissions, here we present and analyze a new city-level dataset of fossil fuel and cement emissions, Carbon Monitor Cities, which provides daily estimates of emissions from January 2019 through December 2021 for 1500 cities in 46 countries, and disaggregates five sectors: power generation, residential (buildings), industry, ground transportation, and aviation. The goal of this dataset is to improve the timeliness and temporal resolution of city-level emission inventories and includes estimates for both functional urban areas and city administrative areas that are consistent with global and regional totals. Comparisons with other datasets (i. e. CEADs, MEIC, Vulcan, and CDP-ICLEI Track) were performed, and we estimate the overall annual uncertainty range to be ±21.
Background & Summary More than 60% of global fossil-fuel CO 2 emissions are produced in cities  1, 2  , and high-quality city-level emissions inventories are urgently needed to support international climate mitigation efforts  [3] [4] [5]. For example, many cities have adopted goals of reaching net-zero emissions by 2030 or 2050, which require them to monitor and report emissions on a timely basis  6. Unfortunately, a global, open, and harmonized dataset of city-level emission inventories is yet lacking  7, 8. Instead, most CO 2 emission inventories are conducted at the country level, as city-level fossil fuel consumption data are more difficult to acquire  9. Furthermore, many inventories-including national inventories reported to the United Nations Framework Convention on Climate Change (UNFCCC) often lag reality by one years or more  10, 11.
These approaches can provide good estimates for major cities that disclose high-quality energy consumption data  16. However, they can not be readily applied to a larger scale, where city-specific data are largely absent, especially for smaller cities  19. Downscaling represents a solution to the scalability issue. Some recent studies use economic input-output (IO) tables down-scaled from national statistics to attribute emissions to cities  18, 20  , and other studies use spatial proxies to disaggregate national or sub-national emissions to finer scales. Popular spatial proxies include night-time light imagery and existing gridded emission maps, such as the Emission Database for Global Atmospheric Research (EDGAR)  21-  , which also relies on other spatial data like population density and road networks.
Downscaling has been used to construct multiple city-level datasets that cover a large number of cities  17, 21  , and we adopt a similar approach in this study. Cities that disclose their emissions typically follow protocols or standards such as the Global Protocol for Community-Scale Greenhouse Gas Emission Inventories (GPC)  24  , the International Council for Local Environmental Initiatives (ICLEI)  25  or the ICLEI-USA  16. However, the reliability of these self-reported inventories is difficult to assess due to the lack of peer-review  5, 8, 26. Inter-dataset comparison is also difficult due to inconsistent definitions of spatial and temporal scales, protocols, sector coverage, activity data sources, and accounting methods  5, 8, 25, 27, 28  , and many original input data are untraceable  8.
Therefore, a methodological framework that supports inter-dataset comparisons and calibration is yet to be developed for cities. Where city-level emissions inventories exist, they often rely on data provided by organizations such as the China Emission Accounts and Datasets (CEADs: https://www. ceads. net/  29 ), the Multi-resolution Emission Inventory (MEIC, http://meicmodel. org/  30, 31 ), or inventory warehouses like the CDP-ICLEI Track (https://www. cdp. net/). But the coverage, timeliness, and temporal resolution of these data are not always sufficient to support agile and informed decision making. For example, although several high-quality datasets are available for high-income countries, such as the Covenant of Mayors database (https://www. globalcovenantofmayors. org/  25, 32  ) and OpenGHGmap (https://openghgmap.
net/  19  ) for EU cities, and the Vulcan and Hestia datasets for U. S. cities (https://vulcan. rc. nau. edu/, https://hestia. rc. nau. edu/  4, 5, 33 ), the tension between human development and decarbonization requires an increasing focus on rapidly expanding cities in low-income and emerging regions in South America, South and Southeast Asia, Africa and the Middle East where high-quality emission inventories are lacking  34, 35. Moreover, most existing city-level inventories have the issues of long time lag and low temporal resolution. Recently, the methodological frameworks for estimating near-real-time (NRT) daily CO 2 emissions have been developed and successfully used for studying the impacts of COVID-19 on global CO 2 emissions  [36] [37] [38] [39]. Here, we build on these approaches to provide NRT daily emission estimates for hundreds of cities worldwide, including many in low-income regions.
The Carbon Monitor Cities (CM-Cities) dataset presented in this paper also provides a possible solution to address the inconsistency between administrative emissions versus community-wide emissions. Differences in spatial scope and accounting methods inevitably complicate comparisons among cities  8, 17  , and one possible solution is to compile the inventories based on different functional zones of the city, such as differentiating the core and commuting zones  25. This dataset is constructed based on a global harmonized workflow that consistently quantifies production-based emissions from core administrative areas in top emitting countries and, separately, emissions from the world's major metropolitan/functional urban areas.
Methods Workflow. Carbon Monitor Cities is downscaled from the Carbon Monitor, which is a NRT national level emission dataset at a global scale  10. Specifically, CM-Cities is produced following a four-stage workflow (Fig. 1 ). The first stage mainly involves the construction of Global Gridded Daily CO 2 Emission Datasets (GRACED)  40  , which are daily emission maps generated by spatializing Carbon Monitor daily emissions using the Global Carbon Grid (GID), the Emissions Database for Global Atmospheric Research (EDGAR) and TROPOspheric Monitoring Instrument (TROPOMI). GRACED covers seven sectors (power, industry, residential and commercial buildings, ground transportation, domestic aviation, international aviation, and international shipping) and provides NRT emission maps for fossil fuel combustion and cement production with a global spatial resolution of 0.
1° by 0. 1° and a temporal resolution of one day. GRACED is an intermediate gridded dataset between the Carbon Monitor and CM-Cities, and the methods for generating this gridded dataset is described in a later section. In the second stage, we disaggregated the gridded daily emissions into cities based on two types of city areas: Global Administrative Areas (GADM) and Functional Urban Areas (FUA) to address the definition differences of "a city" in different countries. The FUA is defined by the Organisation for Economic Co-operation and Development (OECD) and the European Union as the high-density urban centres plus their surrounding commuting zones  41. For OECD countries, we used the OECD FUA, which provides higher quality FUA for OECD countries (https://www. oecd. org/regional/regional-statistics/functional-urban-areas.
htm  42 ). For other countries, the Global Human Settlement FUA is used (https://ghsl. jrc. ec. europa. eu/ghs_fua. php  43 ). The GADM level-2 administrative areas are used for prefecture-level cities in China and counties in the United States. The details of the features and the usage of FUA and GADM datasets are described in later sections. The spatial downscaling/disaggregation is performed by first converting the FUA and GADM shapefiles into raster datasets with a unique ID assigned to each city. Then the raster city area maps are used as masks to extract the matching grid cells in the GRACED emission maps. We then aggregate emission values for grid cells that correspond to the same city mask to yield the total sectoral emission value for a given city. In the third stage, we use city-level data to correct for the residential and ground transport sectors to address the bias in raw city-level inventories from the second stage.
We use city-specific TomTom daily transport congestion data and daily heating degree days (HDD) for the corrections. The fourth stage involves error correction and data validation. We first identify and remove outliers (which are mostly errors introduced by previous processing steps and/or from the source data) using statistical approaches. We then collected city-level inventories from other datasets (mostly annual data) and compared them to our results for validation. The detailed procedures for these processes are described in later sections. CM-Cities currently includes city-level emission inventories from 01/01/2019 to 31/12/2021 for five main sectors: 1. power generation, 2. residential and commercial buildings, 3. industrial production, 4. ground transportation, and 5. aviation. These five sectors combined account for over 70% of fossil fuel CO 2 emissions from a city  33.
Custom code used in this work is described in the Code Availability section. Coverage. CM-Cities covers 1500 cities in 46 counties (Fig. 2 ). Most of the cities are clustered in Europe, Asia, North and South America. Major cities in Oceania and Africa are also included. Figure  2  also shows comparisons between the FUA and the GADM for Los Angeles (US), Hangzhou (China), and Melbourne (Australia). The FUA typically covers a larger area than the administrative area, but for cities in some countries, such as China, the FUA is typically smaller than the administrative city area. The use of both area definitions facilitates dataset comparisons, which is highlighted for cities in China and the United States. These two different spatial scopes also provide critical information for differentiating administrative emissions versus community-wide emissions.