How are pictures pre processed before being used as ML data So I was watching this YouTube video
So basically the professor used ML to generate random faces in order to create data for a Kaggle challenge.
When I looked into the data file, I was expecting to see *.jpg or png files, but all I found was CSV files and based on his video, his model generated some png files.
what happened? how did he turn jpg into CSV? can we not use jpg?
First images are turned into pixel values. If it is a color image we have RGB combination of values. It it is black and white then the pixel values for each image in the dataset are unsigned integers in the range between black and white, or 0 and 255. This is the first transformation into numbers.
After that we apply an embedding to it to convert it into an array of numbers. We then use this embedding for further processing.
Images cannot directly be used because AI/ML algorithm deals with numbers only.
You may want to take a simpler image base like the MNIST which is a simple 0-9 representation on a 28*28 pixel image and then play around with recognition algorithms for a better understanding.