American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

8 PM – Advanced AI/ML – Joel

March 6 @ 8:00 pm - 9:00 pm

Today we did:
  1. We continued working on YOLO Human Detection.
Homework:
  1. Ues cv2.putText in order to display the confidence on the top left of the bounding box rectangle we had earlier.
  2. cv2.putText has several arguments:
    1. Put in the image/frame that we are dealing with as the first one.
    2. Put in the text that you want to display for the confidence. Remember, you can use an f-string to display the value of the confidence in this string.
    3. Next is the coordinate of the text that you want to have. Play around with this until you get it exactly above the bounding box’s top left corner. Remember you can use the bounding box’s x1 and y1 coordinates since that is the top left corner of the bounding box. These coordinates are in parentheses. So something like (x1, y1).
    4. Next, put cv2.FONT_HERSHEY_SIMPLEX as an argument. This is just setting the font of the text.
    5. Next is the fontScale, or size of the text. Try a low number but pick what you like.
    6. Next is the color, similar to the way did it in cv2.rectangle, it’s probably nice to use the same color. Remember it uses parentheses.
    7. Finally, set the thickness of the text with a number. 1-10 is alright, pick what you like.

If you have any questions, feel free to email me at joel@ayclogic.com.

Details

Date:
March 6
Time:
8:00 pm - 9:00 pm