# DL_2025-Project2-Advanced — Data

来源：https://www.kaggle.com/competitions/dl-2025-project-2-advanced/data

采集时间：2026-10-19T11:14:07Z

Use the following dataset https://www.kaggle.com/datasets/lakshaymiddha/crack-segmentation-dataset only the train directory is supposed to be used during the training.

## Files

*   **test/images** - the test set
*   **sample_submission.csv** - a sample submission file in the correct format


## Columns

*   `file` - filename
*   `crack` - empty if no crack; RLE notation if crack detected

```
#https://www.kaggle.com/paulorzp/rle-functions-run-lenght-encode-decode
def mask2rle(img):
    '''
    img: numpy array, 1 -> mask, 0 -> background
    Returns run length as string formated
    '''
    pixels= img.T.flatten()
    pixels = np.concatenate([[0], pixels, [0]])
    runs = np.where(pixels[1:] != pixels[:-1])[0] + 1
    runs[1::2] -= runs[::2]
    return ' '.join(str(x) for x in runs)
```
