上一页 1 2 3 4 5 6 ··· 17 下一页
摘要: 图片大小计算 图像分辨率*位深度 位深度一般为32位,R、G、B、α(透明度)各占8位,共4个字节 1080P图像,字节大小为:1920x1080x32(bit) = 66355200bit 66355200bit/8 = 8294400.0B 8294400.0B/1024 = 8100.0KB 阅读全文
posted @ 2022-12-01 20:10 Truman001 阅读(2437) 评论(0) 推荐(0) 编辑
摘要: 1 model定义 import torch.nn as nn import torch.nn.functional as F # 定义类,继承nn.Module父类,实现init函数和forward函数(正向传播) class LeNet(nn.Module): def __init__(self 阅读全文
posted @ 2022-08-26 16:42 Truman001 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 1 torchstat 该工具包可通过pip直接安装: pip install torchstat 使用方法 import torchvision.models as models #pretrained=True就可以使用预训练的模型 #resnet18 = models.resnet18(pre 阅读全文
posted @ 2022-08-11 17:16 Truman001 阅读(455) 评论(0) 推荐(0) 编辑
摘要: 模型导出测试 import numpy as np import torch import torch.nn as nn ## 构造随机输入,参数为shape,输入满足正太分布 input = torch.randn(4, 256, 256) input=torch.randint_like(inp 阅读全文
posted @ 2022-08-11 16:46 Truman001 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 一 基本使用 1 下载源代码 网址:https://github.com/ultralytics/yolov5 使用git clone到本地。 2 模型训练 ​ 使用pycharm打开yolov5文件夹,运行train.py脚本,会自动下载COCO128数据集,如果本地已有数据集,修改coco128 阅读全文
posted @ 2022-08-11 16:19 Truman001 阅读(630) 评论(0) 推荐(0) 编辑
摘要: 1 视频解码图片 import cv2 #根据需要修改路径 cap = cv2.VideoCapture("D:/test/test.mp4") i = 0 while cap.isOpened(): ret, frame = cap.read() if not ret: break # frame 阅读全文
posted @ 2022-06-28 18:53 Truman001 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 1 更新软件源 sudo apt update 2 下载 sudo apt install gparted 3 启动 在终端输入gparted命令,或者在搜索栏中搜索 4 卸载 sudo apt remove gparted 参考链接:https://linuxways.net/centos/how 阅读全文
posted @ 2022-06-28 18:43 Truman001 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 点击需要编辑的图形,然后依次点击"视图->任务窗格->大小和位置",这个时候,图形的大小和位置信息就会显示出来。 这个时候可用鼠标点击"宽度"和"高度"的值上,并输入想输入的值来改变图形大小。还可选择多个图形,然后统一调整图形高宽。 阅读全文
posted @ 2022-06-22 14:48 Truman001 阅读(1941) 评论(0) 推荐(0) 编辑
摘要: static inline float sigmoid(float x) { return static_cast<float>(1.f / (1.f + exp(-x))); } 阅读全文
posted @ 2022-06-16 14:18 Truman001 阅读(736) 评论(0) 推荐(0) 编辑
摘要: 1 不需要加载图片 // C++ program for the above approach #include <iostream> #include <opencv2/core/core.hpp> // Library to include for // drawing shapes #incl 阅读全文
posted @ 2022-06-16 11:47 Truman001 阅读(1529) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 17 下一页