HyperKvasir, a comprehensive multi-class image and video dataset for gastrointestinal endoscopy
Paper · 2020 · Hanna Borgli, Vajira Lasantha Thambawita, Pia H. Smedsrud et al.
Summary
An endoscopy can reveal a lesion, show whether the bowel is clean enough to inspect, or confirm that the examiner reached an important landmark. Teaching a computer to recognize these different findings requires images that show what clinicians actually see and annotations that explain what matters in each view. Such collections are difficult to assemble. Hospitals must be able to release the material, and specialists must spend time reviewing it. Many of the public collections the authors found were small, concentrated on polyps, or had become unavailable. HyperKvasir was designed to give researchers a larger and more varied basis for studying gastrointestinal endoscopy.
The authors collected material from routine examinations at Bærum Hospital in Norway. HyperKvasir contains 110,079 still images and 374 videos. The videos account for 889,372 frames, bringing the number of still images and video frames together to around 1 million. Of the still images, 10,662 have expert-reviewed labels covering 23 classes, and 99,417 are unlabeled. A set of 1,000 polyp images has additional annotations showing the outline and bounding rectangle of the polyp. The videos are organized by their main finding across 30 classes, with additional observations recorded for some clips. Together, the records cover normal anatomy, signs of disease, the quality of the view, and stages of treatment.
The paper tests how well several convolutional neural networks assign the expert-defined categories to labeled still images. Averaging predictions from ResNet-152 and DenseNet-161 gives the best micro-averaged F1 score, 0.910 across the reported splits. That metric pools decisions across images, giving frequent classes more influence. DenseNet-161 leads on macro-averaged F1, which gives each class equal weight, with 0.619. The confusion matrices show why those perspectives matter. Networks sometimes mix up grades of inflammation, confuse a polyp prepared for removal with the site left after removal, or disagree with the assigned label near the junction of the esophagus and stomach. Some of these boundaries are also difficult for clinicians to judge consistently.
HyperKvasir gives separate starting points for studying recognition in still images, outlining polyps, analyzing video, and learning from images that have yet to be labeled. The authors also apply their leading still-image classifiers to the unlabeled collection to get a preliminary picture of what it might contain. Those predictions have no expert reference labels against which to check them. The paper establishes a public dataset and a set of baseline measurements for still-image classification. Its evidence concerns agreement with labels on that task, leaving performance during clinical examinations open.
Deep dive: HyperKvasir, a comprehensive multi-class image and video dataset for gastrointestinal endoscopy
HyperKvasir collects gastrointestinal endoscopy images and videos, with expert annotations and baseline tests that show which findings are harder to classify. · about 33 minutes to read
The problem and its context
What an endoscopic image needs to show
The surface lining of the gastrointestinal tract, called the mucosa, can show changes ranging from slight irritation to signs of serious disease. Endoscopy gives clinicians a direct view of that surface. How much a clinician can conclude depends on where the camera is, what is visible, and how the finding is interpreted. A photograph of a familiar landmark can document the extent of an examination. A photograph in which stool obscures the lining conveys something different. The part of the bowel it depicts was difficult to inspect. An image of an abnormality may then raise a further question about its nature or severity.
The authors describe endoscopy as the standard examination for these tissues, while emphasizing the variation in what different operators detect or report. They cite an average polyp miss rate of 20% in the colon to illustrate the consequences. A polyp is a lesion whose shape can range from a projection to a flat or depressed area. Some types can develop into cancer. Recognizing suspicious lesions is therefore one of the reasons for examining the lining carefully, and recognizing whether the lining was visible is part of judging how thoroughly that examination could be performed.
The paper situates this problem within the broader burden of gastrointestinal cancer. It cites about 3.5 million new cases globally each year and 2.2 million deaths per year. Those figures motivate attention to examination quality and screening. The connection to the dataset runs through the kinds of visual evidence a computer might help interpret. A system could be studied for its ability to recognize a polyp, identify a landmark, or flag an inadequate view. Each of those tasks requires examples and a definition of what a correct answer looks like.
The authors discuss computer assistance in this setting as an application of artificial intelligence. They focus on systems that learn to recognize patterns from examples, a part of the field known as machine learning. For supervised learning, an example includes an answer supplied in advance. In this setting, the answer could be an expert’s category for the image or an outline drawn around tissue of interest. Collecting enough examples is one problem. Collecting the kinds of answers that fit the intended task is another. A list of images containing polyps can support recognition, while outlines are needed to study whether a system captures their shape.
What earlier collections made possible
The paper surveys a field in which researchers had already studied automatic polyp detection, grading of ulcerative colitis, endoscopic image retrieval, and assistance with reporting. It also describes collections created for more specific purposes. The CVC collections and the ASU-Mayo database concentrated on polyps. The earlier study on WM-DOVA polyp highlighting is one example of research associated with those collections. Other resources addressed bowel cleanliness or artifacts in endoscopic images. Some medical atlases offered examples mainly for teaching, a different purpose from assembling a consistently annotated collection for training classifiers.
A focused dataset can be appropriate for the question it was built to answer. A set with annotated polyps gives researchers a common target for studying lesion detection, for example. The difficulty for the broader tasks in this paper is that a routine examination contains many other kinds of observations. If a collection is almost entirely about polyp appearances, it gives a poor basis for comparing how a classifier handles a landmark, an area of inflammation, and a site where a lesion has already been removed. The authors also report that several resources in their survey had ceased to be available. Continued access matters when different groups want to repeat an experiment or compare results on the same records.
Kvasir was the immediate predecessor. It came from the same hospital documentation archive and began with 4,000 images assigned by experts to eight classes. It later grew to 8,000 images while keeping those classes. Its labels reached beyond polyps to include conditions such as esophagitis, landmarks such as the pylorus and cecum, and appearances associated with procedures. The paper describes how Kvasir was used to develop image-analysis methods and to organize shared tasks at MediaEval and ACM Multimedia. Those activities gave the authors experience with the practical problems of making data usable by groups outside the hospital that collected it.
The authors trace those problems through several parts of the process. Images must be located and retrieved from systems built to document care. Access and release are subject to permissions. Experienced clinicians have limited time to annotate files, and the tools available for doing so can be cumbersome. More images in a clinical archive therefore do not translate directly into more examples with reviewed labels. HyperKvasir extends the earlier collection while making a large body of unannotated material available in its own right.
Why keep images without expert labels?
The authors place the unlabeled collection in the context of semisupervised learning. In that setup, an algorithm learns from examples with supplied answers and also draws information from examples without them. Unsupervised approaches likewise use images without relying on an expert label for every picture. The authors discuss work that learns visual representations from unannotated images, including Momentum Contrast. Their interest is in whether the much larger collection of unannotated clinical images can contribute to learning when verified examples are scarce.
There is also a more direct use for such a collection. Researchers with access to clinicians could select images for review and create additional annotations suited to a particular task. That possibility matters because an image can support different questions. Someone interested in recognizing an anatomical landmark would ask for a different judgment from someone studying inflammation or looking for an exact lesion boundary. The dataset design preserves that choice. The established labels support common benchmarks, while the images without a label give users of the collection room to investigate other distinctions.
The method, step by step
From examination records to a public collection
The starting point was material recorded in the course of clinical work. The images and videos came from gastro- and colonoscopy examinations performed at Bærum Hospital from 2008 to 2016. Clinicians used standard Olympus and Pentax endoscopy equipment. The images were retrieved in 2016 from Picsara, a documentation system connected to the electronic medical record. The authors describe prospective collection during routine examinations and later retrieval from the archive. The hospital material was originally recorded for care, and the research labels were added to the selected records afterward.
The hospital’s internal information technology department exported the material from a central server. Before export, the associated metadata was removed and the files were given random names. The paper reports approval by the Norwegian Privacy Data Protection Authority and an exemption from patient consent because the data had been anonymized. It also reports an exemption from review by the regional medical research ethics committee on the grounds that collection did not interfere with care. Apart from the steps described for release, the authors report no preprocessing or artificial enlargement of the published image collection. The resizing used in the classification experiment was a separate operation performed for that experiment.
Some images and videos retain a small green inset produced by the Olympus ScopeGuide system. It gives the examiner a view of the scope’s position in the colon and appears in the lower left of the picture. Such an inset is part of the recorded image, whereas removed metadata is information that was associated with the file separately. The distinction matters for experiments. Even after anonymization, a file can retain visual details associated with the equipment or the way an examination was performed.
How HyperKvasir was assembled and checked
The steps in order.
In the finished collection, a label can describe the class of a still image, the region occupied by a polyp, or the main finding across a video. The workflow branches because those forms of annotation answer different questions. The authors make the collection available through the Open Science Framework and the HyperKvasir dataset site under CC BY 4.0. They report a collection size of circa 66.4GB, excluding segmentation masks and metadata. Much of that material remains available in the form in which it was recorded, with file resolutions and video frame rates documented separately.
Decide what a still image represents
Experienced gastroenterologists first chose categories based on their clinical relevance and the material available. They described the categories before the preliminary labeling began. Junior doctors or doctoral researchers working in the field then assigned images to those categories. The specialists reviewed the assignments and corrected them as needed. When the reviewers could not agree about an image, the authors removed it from the labeled selection and used another one from the archive. This meant that an included label had passed a review process, even for categories whose boundaries can be difficult to judge.
The labeled still images are stored as JPEG files. Their folders record the part of the digestive tract, the category of observation, and the particular class. The image-labels.csv file also associates image names with their labels. That layout gives an image class a clinical context. A cecum image and a pylorus image both document anatomical landmarks, for instance, while referring to different portions of the tract. A dyed resection margin belongs with interventions, even though its appearance is related to the polyp that was treated.
The paper distinguishes anatomical landmarks, quality of mucosal views, pathological findings, and therapeutic interventions. Landmarks aid orientation or help document the examination’s extent. View quality concerns how well the surface can be seen. Pathological findings describe changes associated with disease or other abnormalities. Therapeutic interventions show what an examiner has done to treat a finding, or what the site looks like at a particular stage of treatment. These categories explain why the prediction task is broader than deciding whether an image is normal or abnormal.
Recognize landmarks in the upper and lower tract
The upper examinations cover the esophagus, stomach, and duodenum. One landmark is the normal Z-line, where the lining of the esophagus changes to the type of lining found in the stomach. That transition is also close to where some of the upper-tract abnormalities in the dataset appear. Another label, retroflex stomach, describes a view made by turning the scope back to inspect the upper part of the stomach. The pylorus is the passage between the stomach and the beginning of the duodenum. These labels encompass both places and views produced by positioning the scope in a particular way.
The colon and rectum, along with the final portion of the small intestine, are covered by the lower examinations. The terminal ileum is the final portion of the small bowel. Its visible villi, small projections of the lining, are part of the appearance described in the paper. At the beginning of the colon, the cecum is identified by structures that include the opening of the appendix and the valve between the small and large bowel. Images showing this region can help document that the examination reached the far end of the colon. The retroflex rectum class records a backward-looking view used to inspect an area that can be difficult to see on the forward view.
These classes are included for what they reveal about the conduct of the procedure. In a medical image collection aimed solely at disease recognition, a normal view of the pylorus might be pooled with all other normal examples. Here its individual label makes it possible to study whether an automatic system recognizes the location. Likewise, recognizing a backward view of the rectum tests a different visual distinction from recognizing a lesion located there. The layout preserves that difference for a reader interpreting the classifier’s errors.
Make clinical grading usable as an image label
For reflux esophagitis, inflammation usually seen in the lower esophagus, the paper starts from the Los Angeles classification. That system grades breaks in the mucosal surface by features such as their length, whether they extend across folds, and how much of the circumference they involve. HyperKvasir uses an esophagitis A class and an esophagitis B-D class. The authors keep A separate because its subtle changes are particularly easy to confuse with a normal Z-line. Grouping the remaining grades gives the classifier a distinct target for more pronounced changes without asking it to distinguish every grade individually.
Barrett’s esophagus also concerns altered tissue near the lower end of the esophagus. The paper explains that confirmation relies on biopsy evidence of specialized intestinal metaplasia, a change in the tissue lining. For its still-image labels, the collection separates long-segment from short-segment appearances. The latter is defined by a longitudinal extent of less than 3 cm. The image label directs attention to the visual presentation and its extent. The clinical diagnosis involves information beyond the category assigned to the photograph.
In the colon, the authors use the Mayo Score as the basis for the ulcerative colitis labels. This inflammatory condition can produce visibly different changes in the lining. At score 0 the vascular pattern is normal. The mild changes described at score 1 include redness and reduced visibility of that pattern. At score 2 the paper describes more pronounced changes, including erosions and loss of the visible vascular pattern. Score 3 includes spontaneous bleeding and ulceration. These example features explain why some grades overlap in photographs and why other examples look more clearly separated.
The collection keeps categories for grades 1, 2, and 3 and includes intermediate labels for 0-1, 1-2, and 2-3. An intermediate designation records that the appearance falls between established grades. It gives reviewers a way to retain images that they regard as clinically informative but difficult to assign to a single grade. It also changes the classification problem. The network is asked to predict an intermediate category in its own right, at the same time as it learns to recognize the adjacent categories. That choice is important when reading an error that falls close to a grading boundary.
Record visibility and treatment alongside pathology
The quality of the view in the colon is represented partly through the Boston Bowel Preparation Scale, or BBPS. The scale describes how much of the lining can be seen after efforts to clear the view. At BBPS 0, solid stool obscures the surface. At BBPS 1, portions of the surface are visible, with staining, stool, or opaque liquid obscuring other areas. At BBPS 2 the surface can be seen well in spite of minor residue. At BBPS 3 the segment is clear of the residual material described in the lower scores. The authors group the lower scores into BBPS 0-1 and the higher scores into BBPS 2-3. This grouping follows the distinction between inadequate and adequate preparation. The clinical criterion for adequate preparation applies to all colon segments assessed after flushing, while the image label describes the recorded view.
The colon images also include impacted stool, which can be seen in pockets of the wall called diverticula. That class records a recognizable appearance separate from the grouped bowel preparation categories. A photograph of material lodged in a pocket makes a different contribution to the collection from a photograph meant to illustrate how much mucosa is visible across a segment. Keeping the classes distinct preserves that difference when counting disagreements or retrieving examples.
Polyps and hemorrhoids are among the pathological findings in the lower-tract collection. Some polyps protrude into the bowel, some lie relatively flat, and others have a depressed shape. Differences in shape matter when labeling, because a class can contain visually varied examples even when the reviewers agree on the category. Hemorrhoids are swollen veins around the anus or lower rectum. Their place in the taxonomy is as a pathological finding, even though an image classifier encounters them alongside appearances that document procedure quality or location.
The intervention classes show how a familiar lesion can look different before and after treatment. In the dyed lifted polyp class, a solution containing indigo carmine has been injected beneath a polyp to raise it before removal. In the dyed resection margins class, the tissue left at the site after snare removal also appears blue. Blue tissue helps a reader recognize the procedure in either case. Choosing between the categories requires recognizing the stage of that procedure. The presence of a conspicuous visual feature can therefore help identify a family of related images while doing little to identify the correct member of that family.
Outline the polyp within the image
An image-level class communicates that a polyp is the finding of interest. Segmentation adds a description of which pixels belong to the polyp. The authors provide this more detailed annotation for 1,000 polyp images. A junior doctor and a doctoral researcher drew preliminary outlines in Labelbox. A gastroenterologist then inspected the work and corrected the outlines where needed. The methods for class labeling and for mask labeling both use preliminary annotation followed by expert review, with the latter requiring a decision about the region inside the lesion boundary.
For each segmented case, the release contains the image, a mask, and coordinates for its bounding box. In the mask, the foreground is white and denotes the polyp region, while the background is black. The box encloses the outermost marked pixels. An outline preserves the shape of a lesion. A box gives its rectangular extent and may include surrounding tissue. The file pairing makes the two forms of spatial annotation usable together. Images and masks share file names in separate folders, and the boxes are stored in a JSON file.
The authors report that some polyp images inherited from Kvasir were duplicates. For the segmented set, those duplicates were replaced with other colon polyp images judged to be of high quality, and the replacements were segmented. This detail matters for understanding the relationship between the image-level collection and the dedicated set with masks. The segmented images are presented as polyp examples with finer annotation. The published total of 110,079 still images describes the labeled and unlabeled parts of the image collection. The mask set provides a form of supervision within the polyp material and should be understood in that context.
Describe the main finding of each video
An experienced gastroenterologist reviewed the videos on a video annotation platform supplied by Augere Medical. The specialist assigned a main finding to the clip after examining its content. The main finding organizes the file under its upper or lower location and under its clinical category. Extra observations and more detailed descriptions can be recorded in the accompanying CSV. The video files use AVI format, and identifiers in the labeling records correspond to file names.
A video can contain changes of view or a sequence of actions that a still image cannot show. A clip might show a polyp before treatment, the lifted appearance after injection, and the site after removal. The clip has a main finding, with later stages available as additional descriptions where recorded. The label thus refers to the clip as a unit. A frame taken near the beginning might show the lesion clearly, whereas a frame from the same clip after removal might show only the treatment site. This distinction matters if video frames are used as images in another experiment.
The upper-tract clips extend the types of findings available for study. They include ulcers, examples of dilated vessels that may bleed, cancer, and a rare complication in which a gastric band has perforated the stomach wall. Some clips describe the view itself. Opaque fluid or bubbles can obscure the lining, while an optimal view shows the surface clearly. The authors also record treatments. The independent ERCP category documents an endoscopic procedure used to treat abnormalities of the bile ducts. Other procedures appear among secondary findings when the pathology remains the clip’s main subject.
The lower-tract video classes overlap with the still-image categories, with some differences in how findings are grouped. Colitis serves as a broader video label covering ulcerative, ischemic, and infectious forms, while the still-image record carries the detailed ulcerative colitis grades. Some landmarks that have still-image classes appear as secondary findings in videos. The video set also includes examples of colorectal cancer, parasites, narrowing of the bowel, and postsurgical joins called anastomoses. Interventions show techniques such as removing polyps with a snare, placing clips to control bleeding, and opening narrow areas with stents. These differences in coverage explain why a classifier built for the still-image labels would have a different target from a system intended to analyze the videos.
Retain the unannotated material and prepare a benchmark
The 99,417 unlabeled still images are released alongside the categories reviewed by the clinicians. The authors also provide global image features and candidate outputs from unsupervised clustering in Attribute-Relation File Format. A global feature summarizes properties of an entire image. Clustering groups images by similarity in the representation used. These files give researchers material for exploring how the collection is organized before an expert has verified what any group contains.
The authors publish scripts for generating figures, assigning data to folds, and preparing annotation files, along with the files and code used for the preliminary experiments. A fold is a defined portion of the data used when separating examples for fitting and evaluating a classifier. The release includes three official splits intended for cross-validation. The published still-image results average over the two splits reported in the benchmark. This separates the splits supplied for continued research from the split count behind the paper’s headline scores.
For the baseline study, the authors resized images to 224 × 224 and adjusted convolutional networks to predict the 23 classes. A convolutional network learns patterns from spatial neighborhoods of an image, combining them into representations used for classification. ImageNet supplied the initial weights for the individual networks. These weights are the values learned from a prior image-recognition task. The methods differ in how the authors trained these starting networks on the endoscopy data and in how the final prediction was formed.
ResNet-50 was implemented in TensorFlow. The authors report an initial training stage of 7 epochs, followed by 3 epochs of fine-tuning. An epoch is a pass through the training data. In that second stage, updates were restricted to layers after the 100th index. The images were processed in batches of 32, and updates were made with Adam at a learning rate of 0.001. A batch is the group of examples used to make a training update, and the learning rate controls the scale of the changes made by the optimizer. The key distinction in this configuration is the additional stage with restricted updates.
The individual ResNet-152 and DenseNet-161 classifiers were implemented in PyTorch. Each was trained for 50 epochs with batches of 32. The authors used stochastic gradient descent, abbreviated SGD, at a learning rate of 0.001. This method adjusts the network’s weights using an estimate of how the training error changes on a batch. The paper describes these configurations without a separate fine-tuning stage of the kind used for ResNet-50. Their resulting weights also provided the starting point for the combined approaches.
The simplest combination used the average of the ResNet-152 and DenseNet-161 outputs as its prediction. The authors initialized each branch from its strongest individual weights and then trained the branches together. The averaged loss supplied a training signal that was propagated through both networks. Loss is the quantity the training procedure seeks to reduce. Back-propagation computes how the weights contribute to changes in that quantity, so it can guide updates in each branch. This training ran for 50 epochs with batches of 32, using SGD at a learning rate of 0.001.
The other combination used a multilayer perceptron, or MLP, to learn how to combine the two outputs. An MLP is a network of successive layers that transforms its inputs before producing an output. Here its role is to take the predictions from the image networks and produce the combined decision. The authors again started the image networks from their best individual weights and trained all the networks together. They report 50 epochs, batches of 32, SGD, and a learning rate of 0.001. These two configurations let the technical validation compare a fixed average with a combination learned during training.
Experiments and results
What the classification scores measure
The supervised experiment evaluates predictions on the labeled still-image task. For each evaluated image, the classifier is asked to supply a class from the published label set. That class is compared with the reviewed label associated with the image. A prediction of dyed lifted polyp on a dyed resection margin image counts as a disagreement, even though both classes refer to stages of the same intervention. The benchmark therefore tests whether the classifiers reproduce the distinctions encoded in the dataset.
The authors report precision, recall, and F1. Consider one of the polyp-related categories. Precision asks how often a prediction of that category is correct among images assigned to it by the classifier. Recall asks how many of the images labeled with the category the classifier recovers. A classifier can have high precision by applying the label sparingly and still have low recall if it misses many eligible images. F1 combines the two measures with a harmonic mean, which falls when either precision or recall is low.
The paper gives two ways of aggregating those quantities. Micro-averaging pools the decisions across classes before calculating the score. Common classes consequently have substantial influence, since they contribute many image decisions. Macro-averaging computes scores by class and then gives each class equal influence in the final average. As a result, errors in a small intermediate colitis class have more effect on the macro perspective than they do when counted among all image decisions. The two scores describe different properties of the same set of predictions.
The paper also reports the multiclass Matthews correlation coefficient, or MCC, denoted Rₖ. Here, Rₖ names the multiclass extension of the coefficient, with k referring to the number of classes. MCC summarizes agreement using the distribution of assignments and reference labels across the confusion matrix. That matrix records which label was predicted for examples belonging to each expert-labeled category. The paper identifies Rₖ by name and reports its values without giving an explicit equation. In the results, MCC provides an additional comparison alongside the pooled and class-averaged scores.
The reference baselines are random guessing and prediction of the majority class. The majority class is the most common label in the data used to choose that rule. Predicting it throughout can recognize images of that class while doing poorly when categories are weighted equally. This is a meaningful reference for a dataset with uneven class sizes. Random guessing provides a different reference point. The reported values are averages across the two experimental splits, and the paper gives the results as decimal scores.
Pooled performance and performance across classes
The best reported micro F1 is 0.910 for the average of ResNet-152 and DenseNet-161. The combination with a learned MLP follows at 0.909. DenseNet-161 alone reaches 0.907, and ResNet-152 alone reaches 0.906. Their micro precision and recall match their respective micro F1 scores as displayed in the paper. In this single-label task, each mistaken classification both adds a wrong prediction and misses the label the example should have received. When decisions are pooled, those two sides of the same error give precision and recall the same value.
HyperKvasir labeled still images, micro-averaged F1 across the reported splits
Averaging the two image networks gives the highest pooled score, with the learned combination close behind.
The numbers
| System or setting | F1 |
|---|---|
| Random guessing | 0.044 |
| Majority class | 0.108 |
| Pre-trained ResNet-152 | 0.906 |
| Pre-trained DenseNet-161 | 0.907 |
| ResNet-152 + DenseNet-161 + MLP | 0.909 |
| Averaged ResNet-152 + DenseNet-161 (this paper) | 0.910 |
Random guessing reaches 0.044 micro F1 and the majority rule reaches 0.108. The network results show that the benchmark rewards information extracted from the pictures beyond what those simple rules can capture. They also cluster closely together on the pooled measure. The ranking therefore says something more specific than whether the learned approaches recognize endoscopic images. It says which configuration the paper observed making the strongest overall set of image-level decisions under this aggregation.
The order changes when equal weight is assigned to every class. DenseNet-161 has the highest macro F1 at 0.619. The fixed average gives 0.617. ResNet-152 is at 0.606, and the learned combination gives 0.605. The majority-class rule gives 0.008 and random guessing gives 0.034. The majority rule’s stronger micro score and weaker macro score illustrate the effect of choosing a single common label. Pooled agreement credits its successful predictions in that category. A class-balanced average also registers its failure to recover the others.
HyperKvasir labeled still images, macro-averaged F1 across the reported splits
DenseNet-161 leads when each class has equal weight, ahead of both ways of combining the networks.
The numbers
| System or setting | F1 |
|---|---|
| Majority class | 0.008 |
| Random guessing | 0.034 |
| ResNet-152 + DenseNet-161 + MLP | 0.605 |
| Pre-trained ResNet-152 | 0.606 |
| Averaged ResNet-152 + DenseNet-161 | 0.617 |
| Pre-trained DenseNet-161 (this paper) | 0.619 |
The macro precision and recall scores make the change in ranking easier to interpret. DenseNet-161 gives macro precision of 0.640 and macro recall of 0.616. The corresponding scores for the fixed average are 0.633 and 0.615. ResNet-152 gives 0.639 and 0.605, while the MLP combination gives 0.612 and 0.606. ResNet-152 and DenseNet-161 have similar macro precision as reported, but the latter has higher macro recall. The fixed average comes close to DenseNet-161 in macro recall, with lower macro precision. Those values characterize the tradeoffs in the observed comparisons without identifying a single set of difficult classes that accounts for them.
The best reported MCC is 0.902, shared by the averaging and MLP combinations at the displayed precision. DenseNet-161 gives 0.899, and ResNet-152 gives 0.898. Random guessing has an MCC of 0.000, while the majority-class entry is marked unavailable. ResNet-50 is described as one of the tested approaches, but the reported table lists its method name without associated scores. The numerical comparison can therefore specify the results for the other configurations without supplying a ResNet-50 value or placing it in a ranking.
Where predictions disagree with the labels
The authors show confusion matrices for DenseNet-161 and for the fixed average. These are the leading configurations on the macro and micro measures, respectively. The matrices include predictions from both splits. Their shading reflects the percentage within each image class. This lets the reader inspect how often images from a given labeled category move into other categories without having the result dominated visually by the classes with the most examples.
One difficulty is separating grades of ulcerative colitis. An image judged to be between two grades may be assigned to one of the adjacent grades instead, and the paper reports broader confusion around severity distinctions. The label scheme treats an intermediate category as a distinct answer. In the matrix, predictions that cross those boundaries therefore become visible even when they preserve a broad recognition that the image shows inflammation.
Another group of errors concerns the junction near the lower end of the esophagus. A normal Z-line, esophagitis, and Barrett’s esophagus can be confused. The authors relate this pattern to variation among human observers, particularly where changes are subtle. The matrices support the more limited observation that these categories are hard to separate under the benchmark. They show which answers the networks gave and which labels the reviewers assigned. Explaining any individual disagreement would require inspecting the image and the clinical basis for its label.
The dyed polyp and resection-margin categories offer another kind of close comparison. The paper reports confusion between them, consistent with the fact that blue dye appears before and after removal. The distinction concerns what remains in view at a stage of treatment. This illustrates what the aggregate scores leave implicit. Images in different classes can share tissue, color, location, and procedural context. The errors make it possible to identify where the task depends on a narrower visual distinction.
What the unannotated collection might contain
After evaluating the two leading approaches, the authors used them to classify the 99,417 still images that lack reviewed labels. They ran the pretrained DenseNet-161 and the averaged ResNet-152 and DenseNet-161 with the two split configurations named split_0 and split_1. This analysis transferred the taxonomy of the labeled collection to the unlabeled one. For every image, the aim was to produce a tentative category assignment and inspect how those assignments were distributed.
A large number of the predictions went to normal pylorus. Fewer went to hemorrhoids and ulcerative colitis grade 1-2. These statements describe the frequencies of predicted categories. The authors interpret them alongside class-level performance on the labeled data. They regard predictions for classes the networks already identify well as more plausible and are especially cautious about classes with weak recognition and few assignments. They make the predicted classes available with the HyperKvasir code and auxiliary data, where researchers can use them as a starting point for more detailed review.
A frequent predicted class can reflect what is common in the collection, the kinds of mistakes a classifier tends to make, or a combination of the two. The unlabeled images provide no reference against which to separate those possibilities. The analysis therefore gives a provisional view of the collection through classifiers trained on the existing classes. Its outcome is a set of candidate labels and a distribution of predictions. The classification experiment on reviewed still images supplies the accuracy evidence in the paper.
What the ablations show
The paper reports no formal ablation study. It compares baseline configurations, changes the way it aggregates scores, inspects confusion matrices, and examines what the leading classifiers predict on unlabeled images. These analyses show where results depend on the choice of classifier and metric, and where difficult label boundaries recur. They do not isolate every possible cause of the observed errors.
Combining networks changes the ranking
The comparison between the individual networks and their combinations shows that a combination can improve pooled performance without yielding the strongest performance across classes. The fixed average leads the micro comparison, whereas DenseNet-161 alone leads the macro comparison. The learned combination achieves similar pooled results to the average but has weaker macro F1 in the paper’s tests. Its matching MCC at the displayed precision is another reason to interpret the choice of method through the metric that fits the research question.
The fixed average and the MLP configuration are the closest comparison of alternative design choices. They use the same pair of image architectures, initialize from the individual runs, and share the reported optimizer, batch size, and training duration. They differ in how the outputs are combined and in the presence of trainable layers for that combination. Under those configurations, learning the combination does not improve the reported scores over the fixed average, and the fixed average leads on macro F1 as well as micro F1. The experiment gives an observed comparison between those training recipes. It provides limited evidence about what would happen with a different training schedule or a different learned combination.
The comparisons with the individual networks change more than the way predictions are combined. The combined classifiers start from the best weights of the individual runs and then undergo joint training. As a result, the results cannot isolate the contribution of simply averaging two independently fitted outputs. The measured scores describe the procedures that were run, including both the initialization and the additional joint training. That distinction matters if someone tries to reproduce the result by averaging outputs without repeating the training procedure.
Looking within classes changes the reading of a score
The contrast between the micro and macro rankings is the clearest evidence that the assessment is sensitive to which examples receive influence. When pooled decisions are counted, the fixed average does best. When categories each receive equal weight, DenseNet-161 does best. This finding follows from evaluating the same broad task with different aggregation rules. It does not require changing the dataset or introducing a different clinical target.
The matrices then identify which distinctions are worth examining more closely. For instance, confusion between inflammation grades concerns the degree of an abnormality. Confusion between a lifted polyp and a resection margin concerns the stage of a procedure. Confusion near the Z-line involves neighboring appearances in the same anatomical region and a boundary for which observer variation is already known. These kinds of error have different implications for how an annotation is written or an evaluation is interpreted, even though they each register as a missed class in the table.
The authors made several annotation choices specifically because of hard boundaries. The separation of esophagitis A from esophagitis B-D and the use of intermediate colitis categories give the classification task a clinical rationale. The paper does not rerun the benchmark with those groups merged or subdivided. The matrices can reveal where neighboring labels are confused under the chosen scheme. The effect of a different scheme on classification performance remains unmeasured.
The predictions on unlabeled images offer a view of how the selected classifiers behave outside the reviewed set. They expose which labels the classifiers use frequently and which they use rarely. That can help identify images or categories for manual inspection. Because the same experiment lacks verified labels, agreement between configurations would still leave open whether those configurations were relying on similar visual cues or making similar mistakes. This is a diagnostic of prediction behavior and a starting point for further annotation.
Limitations
Limits the authors identify
The authors emphasize observer variation. Experienced clinicians can disagree, particularly when grading low-grade esophagitis or inflammation in ulcerative colitis. Expert review gives the dataset an explicit standard for included images, and the authors address some ambiguous boundaries through grouped or intermediate labels. Still, the reference is a clinical judgment applied to the recorded view. The paper’s discussion of borderline categories recognizes that a simple assignment can be difficult even with specialist input.
Uneven class sizes are another stated difficulty. Some findings occur more frequently than others in medical practice, so the amount of training material varies by category. This affects how much evidence a classifier sees for infrequent examples and how much a pooled score reflects their performance. The authors report macro scores and class-level confusion matrices in addition to pooled results. Those analyses make it possible to see a problem that aggregate performance alone could conceal, while leaving the underlying shortage of labeled examples in some classes.
The authors describe the classification study as a baseline. Its function is to establish reference results for researchers using the labeled still images. They also caution against drawing strong conclusions from the predicted composition of the unlabeled collection, especially when the classifiers performed poorly on a category in the reviewed data. Their call for improvements to the creation of reference labels reflects this distinction between adding more candidate labels to a collection and increasing the amount of verified evidence.
Limits that follow from the study design
The endoscopy material comes from one hospital and from the named equipment manufacturers. That gives the collection a defined clinical source. It also means the reported comparison is evidence from that source. The paper gives no independent test at another hospital and no separate result for equipment outside the collection. Clinicians and images in other settings could present a different mix of findings or different visual characteristics. HyperKvasir can support a study of whether a classifier transfers to those settings, but the benchmark itself does not measure that transfer.
Images that reviewers could not agree on were replaced in the labeled subset. This creates a reference set in which examples have passed a consensus check, while routine practice also contains views that are hard to interpret. The reported results therefore characterize performance on the selected labeled images. They provide limited evidence about what a system would do when the recorded view is ambiguous enough to prevent agreement in the first place. The difficulty is particularly relevant for labels whose clinical definition already acknowledges a continuum of appearances.
Class frequencies are also difficult to interpret as frequencies of disease. The images were recorded for clinical documentation, then selected or labeled as part of building a dataset. A count of images records appearances, and the same kind of appearance can be recorded repeatedly. Video frames are related to one another within their clips. Those properties make the number of files or frames a measure of available material, instead of a count of independent patients, procedures, or lesions. A reader should interpret the reported class distributions according to their units.
The paper describes its split resources and the aggregation used for the baseline. It does not establish in the baseline description how recordings from the same patient or procedure were kept apart across the reported partitions. The result can be read as performance on the specified split-based image benchmark. A stronger inference about entirely independent examinations would require that aspect of the split construction to be established. The absence of that detail alone gives no basis for assuming either that images crossed partitions or that the partitions prevented it.
The forms of supervision also set different boundaries on what can be evaluated. The polyp masks and boxes provide spatial annotations for that lesion class. Other still-image categories are described through image-level labels. For video, the main finding applies to the clip and can coexist with additional findings. A frame-level recognition or localization study would need to account for when the finding is actually visible. Assigning the principal video label to every frame could give some frames an answer at odds with their visible content, even when the label accurately describes the clip overall.
Finally, the preliminary results concern classifying stored images. The experiment records agreement with the assigned labels. It supplies no measurement of how a system changes an endoscopist’s decisions, how well it finds lesions during a complete procedure, or whether it reduces missed findings. The paper discusses feeding recorded video into a system to simulate a live examination as a possible use. A simulation can address questions about sequential input and changes of view. Performance in an examination with a clinician and a patient remains a separate question.
What came after
There is no documented follow-up study to describe here. The paper itself sets out ways the collection could be extended, centered on reviewing the unlabeled images, improving how disputed appearances are annotated, and studying how classifiers behave when endoscopic views change over time. These are proposed uses of the release. The reported experiments provide a starting point for them.
One direction is to turn candidate categories on the unlabeled images into reviewed annotations. The released predictions can help locate examples of classes that a researcher wants to inspect, and reviewing the errors can reveal where a classifier mistakes one appearance for another. Because the existing networks already struggle with some distinctions, an annotation effort based on their predictions would need expert judgment to check what was selected. The paper treats the new labels as something future researchers could create from the material.
Another direction concerns the definitions used for severity. The paper identifies clinical disagreement as part of the difficulty of establishing a reference. Future work could study how consistently experts apply a grading scheme and how different ways of representing intermediate appearances affect what the evaluation measures. The current release supports that question by preserving specific intermediate categories and by making some of the corresponding confusions visible in the baseline.
The authors also propose using recorded videos to simulate streams from an endoscope. The starting point there is the clip, with its main and secondary findings, instead of the isolated photograph used in the supervised benchmark. Such a study could examine how a system behaves as the scope moves, the view changes, or treatment alters the appearance of a lesion. The still-image results establish a comparison for recognizing labeled views, and the video records make it possible to ask how that recognition carries over when a view is part of a sequence.
Cite
Cite as Hanna Borgli, Vajira Lasantha Thambawita, Pia H. Smedsrud, Steven Alexander Hicks, Debesh Jha, Sigrun Losada Eskeland, Kristin Ranheim Randel, Konstantin Pogorelov, Mathias Lux, Duc‐Tien Dang‐Nguyen, Dag Johansen, Carsten Griwodz, Håkon Kvale Stensland, Enrique Garcia-Ceja, Peter Thelin Schmidt, Hugo L. Hammer, Michael Alexander Riegler, Pål Halvorsen and Thomas de Lange. 2020. HyperKvasir, a comprehensive multi-class image and video dataset for gastrointestinal endoscopy. Scientific Data.
@inproceedings{borgli2020hyperkvasir,
title = {{HyperKvasir, a comprehensive multi-class image and video dataset for gastrointestinal endoscopy}},
author = {Hanna Borgli, Vajira Lasantha Thambawita, Pia H. Smedsrud, Steven Alexander Hicks, Debesh Jha, Sigrun Losada Eskeland, Kristin Ranheim Randel, Konstantin Pogorelov, Mathias Lux, Duc‐Tien Dang‐Nguyen, Dag Johansen, Carsten Griwodz, Håkon Kvale Stensland, Enrique Garcia-Ceja, Peter Thelin Schmidt, Hugo L. Hammer, Michael Alexander Riegler, Pål Halvorsen and Thomas {de Lange}},
booktitle = {Scientific Data},
year = {2020},
doi = {10.1038/s41597-020-00622-y},
url = {https://doi.org/10.1038/s41597-020-00622-y}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/borgli-2020-hyperkvasir-comprehensive-multi-class-image/