# Counting cells in microscopy images (2023) — Data

来源：https://www.kaggle.com/competitions/counting-cells-in-microscopy-images-2023/data

本地 Meta Kaggle 快照；不是本次实时页面。

# Dataset Description

The training data consists of 2000 microscopy images of cells, stored in a numpy array X, and corresponding segmentation masks stored in a numpy array y. Each image (and each corresponding mask) has shape (128, 128). The segmentation mask y[i] for image X[i] contains "soft labels" (that is, numbers between 0 and 1) which tell you which pixels in the image X[i] belong to a cell nucleus.

The test data consists of 2000 more images of cells. No masks are provided for the test images. Your goal is to count how many cells appear in each test image.

The training data and test images are stored in numpy's .npz file format. You can load the training data using the following Python commands:

`import numpy as np`

`npzfile = np.load('train_data.npz')`

`X = npzfile['X']`

`y = npzfile['y']`

Then, you can display an image with superimposed labels using the following Python commands:

`import matplotlib.pyplot as plt`

`i = 0 # change this value to view different images`

`plt.imshow(X[i]/255 + .5*y[i], cmap='gray')`

## Files

*   **test_images.npz** - Contains the test images, described above
*   **train_data.npz** - Contains the training data, described above
*   **sample_submission.csv** - a sample submission file in the correct format

## Columns
Your submission file should be in .csv format with the following two columns:

*   `index` - An integer between 0 and 1999. Index i corresponds to the test image X[i].
*   `count` - Your predicted cell counts for each test image.