So you likely will run into this at some point. You are reading data from somewhere and it is relative path based; but that doesn’t necessarily always help load data in especially if you are storing data and your code in separate paths (which is common) or if you are sharing data with a team; or even if your data is just somewhere totally different.
Anyways; this article will help convert a .csv label file with actual named labels to a label file with full path with a numerical label that can be more easily one hot encoded during the reading process. Note for deep learning often this is a two step process. Step 1: Convert from relative pathing to specific pathing & numerical labels. Step 2: Convert to framework specific storage format for input reading pipeline (which varies framework to framework). Here we cover Step 1. We will be using the CIFAR 10 data set which can be downloaded from here: https://www.kaggle.com/c/cifar-10/data