Skip to content

Preprocessing data for ML analysis and other test scrips

Notifications You must be signed in to change notification settings

alex1075/Preprocessing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Preprocessing

Code snippets from the PhD of Alexander Hunt. New, all intergrated version available at machine-code repository.

How to prepare the data for ML analysis

1. Process the data

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.

2. Split the data into training and test sets

3. Normalize the data

python -c "from code.convert import *; iterateBlur()"
python -c "from code.convert import *; detectBlurr()"
python -c "from code.convert import *; chopUpDataset()"

About

Preprocessing data for ML analysis and other test scrips

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published