Skip to content

Commit

Permalink
doing more training and labelling
Browse files Browse the repository at this point in the history
  • Loading branch information
VinceJnz committed Feb 3, 2023
1 parent 3f8ebc6 commit 73f88e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions ML4DR_20210910_01.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions Training_Customised_Image_Detection_Model-ML4DR_v1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@
"metadata": {},
"outputs": [],
"source": [
"# Use this to load an partially trained model ????????\n",
"# Use this to load an partially fine tuned model ????????\n",
"import tensorflow as tf\n",
"from object_detection.utils import config_util\n",
"from object_detection.protos import pipeline_pb2\n",
Expand All @@ -800,7 +800,7 @@
"# Update based on new labels\n",
"pipeline_config.model.ssd.num_classes = len(labels)\n",
"pipeline_config.train_config.batch_size = 4\n",
"#pipeline_config.train_config.fine_tune_checkpoint = os.path.join(paths['PRETRAINED_MODEL_PATH'], PRETRAINED_MODEL_NAME, 'checkpoint', 'ckpt-0')\n",
"#pipeline_config.train_config.fine_tune_checkpoint = os.path.join(paths['CHECKPOINT_PATH'], 'checkpoint1', 'ckpt-3')\n",
"pipeline_config.train_config.fine_tune_checkpoint = os.path.join(paths['CHECKPOINT_PATH'], 'checkpoint2', 'ckpt-3')\n",
"pipeline_config.train_config.fine_tune_checkpoint_type = \"detection\"\n",
"pipeline_config.train_input_reader.label_map_path= files['LABELMAP']\n",
Expand All @@ -822,6 +822,7 @@
},
"outputs": [],
"source": [
"#Use this for pretraind model from pretrained model folder (downloaded from model zoo)\n",
"import tensorflow as tf\n",
"from object_detection.utils import config_util\n",
"from object_detection.protos import pipeline_pb2\n",
Expand Down Expand Up @@ -1028,7 +1029,7 @@
" category_index,\n",
" use_normalized_coordinates=True,\n",
" max_boxes_to_draw=5,\n",
" min_score_thresh=.65, #(0.5)\n",
" min_score_thresh=.5, #(0.5)\n",
" agnostic_mode=False)\n",
"\n",
"plt.imshow(cv2.cvtColor(image_np_with_detections, cv2.COLOR_BGR2RGB))\n",
Expand Down

0 comments on commit 73f88e0

Please sign in to comment.