American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

8 PM – Advanced AI/ML – Joel

May 16 @ 8:00 pm - 9:00 pm

Today we did:
  1. We started working on OCR.

 

Homework:
  1. This is the last week to finish your personal project. Please contact me if you have any issues. You should finish training a model with good metrics, and also download the best.pt and make the streamlit page.
  2. If I haven’t seen you train the model, make sure to run this cell and see the comments for a good model :
  3. metrics = model.val()
    print(metrics.box.map50) #mAP@0.5
    print(metrics.box.map) #mAP@0.5:0.95
    print(metrics.box.precision)
    print(metrics.box.recall)
    #mAP@0.5 (0.6 and up is already good)
    #mAP@0.5:0.95 (0.5 and up is already good)
    #Precision (0.7-0.8 is already good)
    #Recall (0.7-0.8)
  4. If you haven’t already put the best.pt into the Pycharm folder, make sure that you finish training first, and once training finishes, open the runs folder -> detect -> train -> weights -> and find best.pt. Then, right-click on that best.pt file, and click download. It might take some time. Once you’ve downloaded it, then move it into the Pycharm project for the streamlit.
  5. Additionally, for the OCR_app we’re working on, make the if statement if run is True. If it is, check if the source is “Video URL”, and ask for text input for the link. If the video_url is True, then capture the video with cv2. And check if cap.isOpened() is False. If it is, then show an error in streamlit saying “Failed to open video source”. Otherwise, set the cap’s width to 640 and the height to 480 pixels.

Details

Date:
May 16
Time:
8:00 pm - 9:00 pm