This code uses singular value decomposition (SVD) as a way to compute the principal components. It is using the lanscape_dataset, you can download it from kaggle (an account is required but do not fear, it is quick and free + you might be tempted to participate in really interesting competions!).
1.Install CV2
to treat images
pip install opencv-python
- Install
glob
if you don't have it already
pip install glob
3.Download images from kaggle and put them in a folder "dataset_landscape", it must share the same root as the code.