Our dataset generator is going to capture few sample faces of one person from the live video frame

and assign a ID to it and it will save those samples in a folder which we are going to create now and we will name it dataSet

So create a folder named dataSet in the same location where you have saved your .py scriptWe are going to follow this naming convention for the sample images to make sure they dont mixed up with other person’s image samples



User.[ID].[SampleNumber].jpgfor example if the user id is 2 and its 10th sample from the sample list then the file name will be



User.2.10.jpg

Why this format?? well we can easily get which user’s face it is from its file name while loading the image for the training the recognizer

OK, now lets get the user id from the shell as input, and initialize a counter variable to store the sample number