-
Notifications
You must be signed in to change notification settings - Fork 2
Home
parksungchan edited this page Jan 10, 2018
·
1 revision
Welcome to the tensormsa_facenet wiki!
frame = Image.fromarray(np.uint8(frame))
draw = ImageDraw.Draw(frame)
font = ImageFont.truetype(self.font_location, 16)
result_names = self.class_names[best_class_indices[0]]+'('+str(best_class_probabilities[0])[:5]+')'
if self.class_names[best_class_indices[0]] == self.result:
self.counts = self.counts + 1
if len(bounding_boxes) == 1:
self.save_image(saveframe, self.class_names[best_class_indices[0]], str(best_class_probabilities[0])[:5], bb)
if self.counts == 1:
self.result = self.class_names[best_class_indices[0]]
if self.counts % 10 == 0:
draw.text((bb[0], bb[1]-15), result_names, self.text_color, font=font)
self.result = self.class_names[best_class_indices[0]]
elif self.counts < 10:
draw.text((bb[0], bb[1] - 15), '', self.text_color, font=font)
else :
draw.text((bb[0], bb[1] - 15), self.result, self.text_color, font=font)
_unknown = 'L002 정현'
if self.class_names[best_class_indices[0]] == _unknown:
un_counts = un_counts + 1
elif un_counts < 10:
draw.text((bb[0], bb[1] - 15), '', self.text_color, font=font)
else :
draw.text((bb[0], bb[1] - 15), _unknown, self.text_color, font=font)