输出结果
![](https://img.laitimes.com/img/__Qf2AjLwojIjJCLyojI0JCLicmbw5SNzYDN1I2YkRWOxYmMhNjYidDM0czMzMjZxImM4MDMz8CX5d2bs92Yl1iclB3bsVmdlR2LcNWaw9CXt92Yu4GZjlGbh5yYjV3Lc9CX6MHc0RHaiojIsJye.png)
设计思路
代码(部分)实例
#1、导入基本的包和环境,包括两个TFOD中的包
import numpy as np
import os
import six.moves.urllib as urllib
import sys
……
if StrictVersion(tf.__version__) < StrictVersion('1.9.0'):
raise ImportError('Please upgrade your TensorFlow installation to v1.9.* or later!')
for image_path in TEST_IMAGE_PATHS:
image = Image.open(image_path)
……
category_index,
instance_masks=output_dict.get('detection_masks'),
use_normalized_coordinates=True,
line_thickness=8)
plt.figure(figsize=IMAGE_SIZE)
plt.title('TFOD API Official Case Tutorial——Jason Niu')
plt.imshow(image_np)