Code snippets from the PhD of Alexander Hunt. New, all intergrated version available at machine-code repository.
To breakdown the videos into idividual frames, we use the following command from the root folder:
python -c "from code.convert import convertVideoToImages; convertVideoToImages('Data/Videos/', 'Data/Image_temp/')"
Then resize the frames to a fixed size.
python -c "from code.convert import resizeAllJpg; resizeAllJpg('Data/Image_temp/', (1080, 1920))"
Then random crop the images.
python -c "from code.convert import radomCrop; randomCrop('Data/Image_temp/', 'Data/Images/', (256,256))"
Now label the images cropped.
python -c "from code.convert import *; iterateBlur()"
python -c "from code.convert import *; detectBlurr()"
python -c "from code.convert import *; chopUpDataset()"