camera.py 文件源码

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

项目:ctrl-f-vision 作者: osmanio2 项目源码 文件源码
def item_seen(frame):
    global sess, max_images, current_images, label
    # DIRTY!!
    imageio.imwrite('picture_out.jpg', frame)
    image = run_inference_on_image('picture_out.jpg', sess)

    if image != "without" and image == label:
        current_images += 1
    else:
        current_images = 0
        label = image

    if current_images > max_images:
        print("This is the label yaaaaaaaaaaaaaa {}".format(image))
        current_images = max_images
        return image
    else: 
        print("No Still Nothing useful although I am seeing {}".format(image))
        return "without"




    # maybe resize?
    #(w, h, c) = frame.shape
    #scipy.misc.imresize(np.asarray(frame), min(200.0 / w, 200.0 / h))
    #return run_inference_on_image(np.asarray(frame))

# method to write the gif
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号