import requests


def image_metrics(ID, filename):
    """
     GET image metrics from server
     Args:
         ID (str): user name
     Returns:
         r7.json() (dict): Dictionary containing the image metrics
                        example: outdict = {
                                "timestamp": ...,
                                "size": [100, 100],
                                "latency": 1,
                                "process": 'Reverse Video'}
     """
    mjson = {
        "username": ID,
        "filename": filename
    }
    r8 = requests.get("http://vcm-9030.vm.duke.edu:5000/api/image_metrics",
                      json=mjson)
    return r8.json()