class_docstr: python -m pytorch_toolbelt.datasets.providers.inria_aerial inria_dataset
code: def get_train_val_split_train_df(self) -> pd.DataFrame:
      # For validation, we remove the first five images of every location
      # (e.g., austin{1-5}.tif, chicago{1-5}.tif) from the training set.
      # That is suggested validation strategy by competition host
      valid_locations = []
      for loc in self.TRAIN_LOCATIONS:
          for i in range(1, 6):
              valid_locations.append(f"{loc}{i}")
  
      df = pd.DataFrame.from_dict(
          {"images": self.train_images, "masks": self.train_masks}
      )
      df["location_with_index"] = df["images"].apply(
          lambda x: fs.id_from_fname(x)
      )
      df["location"] = df["location_with_index"].apply(
          lambda x: x.rstrip("0123456789")
      )
      df["split"] = df["location_with_index"].apply(
          lambda l: "valid" if l in valid_locations else "train"
      )
      df["rows"] = 5000
      df["cols"] = 5000
      return df
  
imports: import os
  import subprocess
  import warnings
  from pathlib import Path
  from typing import Union, Optional, Tuple
  import hashlib
  import numpy
  import pandas
  import torch
  import zipfile
  from sklearn.model_selection import GroupKFold
  from pytorch_toolbelt.utils import fs
label_desc: Use image node_id 8 for calling the InriaAerialImageDataset obj's underlying member method code with example usage: obj.get_train_val_split_train_df() and returns: df