当前位置: 首页> 游戏> 游戏 > 免费建立自己喜欢的_网络推广是做什么的_网站优化公司收费_今日最新新闻重大事件

免费建立自己喜欢的_网络推广是做什么的_网站优化公司收费_今日最新新闻重大事件

时间:2025/7/11 1:28:41来源:https://blog.csdn.net/weixin_43863869/article/details/142705620 浏览次数:0次
免费建立自己喜欢的_网络推广是做什么的_网站优化公司收费_今日最新新闻重大事件

1--完整项目地址

liujf69/Data-Processing/Kinectis_400

2--参考

Kinetics-400数据集简介及下载

3--简单处理代码

import os
import csv
import cv2def split_frame(raw_csv: str, root_video_path: str, root_output_path: str, debug: bool = True):csv_reader = csv.reader(open(raw_csv))for idx, row in enumerate(csv_reader): if (idx == 0):continue # ['label', 'youtube_id', 'time_start', 'time_end', 'split', 'is_cc'] label, youtube_id, time_start, time_end, split, is_cc = rowvideo_name = youtube_id + "_" + time_start.zfill(6) + "_" + time_end.zfill(6) + ".mp4"print("Process ", idx, " ", video_name)video_path = os.path.join(root_video_path, label, video_name)save_path = os.path.join(root_output_path, label, video_name.split(".")[0])if not os.path.exists(save_path):os.makedirs(save_path)cap = cv2.VideoCapture(video_path)frame_idx = 0ret = Truewhile ret:ret, rgb_img = cap.read()  # read each frameif (not ret):breakcv2.imwrite(save_path + '/' + str(frame_idx) + '.jpg', rgb_img)frame_idx = frame_idx + 1if debug: # just process one videobreakif __name__ == "__main__":raw_csv = "./label/train_256.csv"root_video_path = "./raw-part/compress/train_256"root_output_path = "./output"split_frame(raw_csv = raw_csv, root_video_path = root_video_path, root_output_path = root_output_path, debug = True)print("All Done!")

关键字:免费建立自己喜欢的_网络推广是做什么的_网站优化公司收费_今日最新新闻重大事件

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: