tensorflow实现目标检测
tags:深度学习 tensorflow
准备期
1.将tensorflow/models下载到本地
2.在research/object_deteciton文件夹下有训练过程中所需用到的py代码(有不断地更新),有时候出来bug就可能是有些py没有及时更新的原因,就像这次升级到1.4,再按照原来的去处理就出现了bug。
运行示例
object_detection示例
进行相应的修改用来检测自己训练出来的model
import numpy as np
import os
import six.moves.urllib as urllib
import sys
import tarfile
import tensorflow as tf
import zipfile
from collections import defaultdict
from io import StringIO
from matplotlib import pyplot as plt
from PIL import Image
# This is needed to display the images.
%matplotlib inline
#根据过程中的bug需要添加相应的路径
sys.path.append("/home/latham/Downloads/models-master/research/object_detection")
sys.path.append("/home/latham/Downloads/models-master/research")
sys.path.append("/home/latham/Downloads/models-master/research/slim")