0

How can I use pre-downloaded .weight and .cfg files instead of downloading them again every time I run an object detection code, using cvlib?

Javokhir169
  • 53
  • 1
  • 1
  • 5

1 Answers1

0

The pretrained weights and config files will be downloaded only once when you run the script for the first time. Next time it won't download again if the files already exist in the path.

if not os.path.exists(config_file_abs_path):
    download_file(url=cfg_url, file_name=config_file_name, dest_dir=dest_dir)

if not os.path.exists(weights_file_abs_path):
    download_file(url=weights_url, file_name=weights_file_name, dest_dir=dest_dir)    

Checkout the complete implementation here.