title: Split image dataset into train-test datasets
body: <p>So I have a main folder which contains sub-folders which in turn contains images for the dataset as follows.</p>
  
  <p>-main_db</p>
  
  <p>---CLASS_1</p>
  
  <p>-----img_1</p>
  
  <p>-----img_2</p>
  
  <p>-----img_3</p>
  
  <p>-----img_4</p>
  
  <p>---CLASS_2</p>
  
  <p>-----img_1</p>
  
  <p>-----img_2</p>
  
  <p>-----img_3</p>
  
  <p>-----img_4</p>
  
  <p>---CLASS_3</p>
  
  <p>-----img_1</p>
  
  <p>-----img_2</p>
  
  <p>-----img_3</p>
  
  <p>-----img_4</p>
  
  <p>I need to split this dataset into 2 parts i.e Train data(70%) and Test data(30%). Below is the hierarchy I want to achieve</p>
  
  <p>-main_db</p>
  
  <p>---training_data</p>
  
  <p>-----CLASS_1</p>
  
  <p>-------img_1</p>
  
  <p>-------img_2</p>
  
  <p>-------img_3</p>
  
  <p>-------img_4</p>
  
  <p>---CLASS_2</p>
  
  <p>-------img_1</p>
  
  <p>-------img_2</p>
  
  <p>-------img_3</p>
  
  <p>-------img_4</p>
  
  <p>---testing_data</p>
  
  <p>-----CLASS_1</p>
  
  <p>-------img_5</p>
  
  <p>-------img_6</p>
  
  <p>-------img_7</p>
  
  <p>-------img_8</p>
  
  <p>---CLASS_2</p>
  
  <p>-------img_5</p>
  
  <p>-------img_6</p>
  
  <p>-------img_7</p>
  
  <p>-------img_8</p>
  
  <p>Any help appreciated. Thanks</p>
  
  <p>I have tried this module. But this is not working for me. This module is not being imported at all.</p>
  
  <p><a href="https://github.com/jfilter/split-folders" rel="noreferrer">https://github.com/jfilter/split-folders</a></p>
  
  <p>This is exactly what I want.</p>