divide imageset to trainingset and testingset