# Path: dlearn/utils/serialize.py
# def load_data(fpath):
#     with open(fpath, 'rb') as f:
#         data = cPickle.load(f)
#     return data
# 
# Path: dlearn/utils/imgproc.py
# def translate(image, translation):
# def resize(image, shape, keep_ratio=False):
# def subtract_luminance(rgbimg, mean_luminance=None):
# def scale_per_channel(img, scale_range):
# def binarize(img, threshold):
# def images2mat(images):


import os
import sys
import argparse
import numpy as np
import theano
from scipy.io import loadmat, savemat
from dlearn.utils.serialize import load_data
from dlearn.utils import imgproc

homepath = os.path.join('..', '..')

if not homepath in sys.path:
    sys.path.insert(0, homepath)



# Program arguments parser

# Path: dlearn/utils/serialize.py
# def load_data(fpath):
#     with open(fpath, 'rb') as f:
#         data = cPickle.load(f)
#     return data
# 
# Path: dlearn/utils/imgproc.py
# def translate(image, translation):
# def resize(image, shape, keep_ratio=False):
# def subtract_luminance(rgbimg, mean_luminance=None):
# def scale_per_channel(img, scale_range):
# def binarize(img, threshold):
# def images2mat(images):


# Path: examples/human_sar/produce_seg.py
import os
import sys
import argparse
import numpy as np
import theano
from scipy.io import loadmat, savemat
from dlearn.utils.serialize import load_data
from dlearn.utils import imgproc


homepath = os.path.join('..', '..')

if not homepath in sys.path:
    sys.path.insert(0, homepath)



# Program arguments parser

desctxt = """