FindCats.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:RaspberryPi-Robot 作者: timestocome 项目源码 文件源码
def is_cat(self):

        now = datetime.datetime.now()

        # take photo
        t = self.capture_image()

        # see if Min, Merlin or no cat in photo
        input_operation = self.graph.get_operation_by_name(self.input_layer_name);
        output_operation = self.graph.get_operation_by_name(self.output_layer_name);

        results = self.sess.run(output_operation.outputs[0], {input_operation.outputs[0]: t})
        results = np.squeeze(results)



        found = []
        for i in range(3):
            found.append((self.labels[i], results[i]))


        print(datetime.datetime.now() - now)
        return found
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号