#tensorflow #objectdetection #computervision
If you like the video, please subscribe to the channel by using the below link
tinyurl.com/1w5i9nnu
Link for my deeplearning udemy course coupon code added
www.udemy.com/course/linear-r...
Hi Everyone, In this tensorflow tutorial, I have explained how to train tensorflow object detection api with your own data. I have used tensorflow latest version here. For
model training, I am using google colab free GPU. It means it’s a full-on tutorial on how to train object detection api with your own data or custom object detection model on google colab.
I have taken the example of playing card detection in this video and the model is taken from tensorflow model zoo.
----Time links to each step in the video----
Chapters:
0:00 Introduction
3:24 Install TensorFlow object detection api using powershell,Set up Object Detection directory and python virtual environment at once
6:30 Gather and label pictures
13:51 Generate training and testing dataset
16:39 Create train tfrecord and test tfrecord files
20:23 Create label map and configure training
28:55 Setup google colab for object detection model training
33:20 Start model training on colab
33:56 Export inference graph
36:57 Try out your object detector for images.
39:46 Try out your object detector on a live webcam.
1. Github ripo link - github.com/jakkcoder/widows-o...
this contains:
a. PowerShell script to install and set up tensorflow object detection api.
b. generate_labelmap.py :- to create labelmap file for object detection.
c. generate_tfrecord.py :- to create tfrecord file for training and testing data.
d. object_detection_tutorial.ipynb:- run the inference file for live cam object detection.
e. xml_to_csv.py :- Generate the csv file for training and testing images
2. Download labelImg tool for this link :- tzutalin.github.io/labelImg/
3. run this command for generating csv file for training and testing images
python xml_to_csv.py
4. run this command for generting labelmap.pbtxt file
python generate_labelmap.py
5. Generate tfrecord file for training by this command
python generate_tfrecord.py --csv_input=images/train_labels.csv --image_dir=images/train --output_path=train.record
6. Generate tfrecord file for training by this command
python generate_tfrecord.py --csv_input=images/test_labels.csv --image_dir=images/test --output_path=test.record
7. Here are the argument to be updated on the config file for model training
num_classes: 5 [give number of classes here]
learning_rate_base: 0.8e-3
warmup_learning_rate: 0.0001
fine_tune_checkpoint: "efficientdet_d0_coco17_tpu-32/checkpoint/ckpt-0"
fine_tune_checkpoint_type: "detection"
label_map_path: "images/labelmap.pbtxt"
input_path: "train.record"
label_map_path: "images/labelmap.pbtxt"
input_path: "test.record"
8. train model command
python model_main_tf2.py --pipeline_config_path=training/ssd_efficientdet_d0_512x512_coco17_tpu-8.config --model_dir=training --alsologtostderr
9. export infrence graph command
python exporter_main_v2.py --trained_checkpoint_dir=training --pipeline_config_path=training/ssd_efficientdet_d0_512x512_coco17_tpu-8.config --output_directory inference_graph
11 июл 2024