Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
SuragNuthulapaty committed Feb 25, 2024
1 parent 2d6bd54 commit d51763d
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions code/full.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ def move_in_square():
time.sleep(DT)

temp_start_time = time.time()
camera.capture()
if pic_time%4 == 0:
image_array = camera.image_array
person_detected = detectPersonInFrame(image_array[::-1, :, :3], ModelType.YOLOv8n)
start_time += (time.time() - temp_start_time)

if person_detected == 1:
led1.on()
led2.on()
time.sleep(2)
led1.off()
led2.off()
start_time+=2
# if pic_time%4 == 0:
# camera.capture()
# image_array = camera.image_array
# person_detected = detectPersonInFrame(image_array[::-1, :, :3], ModelType.YOLOv8n)
# start_time += (time.time() - temp_start_time)

# if person_detected == 1:
# led1.on()
# led2.on()
# time.sleep(2)
# led1.off()
# led2.off()
# start_time+=2

person_detected = 0
pic_time += 1
Expand Down Expand Up @@ -83,19 +83,19 @@ def move_in_line():
time.sleep(DT)

temp_start_time = time.time()
camera.capture()
if pic_time%4 == 0:
image_array = camera.image_array
person_detected = detectPersonInFrame(image_array[::-1, :, :3], ModelType.YOLOv8n)
start_time += (time.time() - temp_start_time)

if person_detected == 1:
led1.on()
led2.on()
time.sleep(2)
led1.off()
led2.off()
start_time+=2
# camera.capture()
# if pic_time%4 == 0:
# image_array = camera.image_array
# person_detected = detectPersonInFrame(image_array[::-1, :, :3], ModelType.YOLOv8n)
# start_time += (time.time() - temp_start_time)

# if person_detected == 1:
# led1.on()
# led2.on()
# time.sleep(2)
# led1.off()
# led2.off()
# start_time+=2

person_detected = 0
pic_time += 1
Expand Down

0 comments on commit d51763d

Please sign in to comment.