demo.py 558 B

12345678910111213141516171819
  1. # -*- coding: UTF-8 -*-
  2. # '''=================================================
  3. # @Project -> File :swin_transformer -> demo.py
  4. # @IDE :PyCharm
  5. # @Version:
  6. # @Author : Bochao Zheng
  7. # @Time : 2024-04-16 19:44
  8. # @Email : seu_zbc@hotmail.com
  9. # @Desc :
  10. # '''=================================================
  11. import cv2
  12. # videowriter = cv2.writer
  13. video_path = "/data/fengyang/sunwin/code/swin_conda_env/video/fire.mp4"
  14. vid = cv2.VideoCapture("video_path")
  15. for frame in vid.get():
  16. width = frame.shape[0]
  17. height = frame.shape[1]