region:us
---
dataset_info:
  features:
  - name: image
    dtype: image
  - name: label
    dtype:
      class_label:
        names:
          '0': benign
          '1': malignant
  splits:
  - name: train
    num_bytes: 146274097.953
    num_examples: 2637
  download_size: 136183890
  dataset_size: 146274097.953
---
# Skin Cancer Dataset

This dataset contains skin cancer images labeled as benign (class 0) or malignant (class 1). It can be used for various tasks related to skin cancer classification, such as image recognition, machine learning, and deep learning models.

## Class Labels

The dataset consists of two class labels:

- Class 0: Benign
- Class 1: Malignant

## Number of Rows

The dataset contains 2,637 rows, each corresponding to a unique skin cancer image.

## Usage

To load this dataset using the Hugging Face library, you can utilize the `load_dataset` function as follows:

```python
from datasets import load_dataset

dataset = load_dataset("Falah/skin-cancer", split="train")
```

This code will load the dataset with the training split and return an object that allows you to access the dataset's features, labels, and other relevant information.

Example code to access the dataset and obtain the class names:

```python
# Load the dataset
dataset = load_dataset("Falah/skin-cancer", split="train")

# Access the class names
class_names = dataset.features["class_label"]["names"]

# Print the class names with their respective codes
for code, name in class_names.items():
    print(f"'{code}': {name}")
```

The above code will print the class names along with their corresponding codes, as specified in the dataset.

Please note that you need to have the Hugging Face library installed in order to use the `load_dataset` function.

## License

The dataset is provided under an unspecified license. Please refer to the dataset source or contact the dataset owner, Falah, for more information about the licensing details.


## Citation

If you use this dataset in your work or research, please consider citing it as:

```
@misc{Falah/skin-cancer,
  title={Skin Cancer Dataset},
  author={Falah},
  year={2023},
  publisher={Hugging Face},
  howpublished={\url{https://huggingface.co/datasets/Falah/skin-cancer}}
}
```

