def __init__(self,labels,video_file,box_saver,border=30):
"""
the GUI Labeler
:param labels: the labels name string list
:param video_file: the video file path
:param border: the border of the center clip filed (white line around the video)
:param save_dir: label result save path
:param save_im: if write every cropped image to each label directory
"""
self.cam = cv2.VideoCapture(video_file)
self.video_stat = VideoStat(border)
self.label_stat = LabelStat(labels)
self.labels=labels
self.box_saver=box_saver
cv2.setMouseCallback("video", self.video_click)
cv2.setMouseCallback("label", self.label_click)
self.run()
评论列表
文章目录