pyiqa.utils.download_util ========================= .. py:module:: pyiqa.utils.download_util Module Contents --------------- .. py:data:: DEFAULT_CACHE_DIR .. py:function:: download_file_from_google_drive(file_id, save_path) Download files from google drive. Ref: https://stackoverflow.com/questions/25010369/wget-curl-large-file-from-google-drive # noqa E501 :param file_id: File id. :type file_id: str :param save_path: Save path. :type save_path: str .. py:function:: get_confirm_token(response) .. py:function:: save_response_content(response, destination, file_size=None, chunk_size=32768) .. py:function:: load_file_from_url(url, model_dir=None, progress=True, file_name=None) Load file form http url, will download models if necessary. Ref:https://github.com/1adrianb/face-alignment/blob/master/face_alignment/utils.py :param url: URL to be downloaded. :type url: str :param model_dir: The path to save the downloaded model. Should be a full path. If None, use pytorch hub_dir. Default: None. :type model_dir: str :param progress: Whether to show the download progress. Default: True. :type progress: bool :param file_name: The downloaded file name. If None, use the file name in the url. Default: None. :type file_name: str :returns: The path to the downloaded file. :rtype: str