viewer.py 文件源码

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

项目:video_labeler 作者: hahnyuan 项目源码 文件源码
def run(self):
        stop = False
        _, im = self.cam.read()
        while 1:
            if not self.video_stat.is_drug and not stop:
                _, im = self.cam.read()
                self.video_stat.update(im)
                self.box_saver.save(im,self.video_stat.frame_id,self.video_stat.get_boxes())
            else:
                if self.video_stat.is_drug:
                    self.video_stat.draw_update(im, self.label_stat.get_label_name())
            chr=cv2.waitKey(1) & 0xFF
            if chr==ord(' '): # press space to stop the frame
                stop= not stop
            if chr==27: # Esc key to exit
                break
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号