Intro to AI Platform

Слайд 2

Contents SSD(Single Shot Detector) ? SSD Implementation TensorFlow Hub & TF

Contents

SSD(Single Shot Detector) ?
SSD Implementation
TensorFlow Hub & TF Object Detection API

?
Object Detection Inference Tutorial (1), (2)
Слайд 3

SSD SSD (Single Shot Detector) : needs only one single shot

SSD

SSD (Single Shot Detector)
: needs only one single shot to detect

multiple objects within the image (not uses region proposal)
: composes of 2 parts ? extract feature maps + apply convolution filters for detection
: backbone model + SSD head
: backbone model usually is a pre-trained image classification network as a feature extractor
(e.g., VGG, ResNet, MobileNet, etc.)
Слайд 4

SSD : use multiscale feature maps (38x38, 19x19, 10x10, 5x5, 3x3,

SSD

: use multiscale feature maps
(38x38, 19x19, 10x10, 5x5, 3x3, 1x1)
: feature

maps at the beginning ? small objects
: feature maps at the end ? large objects
? Objects of different sizes can be detected through different feature maps

5x5 feature map

3x3 feature map

Слайд 5

SSD Implementation Feature map size : 19x19x1024 ? 1x1 conv ?

SSD Implementation

Feature map size : 19x19x1024
? 1x1 conv ? 19x19x256
? 3x3

conv with stride 2 ? 10x10x512

Class SSD

Слайд 6

SSD Implementation Feature maps Apply 3x3 conv w/ stride 1, padding

SSD Implementation

Feature maps

Apply 3x3 conv w/ stride 1, padding 1
? Concat

? prediction

Final Output

Слайд 7

TensorFlow Hub : In the last lab lecture, we use pre-trained

TensorFlow Hub

: In the last lab lecture, we use pre-trained ResNet50

which is provided by tf.keras.applications
: let’s try to use TensorFlow Hub for Object detection
TensorFlow Hub
: a repository of “trained machine learning models”
? We can load model from TF Hub and use it for fine-tuning or inference
( https://tfhub.dev )
TensorFlow Object Detection API(Application Programming Interface)
: an open source framework built on top of TensorFlow that makes it easy to construct, train and deploy object detection models
: provides useful functions or classes for object detection
Слайд 8

Object Detection Inference Tutorial 1. Import tensorflow_hub with other necessary libraries

Object Detection Inference Tutorial

1. Import tensorflow_hub with other necessary libraries

2. Define

some other additional functions
Слайд 9

Object Detection Inference Tutorial 3. Define image_url of pictures what you

Object Detection Inference Tutorial

3. Define image_url of pictures what you want

to know which objects are in it

4. Load model from TF Hub

Of course, other models in the hub are available, but let’s apply ‘SSD’ we learned

Simple way to load pre-trained models

Слайд 10

Object Detection Inference Tutorial 5. Define functions for loading image and performing detection & Run detection

Object Detection Inference Tutorial

5. Define functions for loading image and performing

detection & Run detection
Слайд 11

Object Detection Inference Tutorial 6. You can perform inference on some

Object Detection Inference Tutorial

6. You can perform inference on some additional

images

Please try with your own images
- if you have URL of image, edit this cell
- Or, drag your images into proper directory in Colab like in Lab2, and edit ‘downloaded_image_path’

Слайд 12

Inference Tutorial 2 1. install the Object Detection API the part

Inference Tutorial 2

1. install the Object Detection API

the part for importing

and defining a function is skipped because it is the same as other tutorials

2. Then we can import some utils from the API

3. get index numbers and labels by using the API

Слайд 13

Inference Tutorial 2 4. Define model what we want to use

Inference Tutorial 2

4. Define model what we want to use &

load it from TensorFlow Hub

There are many available pre-trained object detection models

Слайд 14

Inference Tutorial 2 5. select image, or you can edit image_path for detecting your own images

Inference Tutorial 2

5. select image, or you can edit image_path for

detecting your own images
Слайд 15

Inference Tutorial 2 6. Do the Inference & Visualize the result

Inference Tutorial 2

6. Do the Inference & Visualize the result