File size: 2,493 Bytes
6159e7d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
license: cc-by-4.0
task_categories:
  - image-segmentation
language:
  - en
tags:
  - medical
  - polyp
  - colonoscopy
  - segmentation
  - kvasir
  - augmented
pretty_name: Kvasir-SEG Augmented
size_categories:
  - 1K<n<10K
---

# Kvasir-SEG Augmented

A preprocessed and augmented version of the [Kvasir-SEG](https://huggingface.co/datasets/Angelou0516/kvasir-seg) polyp
segmentation dataset, used to train the models in the
[UNet-A benchmark](https://huggingface.co/andreribeiro87).

## Dataset Description

Kvasir-SEG is a publicly available dataset of **1,000 colonoscopy images** annotated with binary polyp masks,
introduced by Jha et al. (2020). This version adds offline data augmentation to the training split and provides
fixed validation and test partitions for reproducible benchmarking.

### Splits & Sizes

| Split      | Images | Notes |
|------------|-------:|-------|
| `train`    |  5,368 | Original 894 images × 1 + 5 augmented versions each (256 × 256) |
| `validation`|   53  | Original validation images (50 % of original val), 256 × 256 |
| `test`     |    53  | Fixed test partition (50 % of original val), 256 × 256 |

### Augmentation Strategy (training split only)

Each original training image produces one resized copy (256 × 256) plus **five augmented variants**:

- Random horizontal flip (p = 0.5)
- Random vertical flip (p = 0.5)
- Random rotation ±30° (p = 0.5)
- Random brightness / contrast / saturation jitter ±20 % (p = 0.5)

Augmentation was performed with a fixed seed (42) for full reproducibility.

### Features

```python
{
    "image": Image(RGB),   # colonoscopy frame
    "mask":  Image(L),     # binary polyp mask (0 = background, 255 = polyp)
}
```

## Usage

```python
from datasets import load_dataset

ds = load_dataset("andreribeiro87/kvasir-seg-augmented")

sample = ds["train"][0]
image = sample["image"]   # PIL.Image RGB
mask  = sample["mask"]    # PIL.Image L (grayscale)
```

## Source

- **Original dataset**: Jha, D. et al. "Kvasir-SEG: A Segmented Polyp Dataset." *MMM 2020*.
  [[paper]](https://arxiv.org/abs/1911.07069) · [[original HF]](https://huggingface.co/datasets/Angelou0516/kvasir-seg)
- **This version**: created as part of the UNet architecture benchmark — see
  [andreribeiro87/unet3plus-efficientnet-kvasir-seg](https://huggingface.co/andreribeiro87/unet3plus-efficientnet-kvasir-seg)
  for the best-performing model.

## License

The underlying Kvasir-SEG images are distributed under **CC BY 4.0**.