eval.py 410 B

12345678910111213141516
  1. from pathlib import Path
  2. import numpy as np
  3. from ultralytics import YOLO
  4. from sorawm.configs import WATER_MARK_DETECT_YOLO_WEIGHTS
  5. from sorawm.utils.video_utils import VideoLoader
  6. # based on the sora tempalte to detect the whole, and then got the icon part area.
  7. model = YOLO(WATER_MARK_DETECT_YOLO_WEIGHTS)
  8. model.eval()
  9. results = model("resources/first_frame.png") # Predict on an image
  10. print(results)