Load SceneParse150 dataset
Start by loading a smaller subset of the SceneParse150 dataset from the 🤗 Datasets library. This'll give you a chance to experiment and make sure everything works before spending more time training on the full dataset.

from datasets import load_dataset
ds = load_dataset("scene_parse_150", split="train[:50]")

Split the dataset's train split into a train and test set with the [~datasets.Dataset.train_test_split] method: