Skip to content

Commit

Permalink
Update demo.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Qidian213 authored May 15, 2018
1 parent 828b147 commit 636bf01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ def main(yolo):
if track.is_confirmed() and track.time_since_update >1 :
continue
bbox = track.to_tlbr()
cv2.rectangle(frame, (int(bbox[0]), int(bbox[1])), (int(bbox[2]), int(bbox[3])),(255,255,255), 4)
cv2.putText(frame, str(track.track_id),(int(bbox[0]), int(bbox[1])),0, 5e-3 * 200, (124,252,0),2)
cv2.rectangle(frame, (int(bbox[0]), int(bbox[1])), (int(bbox[2]), int(bbox[3])),(255,255,255), 2)
cv2.putText(frame, str(track.track_id),(int(bbox[0]), int(bbox[1])),0, 5e-3 * 200, (0,255,0),2)

for det in detections:
bbox = det.to_tlbr()
cv2.rectangle(frame,(int(bbox[0]), int(bbox[1])), (int(bbox[2]), int(bbox[3])),(255,0,0), 4)
cv2.rectangle(frame,(int(bbox[0]), int(bbox[1])), (int(bbox[2]), int(bbox[3])),(255,0,0), 2)
cv2.imshow('', frame)

fps = ( fps + (1./(time.time()-t1)) ) / 2
Expand Down

0 comments on commit 636bf01

Please sign in to comment.