Skip to content

Commit

Permalink
Update detect_video.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nimadorostkar authored Nov 5, 2023
1 parent bcecaa5 commit ff9f8b9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions detect_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from pydub.playback import play



flags.DEFINE_string('classes', './data/labels/coco.names', 'path to classes file')
flags.DEFINE_string('weights', './weights/yolov3.tf',
'path to weights file')
Expand Down Expand Up @@ -72,7 +71,6 @@ def main(_argv):
else:
break


img_in = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
img_in = tf.expand_dims(img_in, 0)
img_in = transform_images(img_in, FLAGS.size)
Expand Down Expand Up @@ -100,7 +98,7 @@ def main(_argv):
if (class_names[int(classes[0][i])]) == "person": #filter for humans
print("yes, human detected ")
play(song)
print("------------------------------------------------")
print("-------------")


if cv2.waitKey(1) == ord('q'):
Expand All @@ -115,5 +113,3 @@ def main(_argv):
except SystemExit:
pass



0 comments on commit ff9f8b9

Please sign in to comment.