Skip to content

Instantly share code, notes, and snippets.

@KostaMalsev
Last active January 12, 2021 10:33
Show Gist options
  • Save KostaMalsev/e09242573e93e206d18a9e696eb1ced0 to your computer and use it in GitHub Desktop.
Save KostaMalsev/e09242573e93e206d18a9e696eb1ced0 to your computer and use it in GitHub Desktop.
#Downloading data Training set made by Roboflow
%cd /content
#Download Training set from git by cloning rep:
import os
import pathlib
# Clone the training set repository if it doesn't already exist
if "RetrainModelExample" in pathlib.Path.cwd().parts:
while "RetrainModelExample" in pathlib.Path.cwd().parts:
os.chdir('..')
elif not pathlib.Path('RetrainModelExample').exists():
!git clone --depth 1 https://github.com/KostaMalsev/RetrainModelExample
%cd /content/RetrainModelExample/TrainingSet/Picka
!unzip Pickachu.v1.tfrecord.zip -d /content/
#NOTE: Update these TFRecord names to your files containing training set!
#Also, Update relevant rows:in training config file "ssd_mobilenet_v2_320x320_coco17_tpu-8.config"
#label_map_path,input_path
test_record_fname = '/content/valid/pickachu-toy.tfrecord'
train_record_fname = '/content/train/pickachu-toy.tfrecord'
label_map_pbtxt_fname = '/content/train/pickachu-toy_label_map.pbtxt'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment