Skip to Content
Mastering Computer Vision with TensorFlow 2.x
book

Mastering Computer Vision with TensorFlow 2.x

by Krishnendu Kar
May 2020
Beginner to intermediate
430 pages
10h 39m
English
Packt Publishing
Content preview from Mastering Computer Vision with TensorFlow 2.x

Left half-block

The code for the left half-block is as follows:

def create_left_half_blocks(bottom, bottleneck, hglayer, num_channels):# create left half blocks for hourglass module# f1, f2, f4 , f8 : 1, 1/2, 1/4 1/8 resolutionhgname = 'hg' + str(hglayer)f1 = bottleneck(bottom, num_channels, hgname + '_l1')_x = MaxPool2D(pool_size=(2, 2), strides=(2, 2))(f1)f2 = bottleneck(_x, num_channels, hgname + '_l2')_x = MaxPool2D(pool_size=(2, 2), strides=(2, 2))(f2)f4 = bottleneck(_x, num_channels, hgname + '_l4')_x = MaxPool2D(pool_size=(2, 2), strides=(2, 2))(f4)f8 = bottleneck(_x, num_channels, hgname + '_l8')return (f1, f2, f4, f8)

The preceding code performs two specific actions:

  • It defines the filter coefficients (f1, f2, f4, and f8) with resolutions ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Computer Vision with TensorFlow 2

Hands-On Computer Vision with TensorFlow 2

Benjamin Planche, Eliot Andres

Publisher Resources

ISBN: 9781838827069Supplemental Content