# Image Restoration: Data Description

*English translation by SOTA – AI Community of the Russian original. Licensed MIT, like the original. Organisers who would like this translation removed can email sota.ai.community@gmail.com.*

*Contest 1 (25 June 2025) of the Kazakhstan IOAI Team Selection Test (Отборочные на IOAI), 2025. This is the Data tab ("Dataset Description") of the Kaggle competition "Upsolving TST Day 1". Original: [kaggle.com/competitions/up-solving-tst-day-1/data](https://www.kaggle.com/competitions/up-solving-tst-day-1/data). The Data tab lists 6,734 files (520.56 MB, PNG and CSV) in the folders `train/` and `test/` and the file `sample_submission.csv`.*

### 📂 Data

The dataset consists of two folders: `train/` and `test/`.

#### 📁 `train/`

Contains pairs of images:

* `filtered/` — images **after an unknown filter has been applied**,
* `original/` — the corresponding **original images** before the filter was applied.

Both folders contain images with the same names:

```
train/
├── filtered/
│   ├── img_001.png
│   ├── img_002.png
│   └── ...
├── original/
│   ├── img_001.png
│   ├── img_002.png
│   └── ...
```

This means that `train/filtered/img_001.png` corresponds to `train/original/img_001.png`.

#### 📁 `test/`

Contains only filtered images. Your task is to restore their original appearance.

```
test/
├── img_01.png
├── img_02.png
├── ...
```

---

### 🧪 Your task

* Using the training set `train/`, learn to **reconstruct the original image** from its noisy (filtered) version.
* On the test set `test/`, you must **reconstruct the images** given only the filtered inputs.

### 📤 Submission format

The file `submission.csv` must contain the **reconstructed images**, represented as flat vectors.

Each **column is one pixel (one value from the range \[0, 255])**, and each row is one image.

#### 📄 `sample_submission.csv`

| id       | 0   | 1   | 2   | ... | 49151 |
| -------- | --- | --- | --- | --- | ----- |
| img\_01 | 34  | 12  | 189 | ... | 255   |
| img\_02 | 44  | 0   | 98  | ... | 127   |
| ...      | ... | ... | ... | ... | ...   |

* **`id`** is the name of the image from the `test/` folder, without `.png`.
* **Columns `0` → `49151`** are the values of the reconstructed image, **in `.flatten()` order**, where:

  * the order is: first the **height axis (rows)**, then the **width axis (cols)**, then the **BGR channels**,
  * the resulting order is: `.reshape((128, 128, 3)).flatten()`.
