How to reset images in the regression_interactive.ipynb notebook lab.

The Face XY Project has you collect pictures of your nose, the left eye and the right eye. If some of the pictures were incorrectly taken, how can we reset the pictures and restart again?

Thank you.


You can add a checking dialog before the process.
If the image goes wrong, apply nothing and recapture it again.

def live(state_widget, model, camera, prediction_widget):
    global dataset
    while state_widget.value == 'live':
        image = camera.value
        // Add some handler here
        if valid:
            preprocessed = preprocess(image)