KimiaPath24: Dataset for retrieval and classification in digital pathology
In this paper, we introduce a new dataset, Kimia Path24, for image classification and retrieval in digital pathology. We use the whole scan images of 24 different tissue textures to generate 1,325 test patches of size 1000×1000 (0.5mm×0.5mm). Training data can be generated according to preferences of algorithm designer and can range from approximately 27,000 to over 50,000 patches if the preset parameters are adopted. We propose a compound patch-and-scan accuracy measurement that makes achieving high accuracies quite challenging. In addition, we set the benchmarking line by applying LBP, dictionary approach and convolutional neural nets (CNNs) and report their results. The highest accuracy was 41.80% for CNN.READ FULL TEXT VIEW PDF
Convolutional Neural Networks (CNN) are state-of-the-art models for many...
The aim of this study was to develop a digital histopathology system for...
Despite the progress made in the field of medical imaging, it remains a ...
In the last years, neural networks have proven to be a powerful framewor...
Whole Slide Imaging (WSI) has become an important topic during the last
3D scan geometry and CAD models often contain complementary information
In this paper we introduce a new digital image forensics approach called...
KimiaPath24: Dataset for retrieval and classification in digital pathology
The integration of algorithms for classification and retrieval in medical images through effective machine learning schemes is at the forefront of modern medicine. These tasks are crucial, among others, to detect and analyze abnormalities and malignancies to contribute to more informed diagnosis and decision makings. Digital pathology is one of the domains where such tasks can support more reliable decisions . For several decades, the archiving of microscopic information of specimens has been organized through employing and storing glass slides . Beyond the fragile nature of glass slides, hospitals and clinics need large and specially prepared storage rooms to store specimens, which naturally requires a lot of logistical infrastructures.
Digital pathology, or whole slide imaging (WSI), can not only provide high image quality that is not subject to decay (i.e., stains decay over time) but also offers a range of other benefits [2, 11]: They can be investigated by multiple experts at the same time, they can be more easily retrieved for research and quality control, and of course, WSI can be integrated into existing information systems of hospitals. In 1999, Wetzel and Gilbertson developed the first automated WSI system , utilizing high resolution to enable pathologists to buffer through immaculate details presented through digitized pathology slides. Ever since, pathology bounded by WSI systems is emerging into an era of digital specialty, providing solutions for centralizing diagnostic solutions by improving the quality of diagnosis, patient safety, and economic concerns . Like any other new technology, digital pathology has its pitfalls. The gigapixel nature of WSI scans makes it difficult to store, transfer, and process samples in real-time. One also need tremendous digital storage to archive them. In this paper, we propose a new and uniquely designed data set, Kimia Path24, for the classification and retrieval of digitized pathology images. In particular, the data set is comprised of 24 WSI scans of different tissue textures from which 1,325 test patches sized 10001000 are manually selected with special attention to textural differences. The proposed data set is structured to mimic retrieval tasks in clinical practice; hence, the users have the flexibility to create training patches, ranging from 27,000 to over 50,000 patches – these numbers depend on the selection of homogeneity and overlap for every given slide. For retrieval, a weighted accuracy measure is provided to enable a unified benchmark for future works.
This section covers a brief literature review on image analysis in digital pathology, specifically on WSI, followed by various content-based medical image retrieval techniques, and finally an overview of feature extraction techniques that emphasize local binary patterns (LBP).
In digital pathology, the large dimensionality of the image poses a challenge for computation and storage; hence, contextually understanding regions of interest of an image helps in quicker diagnosis and detection for implementing soft-computing techniques . Over the years, traditional image-processing tasks such as filtering, registration, and segmentation, classification and retrieval have gained more significance. Particularly for histopathology, the cell structures such as cell nuclei, glands, and lymphocytes are observed to hold prominent characteristics that serve as a hallmark for detecting cancerous cells . Researchers also anticipate that one can correlate histological patterns with protein and gene expression, perform exploratory histopathology image analysis, and perform computer aided diagnostics (CADx) to provide pathologists with the required support for decision making . The idea behind CADx to quantify spatial histopathology structures has been under investigation since the 1990s, as presented by Wiend et al. , Bartels et al. , and Hamilton et al. . However, due to limited computational resources and its associated expense, implementing such ideas have been overlooked or delayed. In recent years, however, WSI technology has been gradually setting laboratory standards as a process of digitizing pathology slides to advocate for more efficient diagnostic, educational and research purposes . This approach, unlike photo-microscopy which is to capture a portion of an image , offers a high-resolution overview of the entire specimen in the slide which enables the pathologist to take control over navigating through the slide and saving invaluable time [17, 36, 10, 12]. More recently, Bankhead et al.  provided an open-source bio-imaging software, called QuPath that supports WSI by providing tumor identification and biomarker evaluation tools which developers can use to implement new algorithms to further improve the outcome of analyzing complex tissue images.
Retrieving similar (visual) semantics of an image requires extracting salient features that are descriptive of the image content. At its entirety, there are two main points of view for processing the WSI scans . The first one is called sub-setting methods which considers a small section of the huge pathology image as an important part such that the processing of the small subset substantially reduces processing time. The majority of research in the literature prefers this method because of its advantage of speed and accuracy. However, it needs expert knowledge and intervention to extract the proper subset. On the other hand, tiling methods break the images into smaller and controllable patches and try to process them against each other . This naturally requires more care in design and is more expensive in execution. However, it certainly is an obvious approach toward full automation.
Traditionally, a large medical image database is packaged with textual annotations classified by specialists; however, this approach does not perform well against the ever demanding growth of digital pathology. In 2003, Zheng et al.
developed an on-line content-based image retrieval (CBIR) system wherein the client provides a query image and corresponding search parameters to the server side. The server then performs similarity searches based on feature types such as color histogram, image texture, Fourier coefficients, and wavelet coefficients, whilst using the vector dot-product as a distance metric for retrieval. The server then returns images that are similar to the query image along with the similarity scores and a feature descriptor. Mehta et al., on the other hand, proposed an offline CBIR system which utilizes sub-images rather than the entire histopathology slide. Using scale-invariant feature extraction (SIFT)  to search for similar structures by indexing each sub-image, the experimental results suggested, when compared to manual search, an 80% accuracy for the top-5 results retrieved from a database that holds 50 IHC stained pathology images, consisting of resolution levels. In 2012, Akakin and Gurcan  developed a multi-tiered CBIR system based on WSI, which is capable of classifying and retrieving scans using both multi-image query and images at a slide-level. The authors test the proposed system on WSI scans extracted from follicular lymphoma (FL) tissue slides containing subtypes and neuroblastoma (NB) tissue slides comprised of subtypes. Experimental results suggested a % and % average classification accuracy for FL and NB diseases, respectively. More recently, Zhang et al.  developed a scalable CBIR method to cope with WSI by using a supervised kernel hashing technique which compresses a 10,000-dimensional feature vector into only 10 binary bits, which is observed to preserve a concise representation of the image. These condensed binary codes are then used to index all existing images for quick retrieval for of new query images. The proposed framework is validated on a breast histopathology data set comprised of 3,121 WSI scans from 116 patients; experimental results state an accuracy of 88.1% for processing at the speed of 10ms for all 800 testing images.
To generate preliminary results for the introduced data set, we captured the textural structure of patches by extracting local binary patterns (LBP)  as they are among established approaches proven to quantify important textures in medical imaging [27, 31, 3]. We also experiment with the dictionary approach [18, 25]
and convolutional neural networks (CNN).
LBP is an extremely powerful and concise texture feature extractor, with an ability to compete with state-of-the-art complex learning algorithms. In 2009, Masood and Rajpoot  implemented a circular LBP (CLBP) feature extraction algorithm to classify colon tissue patterns using a Gaussian-kernel SVM on biopsy samples taken from 32 different patients. Each image has a spatial resolution of pixels, for which the retrieval accuracy is computed to be 90% to distinguish between benign and malignant patterns. In the same year, Sertel et al. 
presented a CADx system designed to classify Neuroblastoma (NB) malignancy, a type of cancer in the nervous system, using WSI. The authors proposed a multi-resolution LBP approach which initially analyzes image at the lowest resolution and then switches to higher resolutions when necessary. The proposed approach employs offline feature selection, which enables the extraction of more discriminative features for every resolution level during the training phase. For retrieval, a modified-nearest neighbor is employed which when tested on 43 WSI scans, provides an overall classification accuracy of 88.4%. More recently, Tashk et al. 
proposed a statistical approach based on color information such as maximum likelihood estimation. Then, the CLBP is employed to extract texture features from rotational and color changes, from which the SVM algorithm classifies the extracted feature vectors as mitosis and non-mitosis cases. The proposed scheme obtains 70.94% (F-measure) for Aperio XT images and 70.11% for Hamamatsu images, both of which are microscopic scanners. The reported method is observed to outperform other participants at ICPR 2012 Mitosis detection in breast cancer histopathological images.
We had 350 whole scan images (WSIs) from diverse body parts at our disposal. The images were captured by TissueScope LE 1.0111http://www.hurondigitalpathology.com/tissuescope-le-3/. The scans were performed in the bright field using a 0.75 NA lens. For each image, one can determine the resolution by checking the description tag in the header of the file. For instance, if the resolution is 0.5m, then the magnification is 20x, and if the resolution is 0.25m, then the magnification is 40x.
We manually selected 24 WSIs purely based on visual distinction for non-clinical experts which means, in our selection, we made conscious effort to select a subset of the WSIs such that they clearly represent different texture patterns. Fig. 1 shows the thumbnails of six samples. Fig. 2 displays a magnified portion of each WSI.
Our intention is to provide a fixed testing dataset to facilitate benchmarking but respect the design freedom of individual algorithm designer to generate his own training dataset. To achieve this, we performed the following steps:
We set a fixed size of testing patches to be pixels that correspond to mm mm.
We ignored background pixels (patches) by setting them to white. We performed this by analyzing both homogeneity and gradient change of each patch whereas a threshold was used to exclude background patches (which are widely homogenous and do not exhibit much gradient information).
We manually selected patches per WSI with . The visual patch selection aimed to extract a small number of patches that represent all dominant tissue textures in each WSI (in fact, every scan does contain multiple texture patterns).
Each selected patch was then removed from the scan and saved separately as a testing patch.
The remaining parts of the WSI can be used to construct a training dataset.
Fig. 3 demonstrate the patch selection for a sample WSI. The scans are available online and can be downloaded 222Downloading the dataset: http://kimia.uwaterloo.ca. The dimensions and number of testing patches for each scan are reported in Table 1.
|Scan Index||Dimensions||Number of Test Patches|
We have a total of patches that belong to 24 sets with ( reported in the last column of Table 1). Looking at the set of retrieved images for any experiment, the patch-to-scan accuracy can be given as
As well, we calculate the whole-scan accuracy as
Hence, the total accuracy can be defined to take into account both patch-to-scan and whole-scan accuracies:
The Matlab and Python code for accuracy calculations can also be downloaded.
To provide preliminary results to set a benchmark line for the proposed data set, we performed three series of retrieval and classification experiments: (i) Local Binary Pattern (LBP), (ii) Bag of Words (BOW), and (iii) Convolutional Neural Networks (CNN). The following subsections will elaborate on every series of experiments and report the overall accuracy of each method. Table 2 provides the results for all tested methods.
For the first experiment, LBP histograms are computed by setting several different parameters to identify the proper windows size. In particular, the LBP is designed using MATLAB 2016b according to . After computation of descriptors for test and training data for each configuration, we evaluate the discriminative power of each one by -NN search (with ) to find similar patches. Test images with actual sizes () are fed to the LBP operator. For the training set, as discussed in the 3, we have the option to create our training data from each scan depending on retrieval or classification method. The scans are tiled into patches of the same size as the test patches without any overlap. Then we remove patches with a homogeneity of more than 99%. Using this configuration, we extracted training images which are compared against each test patch for similarity measurement. Non-rotational versions of uniform LBP  of radii 1, 2 and 3 with 8,16 and 24 neighbors, respectively, are applied to create a histogram of length 59, 243 and 555. Varying radius helps LBP to capture the texture in different scales, which could be a significant research question in WSI processing . As shown in Table 2, a longer radius contributes to an increase in both accuracy (2%-3% at most) and descriptor length.
For the second experiment, a dictionary learning approach, i.e., Bag-of-Words (BOW), was designed by minimizing the error of the training samples to build the over-complete dictionary (i.e., the codebook) [18, 25]. The design of the BOW approach was conducted according to . The frequency of occurrence of the word histogram can be assigned to describe the input based on the trained dictionary. To train the pathology patch dictionary, two descriptors are used: the raw pixels and the LBP of the raw pixels in each neighborhood. Before extracting the descriptors, 300 patches are selected randomly from all available patches such that their gradient is larger than the average gradient value of all patches for each scan. To accelerate the dictionary training, all 7,200 patches are down-sampled to 500500 and meshed into 1616 grids without overlap. Raw pixel descriptors and LBP features are extracted from these sub-patches. The extracted descriptors are used for training the dictionary whose size is set to 800. The word-frequency histogram of each patch is then encoded using the learned dictionary. Finally, the word histogram with its corresponding scan labels is fed to SVM classification with histogram intersection kernel . From the obtained results, depicted in Table 2, we can see that using raw pixels or LBP features result in roughly the same accuracy. However, LBP was observed to be much quicker to train and computationally less expensive as compared to raw pixels.
For the last experiment, we used two deep convolution neural networks (CNN), architecturally and conceptually inspired by Alexnet  and VGG16 . The first network, CNN, is trained from scratch using end-to-end training with limited pre-processing. For each of the 24 scans, patches are extracted with 40% overlap, and 99% homogeneity threshold, further filtered with top 60% of gradient values and re-sized to 128
128 using bicubic interpolation. This results in a total of 40,513 patches for training. The CNN consists of 3 convolutional layers with 33 kernels, each with 2
2 max-pooling with 64, 128, and 256 filters, respectively. The output from the last convolution layer is fed into a fully-connected layer with 1,024 neurons and subsequently to 24 units with softmax activation for classification. Other than the last layer, all other layers in the network useReLu
as the activation function. The Adam optimizer is used with a learning rate of
and the categorical cross-entropy is used as the loss function. The network achieves the highest accuracy offor the proposed dataset.
In another experiment, a slightly different architecture, CNN was considered for classifying the images. A shallow structure of three blocks with 16, 32, and 64 filters was investigated. The high-level extracted features from the last convolutional layer are passed to one fully connected layer with 625 neurons, followed by a softmax classifier at the top. Our experiments showed that applying 35% dropout with norm regularization technique achieves around 40.24% accuracy.
The data set we are proposing may be regarded easy
because we are trying to match patches that come from the same scan/patient. However, as the results demonstrate, this is clearly not the case. The BoW approach was able to provide a much more compact representation (codebook). Besides, the storage requirements are quite low. However, the geometric and spatial relations between words are generally neglected. Apparently, the outliers in the training data make it fail to perform properly. CNN achieved the best result offollowed by LBP with an accuracy of . CNN, most likely, can still improve if a larger training set is extracted from the scans. And as for LBP, perhaps using some classifier may increase the accuracy. One should bear in mind that LBP did in fact process the images in their original dimensions whereas CNNs required substantial downsampling. Taking into account the training complexity, one may prefer LBP over CNNs for the former is intrinsically simple and fast. As well, LBP has been designed to deal with textures at the spatial level.
In this paper, we put forward Kimia Path24, a new data set for retrieval and classification of digital pathology scans. We selected 24 scans from a large pool of scans through visual inspection. The criterion was to select texturally different
images. Hence, the proposed data set is rather a computer vision data set (as in contrast to a pathological data set) because visual attention has been spent on the diversity of patterns and not on anatomies and malignancies. The task, hence, is whether machine-learning algorithms can discriminate among diverse patterns. To start a baseline, we applied LBP, the dictionary approach and CNNs to classify patches. The results show that the task is apparently quite difficult.
The data set can be downloaded from authors’ website: http://kimia.uwaterloo.ca
Proceedings of the 6th International Conference on Pattern Recognition Applications and Methods, pages 557–566, 2017.
LIBSVM: A library for support vector machines.ACM Transactions on Intelligent Systems and Technology, 2:1–27, 2011.
A comparison of event models for naive bayes text classification.In AAAI-98 workshop on learning for text categorization, volume 752, pages 41–48. Citeseer, 1998.