"""
Data loading script for pascal voc2007
=====================================
Load VOC dataset to pytorch torch.utils.data.Dataset class for further
training and processing.
*Author*: Yu Zhang, Northwestern Polytechnical University
"""

import os
import shutil
import pandas as pd
import torch
import numpy as np
from bs4 import BeautifulSoup
from torch.utils.data import Dataset, DataLoader
from skimage import io, transform
import random
import torchvision.transforms as transforms


def select_validation(val_size):
    """Select val_size images as validation set from VOC2007 val.txt file"""

    root_dir = '/home/zhangyu/data/VOC2007/'