Skip to content

Instantly share code, notes, and snippets.

@afaqueumer
Last active January 8, 2023 12:12
Show Gist options
  • Save afaqueumer/48a1c71576185843725962c5fd20f8ef to your computer and use it in GitHub Desktop.
Save afaqueumer/48a1c71576185843725962c5fd20f8ef to your computer and use it in GitHub Desktop.
Files downloader for TFOD
# urls
download_urls = {
'protobuff': "https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protoc-3.19.4-win64.zip",
'tensorflow_models': "https://github.com/tensorflow/models/archive/refs/heads/master.zip",
'pretrained_model': "http://download.tensorflow.org/models/object_detection/tf2/20200711/ssd_mobilenet_v2_320x320_coco17_tpu-8.tar.gz"
}
# Download files
wget.download(download_urls["protobuff"], paths['protoc_path'])
wget.download(download_urls["tensorflow_models"], paths['api_path'])
wget.download(download_urls["pretrained_model"], paths['pretrained_model_path'])
# Extract Files
!cd {paths['protoc_path']} && tar -xf protoc-3.19.4-win64.zip
!cd {paths['api_path']} && tar -xf models-master.zip --strip-components 1
!cd {paths['pretrained_model_path']} && tar -zxvf {pretrained_model + '.tar.gz'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment