Skip to content

Instantly share code, notes, and snippets.

@Zakaria-pro
Last active February 6, 2021 20:19
Show Gist options
  • Save Zakaria-pro/b00b670bd53f4299d386058c182ef9b9 to your computer and use it in GitHub Desktop.
Save Zakaria-pro/b00b670bd53f4299d386058c182ef9b9 to your computer and use it in GitHub Desktop.
Data_Acquisition
path = '/kaggle/input/insulation-joint-training-set-prorail/trainset_insulation_joint/labels.csv'
df = pd.read_csv(path, sep=';')
print(df)
# This part is just to join the filepath of images with the name of images
# If you dont add it you will find in filepath colum in the df, only the name of the images
ROOT_DATA = '/kaggle/input/insulation-joint-training-set-prorail/trainset_insulation_joint/'
df['filepath'] = df.ID.apply(lambda x: os.path.join(ROOT_DATA, 'images/', f"{x}.jpg"))
print(df)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment