The Kvasir-Instrument Dataset

A gastrointestinal instrument Dataset.
Also available as an OSF repository with
file browsing and as an OSF preprint.

 590 (jpg)

Gastrointestinal (GI) tract pathologies are screened, biopsied, and resected (if needed) periodically using surgical tools. However, these biopsied and/or resected areas are not tracked due to which the video analysis for assessing disease burden or the amount of pathology resection remains unknown. To tackle such issues, we have released the novel “Kvasir-Instrument: Diagnostic and therapeutic tool segmentation dataset in gastrointestinal endoscopy” dataset, which consists of 590 annotated frames comprising of GI procedure tools such as snares, balloons, biopsy forceps, etc. By adding segmentation masks and bounding boxes information to this dataset, we enable computer vision and GI endoscopy researchers to contribute to the field of automated tool segmentation.


@misc{jha2020instrument, title={Kvasir-Instrument: Diagnostic and therapeutic tool segmentation dataset in gastrointestinal endoscopy}, author={Jha, Debesh and Ali, Sharib and Emanuelsen, Krister and Hicks, Steven A and Thambawita, Vajira and Garcia-Ceja, Enrique and Riegler, Michael A. and de Lange, Thomas and Schmidt, Peter T. and Johansen, H{\aa}vard D and Johansen, Dag and Halvorsen, P{\aa}l }, url={}, DOI={10.31219/}, publisher={OSF Preprints}, year={2020}}


Gastrointestinal (GI) procedures also include both minimally invasive surveillance and treatment, including surgical procedures. A varied number of tools are used as per the requirement of these procedures. For example, balloon dilatation helps to open the GI surface, biopsy forceps for tissue sample collection, polyp removal with snares, and submucosal injections. Therefore, It is vital in GI tract endoscopy to track and guide surgeons during tumor resection or biopsy collection from a defined site and help to correlate the biopsied samples and treatment locations post-surgery or procedure. Computer vision techniques hold tremendous potential to improve clinical performance in GI endoscopy. However, it requires more annotated datasets to design the CADx system to develop AI solutions that could improve the patient outcome. In this regard, we present a novel dataset to tackle the issue related to GI endoscopy.

Dataset Details

The Kvasir-Instrument dataset (size 170 MB) contains 590 endoscopic tool images and their ground truth mask. The resolution of the image in the dataset varies from 720x576 to 1280x1024. The image file is encoded using jpeg compression. To the best of our knowledge, this is the first attempt to provide the GI tract organ tools dataset. The open-access dataset can be easily downloaded for research and educational purposes. To facilitate the training and testing on the same dataset, we also provide a train-test split so that researchers can build the methods and improve the results using the same dataset. The bounding box information (box coordinates (x, y, width, height)) for the corresponding images are stored in a JSON file. The dataset is designed to push the state-of-the-art solution for the automatic tool segmentation in gastrointestinal endoscopy.

Applications of the Dataset

The Kvasir-Instrument is intended to be used for researching and developing new algorithms for image segmentation, detection, and localization tasks. We have provided a separate file for training and validation which will assist in the development of approaches across the same dataset.

Annotation Protocol

We took a three-step strategy during annotation. First, the selected dataset samples were labeled by two experienced research assistants. These annotations were sent to the expert gastroenterologist for the verification. Finally, the suggested changes were incorporated, and the images were validated for those samples.

Suggested Metrics for Segmentation

We suggest calculating the dice similarity coefficient (DSC) and Jaccard index or Intersection over Union (IoU) for the segmentation task. The other standard metrics for medical image segmentation are precision, recall, and overall accuracy. We also suggest calculating these metrics.

Suggested Metrics for Detection and Localization

For the detection and localization task, we suggest calculating the average precision at different IoU thresholds. Usually, AP at IoU threshold of 50 is taken for evaluation of this dataset. We also recommend calculating overall IoU.

Terms of use

The use of the Kvasir-instrument dataset is restricted to research and education purposes. The use of the dataset is forbidden for commercial use without prior written permission. For other purposes, contact us (see below). In all documents and publications that use the Kvasir-SEG dataset or report experimental results based on the Kvasir-Instrument dataset, a reference to the dataset paper has to be included (see above). Please email if you have any questions regarding how to cite the dataset.

Ethics approval

In this study, we used fully anonymized data approved by Privacy Data Protection Authority. It was exempted from approval from the Regional Committee for Medical and Health Research Ethics - South East Norway. Furthermore, we confirm that all experiments were performed in accordance with the relevant guidelines and regulations of the Regional Committee for Medical and Health Research Ethics - South East Norway, and the GDPR.


Email debesh (_at_) simula (_dot_) no if you have any questions about the dataset and our research activities. We always welcome collaboration and joint research!