# Path: util/config.py
# def load_config(filename = "pose_cfg.yaml"):
#     if 'POSE_PARAM_PATH' in os.environ:
#         filename = os.environ['POSE_PARAM_PATH'] + '/' + filename
#     return cfg_from_file(filename)
# 
# Path: dataset/pose_dataset.py
# class Batch(Enum):
#     inputs = 0
#     part_score_targets = 1
#     part_score_weights = 2
#     locref_targets = 3
#     locref_mask = 4
#     pairwise_targets = 5
#     pairwise_mask = 6
#     data_item = 7
# 
# Path: dataset/factory.py
# def create(cfg):
#     dataset_type = cfg.dataset_type
#     if dataset_type == "mpii":
#         from dataset.mpii import MPII
#         data = MPII(cfg)
#     elif dataset_type == "coco":
#         from dataset.mscoco import MSCOCO
#         data = MSCOCO(cfg)
#     elif dataset_type == "penn_action":
#         from dataset.penn_action import PennAction
#         data = PennAction(cfg)
#     elif dataset_type == "default":
#         data = PoseDataset(cfg)
#     else:
#         raise Exception("Unsupported dataset_type: \"{}\"".format(dataset_type))
#     return data


import logging
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from scipy.misc import imresize
from util.config import load_config
from dataset.pose_dataset import Batch
from dataset.factory import create as dataset_create


matplotlib.use('TkAgg')


def display_dataset():
    logging.basicConfig(level=logging.DEBUG)


# Path: util/config.py
# def load_config(filename = "pose_cfg.yaml"):
#     if 'POSE_PARAM_PATH' in os.environ:
#         filename = os.environ['POSE_PARAM_PATH'] + '/' + filename
#     return cfg_from_file(filename)
# 
# Path: dataset/pose_dataset.py
# class Batch(Enum):
#     inputs = 0
#     part_score_targets = 1
#     part_score_weights = 2
#     locref_targets = 3
#     locref_mask = 4
#     pairwise_targets = 5
#     pairwise_mask = 6
#     data_item = 7
# 
# Path: dataset/factory.py
# def create(cfg):
#     dataset_type = cfg.dataset_type
#     if dataset_type == "mpii":
#         from dataset.mpii import MPII
#         data = MPII(cfg)
#     elif dataset_type == "coco":
#         from dataset.mscoco import MSCOCO
#         data = MSCOCO(cfg)
#     elif dataset_type == "penn_action":
#         from dataset.penn_action import PennAction
#         data = PennAction(cfg)
#     elif dataset_type == "default":
#         data = PoseDataset(cfg)
#     else:
#         raise Exception("Unsupported dataset_type: \"{}\"".format(dataset_type))
#     return data


# Path: vis_dataset.py
import logging
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from scipy.misc import imresize
from util.config import load_config
from dataset.pose_dataset import Batch
from dataset.factory import create as dataset_create



matplotlib.use('TkAgg')


def display_dataset():
    logging.basicConfig(level=logging.DEBUG)


    cfg = load_config()