So I was following the Faster RCNN notebook, but then until the step download base model.
The codes is as follows (I uses the same code in the tutorial notebook)
#downloading the base model
%cd /kaggle/working/models/research
import os
import shutil
import glob
import urllib.request
import tarfile
MODEL_FILE = MODEL + ‘.tar.gz’
DOWNLOAD_BASE = ‘http://download.tensorflow.org/models/object_detection/’
DEST_DIR = ‘/kaggle/working/research/pretrained_model’
if not (os.path.exists(MODEL_FILE)):
urllib.request.urlretrieve(DOWNLOAD_BASE + MODEL_FILE, MODEL_FILE)
tar = tarfile.open(MODEL_FILE)
tar.extractall()
tar.close()
os.remove(MODEL_FILE)
if (os.path.exists(DEST_DIR)):
shutil.rmtree(DEST_DIR)
os.rename(MODEL, DEST_DIR)
It output the line as this:
I search through the downloaded files in research directory, there is no pretrained_model files too. Why is this happens? For your information, I was using kaggle to do it.