dataesr/scientific-paragraphs-categorization huggingface dataset:
Hence, Figure6shows that Food and Drink, Residence, and Shopping are directly connected with the simple assumption that more Food and Drink, and Shopping facilities exist near the residential areas, which resulted in the high density of these activities in almost the same pattern. Generally, increasing numbers of people are preferring to live near the communities where they have easy access to service, i. e. , transport, health, entertainment. To investigate the activities behavior, we analyzed the data based on sex during weekdays and weekends in Shanghai. Figure7presents the sex-based check-in distribution of activities in Shanghai during the weekdays and weekends. Female users used Weibo more when performing activities related to Food and Drink, Hospital and Healthcare, Residence, Shopping, and Tourism.
We present a general deep learning method for detecting cracks on all sorts of surfaces. For making this method robust to different types of cracks and acquisition procedures, we have trained our method on four datasets -Crack500, DeepCrack, SDNet2018 and CrackForest. We have also labelled a part of the SDNet2018 dataset so that it contains semantic labels, as it originally only proposed crack/non-crack classifications on the image level. To validate our approach, we perform a cross-dataset study where we train the model on a subset of the datasets and test it on another subset. Results of this study show that training the model on these various datasets makes it more robust to new images, outperforming existing classical and deep learning methods. In order to make our method even more robust to different objects, scenes and illuminations, we have also added images from the Flickr website, leading to an important drop in false positives on extra dataset images.
However, two major problems subside. First, as these methods are specialized on specific areas (bridges or roads for instance) and specific acquisition procedures, their performance often drops when applied on different images. This can easily be observed by the variety of shapes, texture or illumination conditions of the images in different datasets (see Figure  1 ). (a) Crack500  [32]  (b) DeepCrack  [18]  (c) SDNet2018  [20]  (d) CrackTree  [35]  (e) CCIC*  [25]  (f) Codebrim  [22]  (g) AigleRN  [4]  (h) CrackForest  [30]   Secondly, some methods only classify images  [20, 22, 25]  as containing a crack or not. The shapes and widths of the cracks are not provided, although it can be an important information for assessing the cracks' severity. The objective of this work is to propose a robust semantic segmentation algorithm detecting cracks on images (see Figure  2 ).
For achieving this goal, we have first created a dataset merging the largest state of the art datasets: Crack500  [32] , DeepCrack  [18] , SDNet2018  [20]  and CrackForest  [30]. A part of the SDNet2018 dataset  [20]  has also been improved: it initially provided only crack / non-crack classes for each image, but using manually corrected predictions of the deep learning algorithm trained on the other datasets, we now provide semantic segmentation labels. Those labels are available online. This dataset was created so that our algorithm can be trained on a variety of crack detection problems. To evaluate its robustness, we have elaborated a cross-dataset study where the algorithm is trained on a subset of datasets and evaluated on another subset. We show that merging these datasets greatly enhances the robustness of the trained neural network.
Abdel-Qader et al. [2]  combine edge detectors and PCA to classify images as containing cracks or not. Shi et al. [30]  use a random forest to classify each pixel as belonging to a crack or not. Mundt et al. [22]  leverage convolutional neural networks to classify defects -cracks being among them -on pictures of bridges. Several methods  [18, 17, 15]  use deep learning semantic segmentation methods to segment images into crack / non-crack areas. In order to train machine learning and deep learning methods, several datasets have been released by the scientific community. Datasets of road pavement images are particularly numerous  [30, 8, 32, 35, 4, 6]. Among them, only  [30] ,  [32]  and  [4]  provide semantic segmentation labels. CrackTree  [35]  only provides a fine line representation of the cracks, their widths are therefore not provided.
GAPs  [8]  and AsphaltCrack  [6]  classify each image as containing a crack or not, no semantic segmentation annotations are provided. Codebrim  [22]  is a dataset classifying defects on bridge images. SDNet2018  [20]  and Deep-Crack  [18]  are more general datasets and contain images from various areas (bridges, walls and pavements). However, only DeepCrack provides semantic segmentation labels; SDNet2018 classifies images as containing cracks or not.
Dataset Creation The dataset was created by combining Crack500  [32] , DeepCrack  [18] , SDNet2018  [20]  and Crack-Forest  [30]. The dataset was divided into three parts: training, validation and testing. For allowing an easier comparison with the state of the art, the initial repartition of each dataset was respected when possible: for instance, an image in the training part of the dataset of Crack500 stayed in the training part of the combined dataset. DeepCrack only provided training and validation subsets: a testing subset was created by separating the validation subset in two parts. SDNet2018 and Crack-Forest didn't provide any training, validation or testing subsets: they were randomly separated into three parts. Filenames used in each set are available online. The size of each dataset is shown in Table  1.
There is an important imbalance between the datasets both in terms of number of images and number of pixels. We describe in Section 3. 2 how we manage this imbalance. As SDNet2018 didn't provide any semantic segmentation labels, we used our model trained on Crack500, DeepCrack and CrackForest to produce semantic segmentation labels on a part of SD-Net2018 (1000 images). These labels were then manually corrected. As the dimensions of the images were different from one dataset to another, they were divided into patches of 256 × 256 pixels to make the learning process easier.
The architecture is shown in Figure  4. The loss used for training is binary cross entropy L = - i,j y[i, j] log(p[i, j]) + (1 -y[i, j]) log(1 -p[i, j]) w × h , where y[i, j] is the ground truth label at pixel (i, j) (0 being non-crack, 1 being crack), p[i, j] is the predicted probability that the pixel (i, j) is crack, w and h are the width and height of the patch. The neural network takes a grey level image as input and outputs the semantic segmentation map which is a 2D matrix of values between 0 and 1 representing the likelihood that a pixel is in a crack. RGB images are converted to grey level images to maximize the generalisability of the model: the neural network is less likely in this case to be disturbed by colors that were never represented in the dataset. During training, random flips, rotation, zooms (between -20% and +20%), illumination and contrasts changes were done in order to augment the merged dataset (see  Algorithm 1).
The size of the batches was set to 8, and they were constructed so that each dataset was represented approximately equally to prevent larger datasets to have a higher impact than smaller ones in the training process (see Algorithm 2). We used Adam  [12]  as the optimizer, with α = 0. 001, β 1 = 0. 9 and β 2 = 0. 999, as recommended in the original paper. The momentum of batch normalization layers was set to 0. 99. We also used the ReduceLROnPlateau functionality of Keras 2  : during the training process, the learning rate is multiplied by 0. 2 if a new low in the validation loss does not appear for 10 epochs.
Cross-Dataset Study To estimate the generalisability of our model, we have conducted a cross-dataset study which consists of training the model on a subset of datasets and testing it on a different subset. As described in Section 3. 2, the output map of our neural network is a likelihood map where each pixel has a value comprised between 0 and 1 representing the likelihood that the pixel is in a crack. To evaluate these likelihood maps, we propose to use two metrics: a modified version of the F 1 score  [10] , and the Area Under the Curve of the ROC curve  [9]. For the first metric, we transform our likelihood map into a binary map by applying a threshold b(x, y) = l(x, y) > t with t = 0. 5, l being the likelihood map and b the resulting binary map. A = tp tp + f n = |{b = 1} ∩ {g = 1}| |{g = 1}| , where b is the binary segmentation map ({b = 1} is the set of points {(i, j), b(i, j) = 1}), g is the ground truth, and tp, f p and f n are respectively the number of true positives, false positives and false negatives.
Although this metric is adapted to most classification tasks, it can be ill-adapted to semantic segmentation problems where thin objects are represented, as it is the case with cracks. Indeed, the width of cracks is generally between 2 and 5 pixels in the databases under study. As illustrated in Figure  5 , if the width of the crack is 3 pixels and there is a shift of just one pixel between the detection and the ground truth, the precision, recall and F 1 scores all drop to 2 3 where it would have been 1 if the semantic segmentation was aligned correctly. This drop is very important considering that, due to inaccuracies and inconsistencies intra and inter-dataset during the labeling process, the ground truth often exhibits such discrepancies. Moreover, it is not necessary to be precise down to the pixel level: a shift of a few pixels is not likely to modify the crack's diagnosis.
The best area values are close to 1 (or 100%) as it means that there exists a threshold detecting most positives with very few false positives. Tables 2, 3 and 4 show the performance of all considered networks when trained on a single dataset and tested on another one. As expected, the results are best when a network is trained and tested on the same dataset. F 1 scores can be poor, especially when the model has been trained on one dataset and tested on another, but are significantly improved when using θ-F 1 with θ = 5, suggesting that these low measured performances are mostly due to differences during the labelling process. Indeed, the ground truth represents cracks with different widths depending on the dataset. Overall, the θ-recall is lower than the θ-precision, implying that there is a higher number of missed cracks than false positives.
Crack500 SDNet2018 CrackForest DeepCrack P. R. F1 P. R. F1 P. R. F1 P. R. F1 Crack500 76% 58% 66% 53% 46% 49% 75% 37% 49% 74% 75% 75% SDNet2018 37% 27% 31% 68% 64% 66% 57% 69% 62% 75% 62% 68% CrackForest 67% 18% 29% 76% 26% 38% 78% 60% 68% 76% 34% 47% DeepCrack 66% 34% 44% 53% 55% 54% 84% 26% 40% 74% 78% 76% Table  2 : Cross dataset performance study: performance when training on a single dataset (1/3). The first column indicates the dataset on which the neural network has been trained. The first line indicates which dataset it has been tested on. The performance metrics are the classical precision (P. ), recall (R. ) and F 1 : 0% represents the worst performance, 100% is the best performance. Table  5  shows the AUC performance of the networks when trained on all datasets except one and tested on the remaining one.
Although the performance is slightly worse compared to when the Crack500 SDNet2018 CrackForest DeepCrack θ-P. θ-R. θ-F1 θ-P. θ-R. θ-F1 θ-P. θ-R. θ-F1 θ-P. θ-R. θ-F1 Crack500 92% 82% 87% 56% 63% 59% 99% 59% 74% 81% 91% 86% SDNet2018 47% 43% 45% 77% 81% 79% 99% 81% 89% 87% 81% 84% CrackForest 80% 38% 52% 79% 47% 59% 99% 93% 96% 84% 53% 65% DeepCrack 83% 51% 63% 57% 77% 65% 99% 49% 66% 83% 90% 86% Table  3 : Cross dataset performance study: performance when training on a single dataset (2/3). The first column indicates the dataset on which the neural network has been trained. The first line indicates which dataset it has been tested on. The performance metrics are the θ-precision (θ-P. ), θ-recall (θ-R. ) and θ-F1 introduced in Section 3. 3 with θ = 5: 0% represents the worst performance, 100% is the best performance.
network is trained and tested on the same dataset, it is consistently better than when we train a network on one dataset and test it on another. Also, the worst combination achieves an AUC of 94. 3%, whereas the worst AUC of the best network trained on a single dataset is 90. 9%, suggesting that training on several datasets produces more robust networks. We have done this cross-validation for multiple architectures in Table  6. Our method performs better on the worst performing combination than any of the other tested architectures, suggesting that it generalizes better. Also, training our architecture on each dataset separately, then evaluating each neural network on the test set and combining the predictions using different operators (min, median, avg, max) doesn't produce better results.
Trained on Table  5 : Cross dataset performance study: performance when training on several datasets using our approach. AUC: Area Under Curve of the ROC curve  [9] : 0% represents the worst performance, 100% is the best performance. Diff. 1: how much the AUC has changed compared to when we trained the model on the dataset we tested it on. Diff. 2: how much the AUC has improved compared to the best model trained on a single dataset different from the one it was tested on.
Quantitative and Qualitative Results Table  7  shows the AUC performance of multiple models (trained on all datasets when possible). The AUC performance of our proposed network is comprised between 97% and 99% depending on the dataset, and its performance is close to, or better, than the one of networks trained and tested on the same dataset. Architecture Min. AUC Max. AUC FCN-8  [19]  94. 1% 97. 2% FCN-32  [19]  91. 6% 95. 3% PSPNet  [34]  91. 3% 95. 1% SegNet  [5]  90   Table  8  shows the recall, precision and F 1 performance metrics as well as their θ counter-part. Figure  6b  shows the relationship between θ and θ-F 1. Overall, there is an increase of 15 to 20 percentage points when comparing F 1 scores to θ-F 1 scores with θ = 5: a large part of the errors measured by F 1 are due to small discrepancies between the binary map and the ground truth around cracks.
Method Our method can also be used for classifying whole patches. For doing so, we define a patch as (a) θ-precision, θ-recall and θ-F 1 for our method. containing a crack if there exists a pixel inside it marked as belonging to a crack in the ground truth. If we define S = ∀x∈p p(x), p(x) being the prediction mask, the optimal threshold maximizing the F 1 score is S > 176. 09, achieving an F 1 score of 89%, a precision of 92% and a recall of 87%. Examples of predictions of our U-net on the merged dataset are shown in Figure  8. Figure  9  shows an example of prediction on an image of ground crack, a type of crack that the network was never trained on, suggesting that the network generalizes well.
Robustness Enhancement using Extra-Dataset Images We have shown in Section 3. 4 that combining several datasets during training enhances the robustness of detectors. However, a limitation of the combined dataset we have constructed is that it focuses on images of concrete structures containing cracks. As it doesn't contain images of more general scenes, the trained detectors fail when tested on images containing different objects (see Figure  10 ). In order to make our crack detector more robust, we have added in our merged dataset an additional set of 3893 images from the Flickr 3  website (a list of image URLs will be made available). These images served as negative examples, and a manual check was done to check that they contained no cracks. Some comparative results are shown in Figure  10  and Table  9.
The detector trained on the augmented dataset is less sensitive than when trained on the original dataset (precision is higher and recall is lower): this is an expected effect of adding images with only negative examples. We have therefore shown in Table  9  the performance of the model trained on the original dataset with the standard threshold of 0. 5 and an additional threshold of 0. 75 resulting in a similar precision and recall than what is achieved by the model trained on the augmented dataset. The number of false crack detections on the Flickr dataset is much lower: there are, on average, 40 times less false positive pixels when using the model trained on the augmented dataset than the one on the original dataset. This observation remains true even after adjusting the threshold on the model trained on the original dataset: the number of false positive pixels is 12 times lower in that case.
Conclusion We have presented a general deep learning method for detecting cracks on textured surfaces. For making this method robust to different types of cracks and acquisition procedures, we have trained our method on four datasets -Crack500  [32] , DeepCrack  [18] , SDNet2018  [20] , CrackForest  [30]. We have also labelled a part (1000 images) of the SDNet2018 dataset so that it contains semantic labels, as it originally only proposed crack / non-crack classifications on the image level. In order to make our method even more robust to different objects, scenes and illuminations, we have also added images from the Flickr website, leading to an important drop in false positives on extra dataset images. To validate our approach, we have done a cross-dataset study where we trained the model on a subset of the datasets and tested it on another subset.
Patch preprocessing during training input : patch output: patch (processed) avg = mean(patch) patch -= avg patch * = RandomNumberBetween 0 And 1 + 0. 5 patch += avg + (RandomNumberBetween 0 And 1 -0. 5) × 0. 3 if RandomCoinFlip = True then patch = VerticalFlip(patch) if RandomCoinFlip = True then patch = HorizontalFlip(patch) Apply random rotation on patch (set undefined pixels to 0) Apply random zoom, between 0. 8 and 1. 2 on patch (set undefined pixels to 0) return patches Algorithm 2: Batch dataset balancing input : patchesListPerDataset, sizeOfBatch output: patches nbPatches= sizeOfBatch number of datasets patches = Empty Array() foreach dataset in patchesListPerDataset do for i in range(0, nbPatches) do patches. append(pick random patch from patchesListPerDataset[dataset]) return patches classical metric for measuring classification tasks is the F 1 score [10], which takes into account both the precision and the recall of the classifier F 1 = 2 × precision × recall precision + recall , with precision = fraction of true positives among all detections = tp tp + f p = |{b = 1} ∩ {g = 1}| |{b = 1}| , recall = fraction of true positives succesfully detected.
[9]ss dataset performance study: performance range when training on several datasets using different architectures. AUC: Area Under Curve of the ROC curve[9]: 0% represents the worst performance, 100% is the best performance. Min. AUC & Max. AUC : minimum and maximum AUC obtained when combining 3 datasets and testing on another. Spe. (method): for each sample, we run our architecture trained on each dataset, and aggregate the detection using the minimum, median, average and maximum.
[9]formance of the model trained on all datasets. AUC: Area Under Curve of the ROC curve[9]: 0% represents the worst performance, 100% is the best performance. Bold: best results. Gray bold: second best results. * The CrackIT method doesn't use machine learning, so it was not trained on the dataset. ** Contrary to all other deep learning methods in the table, DeepCrack was not trained on our dataset.
Acknowledgment We gratefully acknowledge the support of  NVIDIA Corporation  with the donation of the Titan Xp GPU used for this research. Work partly financed by Office of Naval research grant  N00014-17-1-2552 ,  DGA   Astrid  project  «filmer la Terre»  n •  ANR-17-ASTR-0013-01 ,  DGA Defals  challenge n •  ANR-16-DEFA-0004-01.
Algorithm 1 : 1 Patch preprocessing during training input : patch output: patch (processed) avg = mean(patch) patch -= avg patch * = RandomNumberBetween 0 And 1 + 0. 5 patch += avg + (RandomNumberBetween 0 And 1 -0. 5) × 0. 3 if RandomCoinFlip = True then patch = VerticalFlip(patch) if RandomCoinFlip = True then patch = HorizontalFlip(patch) Apply random rotation on patch (set undefined pixels to 0) Apply random zoom, between 0. 8 and 1. 2 on patch (set undefined pixels to 0) return patches Algorithm 2: Batch dataset balancing input : patchesListPerDataset, sizeOfBatch output: patches nbPatches= sizeOfBatch number of datasets patches = Empty Array() foreach dataset in patchesListPerDataset do for i in range(0, nbPatches) do patches. append(pick random patch from patchesListPerDataset[dataset]) return patches classical metric for measuring classification tasks is the F 1 score [10], which takes into account both the precision and the recall of the classifier F 1 = 2 × precision × recall precision + recall , with precision = fraction of true positives among all detections = tp tp + f p = |{b = 1} ∩ {g = 1}| |{b = 1}| , recall = fraction of true positives succesfully detected.
Feces collection was carried out at the 19th week of age. At the end of the studies, mice were euthanized by pentobarbital administration. Tissues were flash frozen for transcriptomic analysis or 2-AG quantification. For practical reasons and following the observation of similar phenotypes between male and female and a more thorough characterization of female group during DIO1, DIO 2 and DIO 3 were only performed on female. Most of data presented in this paper have been obtained from female mice. The weight curve of male mice from the DIO 1 is presented in Supporting Information.
Microarray and data analysis About 100 ng total RNA was processed for Microarray as described by manufacturer using SurePrint G3 Mouse Gene Expression v2 8x60K Microarray chips (Agilent). Microarray files were analyzed using Array studio (OmicSoft Corp. Qiagen). Data analysis includes 1) generation of raw signal intensities from g-Processed signal, 2) setting threshold/ adding constants (raw signal intensities < 5 were set as 1), 3) combining multiple probes based on Mapping gene name, 4) Log2 transformation and 5) 75 th Quantile normalization. Non-parametric tests were performed on normalized data and only samples which passed QC were used for twoway ANOVA.
Omics analysis of data Both metabolomics and transcriptomics data were integrated with AskOmics  (Garnier et al. 2017). This allowed us to detect significant changes in the metabolome of the KO mice, supported by transcriptomics significant changes in liver that could not have been detected by analyzing the datasets separately (metabolome only or transcriptome only) We designed a data-driven model to load all the results of both studies in the same repository using AskOmics  [27] (S6 Fig, in S1 Appendix). To link genes to metabolites, all paths were computed between the Compound (metabolite) and Gene classes of the Kegg and Reactome databases, using the RDF version provided by Bo2RDF  [28]. This integration work allowed us to query all data to identify genes and metabolites having a biological relation and also being affected by the genotype and/or the diet.
Due to the duration of the study, mice could not be kept in individual cages. Food and water consumption was evaluated by cage. As shown in Fig  3C , there were few differences in the cumulative food intake, whatever the genotype or the regimen. Only a slightly less food intake was measured in KO mice under HFD. This likely represents an artefact, as this observation was not reproduced in another DIO study with higher numbers of mice and cages (S8C Fig, in S1 Appendix). Globally, all mice ate the same quantity of food, showing that the body weight phenotype observed is not linked to food intake. The same observation was made for water consumption (data not shown). Glycemia control. Fasting and non-fasting insulin level study. Fasting and non-fasting blood insulin levels was monitored every four weeks from week 8 to week 24 for fasting conditions (Fig 4A ) and from week 6 to week 27 for non-fasting conditions (Fig  4B ).