黑猴子的家:Ubuntu下载

本文介绍如何从官方网站下载Ubuntu桌面版ISO镜像文件。用户可以访问Ubuntu首页并点击Download按钮找到下载链接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、下载地址

https://www.ubuntu.com

2、首页 -> Download

9193428-57aec19d74862b23.jpg

3、Ubuntu Desktop

9193428-69865ca408b00724.jpg

4、Download

9193428-5272324a12ae50fc.jpg

5、下载Ubuntu ISO镜像

9193428-0fcfa47bb02b46e1.jpg

这串代码输出后中文标签显示为问号import cv2 from sahi.predict import get_sliced_prediction from sahi import AutoDetectionModel from ultralytics import YOLO # 初始化模型 detection_model = AutoDetectionModel.from_pretrained( model_type='yolov8', model_path='yolov8n_chinese.pt', confidence_threshold=0.4, #device='cuda:0' # 或 'cpu' ) # 视频处理参数 VIDEO_PATH = "视频检测源/sample_video.mp4" OUTPUT_PATH = ("output/output_video.mp4") SLICE_SIZE = 256 # 切片尺寸 OVERLAP_RATIO = 0.2 # 切片重叠比例 # 打开视频文件 cap = cv2.VideoCapture(VIDEO_PATH) frame_width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)) frame_height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT)) fps = cap.get(cv2.CAP_PROP_FPS) # 创建视频写入器 fourcc = cv2.VideoWriter_fourcc(*'mp4v') out = cv2.VideoWriter(OUTPUT_PATH, fourcc, fps, (frame_width, frame_height)) while cap.isOpened(): ret, frame = cap.read() if not ret: break # 使用SAHI进行切片推理 result = get_sliced_prediction( frame, detection_model, slice_height=SLICE_SIZE, slice_width=SLICE_SIZE, overlap_height_ratio=OVERLAP_RATIO, overlap_width_ratio=OVERLAP_RATIO ) # 绘制检测结果 for pred in result.object_prediction_list: # 解析预测结果 bbox = pred.bbox.to_voc_bbox() label = pred.category.name confidence = pred.score.value # 绘制矩形框和标签 cv2.rectangle(frame, (int(bbox[0]), int(bbox[1])), (int(bbox[2]), int(bbox[3])), (0, 255, 0), 2) cv2.putText(frame, f"{label} {confidence:.2f}", (int(bbox[0]), int(bbox[1] - 5)), cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0, 0, 255), 2) # 写入输出视频 out.write(frame) # 释放资源 cap.release() out.release() cv2.destroyAllWindows()
最新发布
06-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值