一名CV界的小学生
码龄5年
  • 58,753
    被访问
  • 102
    原创
  • 55,122
    排名
  • 19
    粉丝
关注
提问 私信
  • 加入CSDN时间: 2017-09-06
博客简介:

weixin_40132776的博客

查看详细资料
  • 4
    领奖
    总分 686 当月 24
个人成就
  • 获得11次点赞
  • 内容获得19次评论
  • 获得133次收藏
创作历程
  • 11篇
    2022年
  • 71篇
    2021年
  • 19篇
    2020年
  • 6篇
    2019年
  • 1篇
    2018年
成就勋章
TA的专栏
  • Pytorch API
    4篇
  • python
    24篇
  • CUDA By Example
    3篇
  • 语义分割
    1篇
  • 深度学习
    9篇
  • Ubuntu 常用
    1篇
  • linux
    1篇
  • C++ # STL
    12篇
  • C++
    28篇
  • cmake
    4篇
  • 图像处理
    27篇
  • 脚本
    5篇
  • ffmpeg
    5篇
  • rk3399备忘
    1篇
  • yolo
    2篇
  • 机器学习实战
    1篇
  • ReID
    1篇
  • 稠密轨迹(IDT)算法
    1篇
  • 论文阅读
  • slam十四讲
    1篇
  • OpenCV API
    22篇
兴趣领域 设置
  • 人工智能
    opencv计算机视觉机器学习深度学习神经网络tensorflow图像处理
  • 最近
  • 文章
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

yoloV4模型转onnx

def pth2onnx(cfgDir,pthDir,imgSize): model=Darknet(cfgDir,imgSize) checkpoint = torch.load(pthDir) print(model) model.load_state_dict(checkpoint['model']) model.eval() dummy_input = torch.randn(1, 3, 416, 416) input_names = ["i.
原创
发布博客 2022.01.25 ·
1400 阅读 ·
0 点赞 ·
0 评论

3-4:设备属性的使用

API:main.cu#include"book.h"int main(void){ cudaDeviceProp prop; int dev; HANDLE_ERROR(cudaGetDevice(&dev)); printf("ID of current CUDA device: %d
",dev); memset(&prop,0,sizeof(cudaDeviceProp)); prop.major=1;
原创
发布博客 2022.01.23 ·
809 阅读 ·
0 点赞 ·
0 评论

3-3:查询设备

#include "book.h"int main(void){ cudaDeviceProp prop; int count; HANDLE_ERROR(cudaGetDeviceCount(&count)); for (int i = 0; i < count; i++) { HANDLE_ERROR(cudaGetDeviceProperties(&prop, i)); printf(" ---.
原创
发布博客 2022.01.23 ·
305 阅读 ·
0 点赞 ·
0 评论

3.2.3 传递参数

main.cu:#include<stdio.h>#include"book.h"__global__ void add(int a,int b,int *c){ *c=a+b;}int main(){ int c; int *dev_c; HANDLE_ERROR(cudaMalloc((void**)& dev_c,sizeof(int))); add<<<1,1>>>(2,7,.
原创
发布博客 2022.01.22 ·
295 阅读 ·
0 点赞 ·
0 评论

STDC分割网络:onnx推理

def STDCProcess(img): mean = [0.485, 0.456, 0.406] std = [0.229, 0.224, 0.225] img = cv2.resize(img, (256, 256)) img = img.astype(np.float32) img = img[:, :, ::-1]# BGR2RGB img = (img / 255.0 - mean) / std img = np.transpose(i.
原创
发布博客 2022.01.17 ·
2455 阅读 ·
0 点赞 ·
0 评论

linux: dirent.h 使用

头文件:dirent.h代码:void direntTest(){ std::string rootPath="/home/.../test/samples"; std::vector<std::string> imageNames; auto dir=opendir(rootPath.c_str()); if((dir)!= nullptr) { struct dirent *entry; entry=r
原创
发布博客 2022.01.13 ·
298 阅读 ·
0 点赞 ·
0 评论

yaml-cpp 使用

void testYamlLibs(){ const std::string yamlFilePath="/home/tc/.../test/config.yaml"; YAML::Node root=YAML::LoadFile(yamlFilePath); YAML::Node config=root["imgs"]; int height=config["height"].as<int>(); int width=config["width"]..
原创
发布博客 2022.01.13 ·
215 阅读 ·
0 点赞 ·
0 评论

计算函数执行时间chrono

auto t_start=std::chrono::high_resolution_clock::now(); label= readImageNetLabel(fileDir); auto t_end=std::chrono::high_resolution_clock::now(); float total_cost=std::chrono::duration<float,std::milli>(t_end-t_start).count(); std...
原创
发布博客 2022.01.12 ·
33 阅读 ·
0 点赞 ·
0 评论

C++ STL:map,string

#include <iostream>#include "map"#include "string"#include "fstream"std::map<int,std::string> readImageNetLabel(const std::string &fileName){ std::map<int,std::string> imagenetLabel; std::ifstream file(fileName); if.
原创
发布博客 2022.01.12 ·
144 阅读 ·
0 点赞 ·
0 评论

docker命令备忘

原创
发布博客 2022.01.06 ·
198 阅读 ·
0 点赞 ·
0 评论

Skimage:img_as_float

参考:skimage_Scikit image_参考手册_非常教程Python skimage.img_as_float方法代码示例 - 纯净天空 相应的例程代码
原创
发布博客 2022.01.04 ·
1723 阅读 ·
0 点赞 ·
0 评论

离线数据增强

def imgAug(imgDir,dstImg): params = [0.5, 0.6, 0.7, 0.8, 0.9, 1.1, 1.2, 1.3, 1.4, 1.5] gaussParams=[3,5] imgNames=[img for img in os.listdir(imgDir)] for name in imgNames: img = Image.open(os.path.join(imgDir,name)) brightE.
原创
发布博客 2021.12.28 ·
1311 阅读 ·
0 点赞 ·
0 评论

离线数据增强 PIL

使用一幅图像可得到600到900张图像def imgAug(imgDir,name,dstImg): params = [0.5, 0.6, 0.7, 0.8, 0.9, 1.1, 1.2, 1.3, 1.4, 1.5] img = Image.open(os.path.join(imgDir,name)) brightEnhance = ImageEnhance.Brightness(img) contrastEnhance = ImageEnhance.Contr.
原创
发布博客 2021.12.24 ·
1453 阅读 ·
0 点赞 ·
0 评论

python:图像重命名

def ImgRename(rootDir): for root,dirs,files in os.walk(rootDir): for dir in dirs: subDir=os.path.join(root,dir) names=[name for name in os.listdir(subDir)] for i, name in enumerate(names): ra.
原创
发布博客 2021.12.20 ·
673 阅读 ·
0 点赞 ·
0 评论

python:datetime格式化输出

from datetime import datetimetimeStamp=datetime.now().strftime("%Y-%m-%d %H:%M:%S")print(timeStamp)# 2021-12-18 15:11:14参考:Python datetime 格式化字符串:strftime() - 时间&煮雨~ - 博客园
原创
发布博客 2021.12.18 ·
817 阅读 ·
1 点赞 ·
0 评论

pytorch API:随机裁剪

def imgAugTest(imgDir): img=Image.open(imgDir) print('the size of raw img:{}'.format(img.size)) cropImg=transforms.RandomResizedCrop(224)(img) print('the size of new img {}'.format(cropImg.size)) cropImg01=transforms.RandomResizedCrop(.
原创
发布博客 2021.12.17 ·
533 阅读 ·
0 点赞 ·
0 评论

Pytorch API:学习率调整

def StepLRTest(): model=AlexNet(num_classes=2) optimizer=optim.SGD(params=model.parameters(),lr=0.01) scheduler=lr_scheduler.MultiStepLR(optimizer,milestones=[5,20,40,80],gamma=0.1) plt.figure() x=list(range(100)) y=[] for ep.
原创
发布博客 2021.12.13 ·
1146 阅读 ·
0 点赞 ·
0 评论

借助PIL库实现图像旋转

def imgRotate(imgDir): img=Image.open(imgDir) img90=img.transpose(Image.ROTATE_90) img180=img.transpose(Image.ROTATE_180) img270=img.transpose(Image.ROTATE_270) img180.save('img1.jpg') plt.figure(figsize=(10,10)) plt.suptitle('.
原创
发布博客 2021.12.10 ·
2604 阅读 ·
0 点赞 ·
0 评论

opencv:SIFT 校正

def SIFT(inpic,template): sift = cv2.xfeatures2d.SIFT_create() grayPic=cv2.cvtColor(inpic,cv2.COLOR_BGR2GRAY) img1 = grayPic[100:1000,:] img2 = template[100:1000,:] kp1, des1 = sift.detectAndCompute(img1,None) kp2, des2 = sift.dete.
原创
发布博客 2021.12.07 ·
242 阅读 ·
0 点赞 ·
1 评论

opencv:图像直方图均衡化

def calcGrayHist(image): rows,cols=image.shape grayHist=np.zeros([256],np.uint64) for r in range(rows): for c in range(cols): grayHist[image[r][c]]+=1 return grayHistdef equalHist(imgDir): imgGray=cv2.imread(img.
原创
发布博客 2021.12.02 ·
2080 阅读 ·
0 点赞 ·
0 评论
加载更多