Shortcuts

mmpose.apis.webcam.utils.get_cached_file_path

mmpose.apis.webcam.utils.get_cached_file_path(url: str, save_dir: Optional[str] = None, progress: bool = True, check_hash: bool = False, file_name: Optional[str] = None)str[源代码]

Loads the Torch serialized object at the given URL.

If downloaded file is a zip file, it will be automatically decompressed

If the object is already present in model_dir, it’s deserialized and returned. The default value of model_dir is <hub_dir>/checkpoints where hub_dir is the directory returned by get_dir().

参数
  • url (str) – URL of the object to download

  • save_dir (str, optional) – directory in which to save the object

  • progress (bool) – whether or not to display a progress bar to stderr. Default: True

  • check_hash (bool) – If True, the filename part of the URL should follow the naming convention filename-<sha256>.ext where <sha256> is the first eight or more digits of the SHA256 hash of the contents of the file. The hash is used to ensure unique names and to verify the contents of the file. Default: False

  • file_name (str, optional) – name for the downloaded file. Filename from url will be used if not set. Default: None.

返回

The path to the cached file.

返回类型

str

Read the Docs v: latest
Versions
latest
1.x
v1.0.0rc0
v0.29.0
v0.28.0
v0.27.0
dev-1.x
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.