- 博客(87)
- 收藏
- 关注
原创 多任务学习综述
只使用单个任务的样本信息局限性1、忽略其它任务的经验信息,致使训练冗余重复和学习资源浪费,限制性能提升2、对于训练样本少且特征维数高的任务,单任务学习出现秩亏且存在过拟合风险给定MMM个任务Tmm1MTmm1M第mmm个任务为TmT_mTm其训练集为DmD_mDm包含nmn_mnm个样本-标签对xmjymjj1nmxmjymjj1nmxmj∈RDymj∈Rx。
2023-12-20 15:18:53
1503
原创 python:计算子文件夹内的文件个数
import osfrom args import argsdef num_dir(num_each_dir): """ 计算子文件夹内的文件个数 """ # 输入num_each_dir为主文件夹路径(主文件夹内为n个子文件夹 # 初始化每个子文件夹内文件个数(共有args.num_classes个子文件夹 each_num = [0] * args.num_classes # 将子文件夹名称输入列表 DirList = os.list
2022-04-15 11:48:16
1804
原创 C++:Windows平台下利用LibTorch调用PyTorch模型
文章目录环境Libtorch下载Pytorch将.pth转为.pt文件python环境下的预测输出结果:rose新建pt模型生成文件输出结果:roseC++调用pytorch模型新建空项目pt_alex项目属性配置修改配置管理器属性>VC++目录>包含目录属性>VC++目录>库目录属性>链接器>输入>附加依赖项注意CUDA下的情况属性>C/C++项目下新建test.cpp输出结果:roseC# Demo新建C++空项目,封装DLL源码项目属性点击生成解决方案,
2022-03-03 15:29:11
5903
12
原创 C++:VS包含目录、继承值修改
VS重装后修改VC++包含目录、继承值以及附加依赖项等主要是为了修改默认使用的opencv版本(1)进入目录: C:\Users\xxx\AppData\Local\Microsoft\MSBuild\v4.0(2)使用文本编辑器打开文件 Microsoft.Cpp.Win32.user.props 及 Microsoft.Cpp.x64.user.props(3)修改 或 中间内容。(4)重新打开VS,问题解决。...
2022-03-01 17:47:27
4196
原创 C#:利用button控件本地上传图片并显示
界面代码// Form1.csusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;namespace XXX{ p
2022-02-28 16:41:13
1996
原创 Ubuntu:磁盘满了开机黑屏
重启长按shift键进入grub菜单选择 Advanced options for Ubuntu选择(recovery mode)选择clean,自动清理一些文件重启,成功开机
2021-11-26 09:13:44
2032
原创 AlexNet:论文阅读及pytorch网络搭建
文章目录AlexNetAbstract1 Introduction2 Dataset3 Architecture3.1 ReLU Nonlinearity3.2 Training on Multiple GPUs3.3 Local Response Normalization3.4 Overlapping Pooling3.5 Overall Architecture4 Reducing Overfitting4.1 Data Augmentation4.2 Dropout5 Details of lea
2021-11-09 16:44:04
389
原创 python:(数据集分布)计算一维数组中不同数的数量、绘制柱状图及其详细信息
import osimport numpy as npimport collectionsimport matplotlibimport matplotlib.pyplot as pltmatplotlib.use('TkAgg')base_path = 'data/'labelsTrain = []ssT = []# 文件内容示例:img_1226.jpg,24,前部分为图像名称,后部分为图像标签for line in open(base_path + 'train1.txt'
2021-11-04 22:04:52
2404
原创 python:Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
参考:Python下"No module named _tkinter"问题解决过程总结plt.show()报错:UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.plt.show()import matplotlibmatplotlib.use('TkAgg')import matplotlib.pyplot as plt报错:
2021-11-04 16:53:13
628
原创 OCR :PaddleOCR项目(vs2017 C++)
文章目录Github源码下载Install and Compile C++ Inference Library on WindowsCmake编译打开项目ocr_system.sln(vs2017)下载模型copy所需文件修改配置文件cmd测试参考:C++ | PaddleOCR+OpenCV实现文字识别步骤与代码演示百度PaddleOCR字符识别推理部署(C++)C++ 编译 PaddleOCR(CPU版)Github源码下载2.0版本:PaddleOCR-release-2.0Insta
2021-09-02 15:48:45
3254
6
原创 OCR:PixelLink实验
安装ubuntu16.04下载代码包git clone --recursive git@github.com:ZJULearning/pixel_link.git错误:解决:github添加ssh公钥环境配置1、安装Anaconda2、conda env create --file pixel_link_env.txtsource activate pixel_link报错:...
2021-06-16 19:59:06
285
1
原创 Ubuntu:解压rar格式压缩包
sudo apt-get install unrar # 安装# 加参数,解压sudo unrar x name.rar # x 解压到一个文件夹sudo unrar e name.rar # e 解压到当前路径
2021-06-16 15:35:40
156
原创 Ubuntu16.04:安装python3.6及遗留问题解决
Ubuntu16.04:安装python3.6参考:Ubuntu16.04怎样安装Python3.6Ubuntu安装Python3.6并切换到3.6版本记Ubuntu16.04安装python3.6出现的问题(新手参考)输入python查看版本号ctrl+D退出命令行输入ls /usr/local/lib/查看本机有哪些可用python版本输入sudo add-apt-repository ppa:jonathonf/python-3.6报错,显示无法添加:依
2020-12-24 09:03:57
1573
2
原创 OpenCV:轮廓及矩形框提取
参考:opencv3/C++轮廓的提取与筛选#define _CRT_SECURE_NO_WARNINGS#include<opencv2/opencv.hpp>#include<opencv2/xfeatures2d.hpp>#include<iostream>using namespace cv;using namespace xfeatures2d;using namespace std;int main(){ Mat src, dst;
2020-12-10 20:21:14
2894
原创 python:objects cannot be broadcast to a single shape
绘制柱状图报错ValueError: shape mismatch: objects cannot be broadcast to a single shape x = range(1,36) y = results plt.bar(x,y) plt.title('Histogram') plt.savefig('Histogram.png') plt.close()我的问题:x与y大小不同size(x) = 35size(y) = 36x.
2020-11-10 22:05:59
3613
1
原创 python:遍历读取图像灰度值,并存入一个新数组中
import numpy as npimport cv2 as cvimport cv2from PIL import Imagedef test(): img = Image.open('lena.tif') # 读取图片 img = img.convert('L') # 灰度化 cols,rows = img.size # 图像大小 Value = [[0]*rows for i in range(cols)] # 创建一个大小与图片相同的二维数组
2020-11-09 17:32:11
12065
15
原创 python:创建数组/矩阵、数组/向量合并
def test(): # 一维 元素为零 x = [0] * 5 # [0, 0, 0, 0, 0] # 三维 x1 = [[1]*3 for i in range(3)] # [ [1, 1, 1], # [1, 1, 1], # [1, 1, 1] ] x2 = [[2]*3 for i in range(3)] # [ [2, 2, 2], # [2, 2, 2], # [2, 2, 2] ] # 三
2020-11-09 17:09:43
1404
原创 OpenCV:vector subscript out of range
报错vector subscript out of range源码 // 查找轮廓 vector<vector<Point>> contours; vector<Vec4i> hierarcy; // 定义外接矩形集合 vector<Rect> boundRect(contours.size()); int x0 = 0, y0 = 0, w0 = 0, h0 = 0; Mat dstRect; ds
2020-08-01 08:40:48
864
1
原创 OpenCV:对视频使用背景差分法并实时显示结果
参考win10 / VS2013 / OpenCV3#include<opencv2/opencv.hpp>#include<iostream>using namespace std;using namespace cv;//背景差分法int main(){ VideoCapture capture("dust.mp4");//获取视频 if (!capture.isOpened()) { return -1; } double rate =
2020-07-28 16:09:35
456
原创 C#:登陆注册功能
注册//界面//Form1.Designer.cs private void InitializeComponent() { this.tb_username = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.L
2020-07-23 14:40:20
1295
原创 OpenCV:imwrite存储图像后为全黑
//截取img左上部分图像 Rect rect1(0, 0, img.cols / 2, img.rows / 2); Mat w1 = img(rect1); imwrite("w1.jpg", w1);修改: //由于原图被归一化了,像素值都处于0-1之间 //将其*255还原 Rect rect1(0, 0, img.cols / 2, img.rows / 2); Mat w1 = img(rect1); w1 = w1 * 255; imwrite("w1.jpg", w.
2020-07-21 15:19:04
1488
1
翻译 论文阅读>烟雾检测:Video-based Smoke Detection Algorithms: A Chronological Survey
文章目录原文------------------------------------------------基于视频的烟雾检测算法:时序调查摘要关键词1 介绍2 现有的烟雾检测算法5 结论参考文献原文Video-based Smoke Detection Algorithms: A Chronological Survey ------------------------------------------------基于视频的烟雾检测算法:时序调查Video-based Smoke Detec
2020-07-17 11:14:04
7535
1
翻译 论文阅读>烟雾检测:Vision based smoke detection system using image energy and color information
原文Vision based smoke detection system using image energy and color information文章目录原文基于图像能量和颜色信息的视觉烟雾检测系统摘要关键词1 介绍2 相关工作3 系统概述4 烟雾分割的背景模型基于图像能量和颜色信息的视觉烟雾检测系统Vision based smoke detection system using image energy and color informationSimone Calderar
2020-07-16 17:45:54
4078
翻译 论文阅读>污垢检测:Vision-Based Dirt Detection and Adaptive Tiling Scheme for Selective Area Coverage
文章目录基于视觉的污垢检测和选择性区域覆盖的自适应切片方案摘要1 介绍提出的污垢检测和分割方法2.1 三阶段过滤2.1.1 定期模式检测过滤器2.1.2 边缘检测和增强2.1.3 噪声消除和污垢分析3 多米诺瓷砖3.1 基于自适应平铺的选择性污垢区域覆盖率Tetromino平铺理论3.1.2 自适应的Tetromino平铺算法4 实验,结果和讨论4.1 污垢检测算法验证4.2 使用污垢数据库4.2.1 ACIN污垢数据库4.2.2 Bormann污垢数据库4.3 带有自适应平铺的选择性污垢区域覆盖率4.3.
2020-07-16 16:27:14
4145
2
翻译 论文阅读>烟雾检测:Smoke detection based on imageprocessing by using grey and transparency features
文章目录通过利用灰度和透明度特征基于图像处理的烟雾检测摘要关键词1 介绍2 颜色模型和烟雾特征分析3 系统3.1 烟雾检测算法3.1.1 视频帧转换3.1.2 运动检测和颜色变换通过利用灰度和透明度特征基于图像处理的烟雾检测Smoke detection based on imageprocessing by using grey and transparency featuresAHMED FAKHIR MUTAR, DR. HAZIM GATI’ DWAY摘要在本研究中,我们通过分析早期烟雾的
2020-07-16 10:38:14
6506
6
原创 OpenCV学习(一)
毛星云(浅墨)-----【OpenCV】入门教程三//头文件#include <opencv2/core/core.hpp>#include<opencv2/highgui/highgui.hpp>#include<iostream>//命名空间using namespace cv;using namespace std;/*----------Mat----------cv::Mat类是用于保存图像以及其他矩阵数据的数据结构。默认情况下,其尺
2020-07-15 15:11:04
798
原创 C#:调用dll时的char*参数与string参数
//生成dll的C++函数//参数为char* float camDetect(char * imageData)//C#调用dll中的该函数 [DllImport("CamDet.dll", CallingConvention = CallingConvention.Cdecl)] public extern static float camDetect(string imageData); //loadFile为string类型 float p = camDetect(loadF
2020-07-10 09:40:30
1247
原创 OpenCV:图像差分法基础实例(获取差分值及其位置
代码// win10// vs2013// opencv3#include<opencv2/opencv.hpp>#include<iostream>using namespace std;using namespace cv;// 图像差分法int main(){ Mat image = imread("image.jpg"); Mat test = imread("test.jpg"); Mat diff; namedWindow("imag
2020-07-09 17:11:24
4332
原创 OpenCV:获取图片像素值(RGB/HSV)
//RGB→HSVMat rgb,hsv;cvtColor(rgb, hsv, COLOR_BGR2HSV);//RGBB = image.at<Vec3b>(y, x)[0];G = image.at<Vec3b>(y, x)[1];R = image.at<Vec3b>(y, x)[2];//HSVH = static_cast<int>(image.at<Vec3b>(y, x)[0]);S = static_cast&
2020-07-06 08:52:49
2081
原创 AndroidStudio学习(七):调用摄像头拍照/从相册中选择照片
教材:第一行代码(第2版)新建项目CameraAlbumTest调用摄像头拍照//activity_main.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_paren
2020-06-24 15:50:56
4247
10
原创 AndroidStudio学习(六):RecyclerView
新建项目RecyclerViewTestRecyclerView是新增控件定义在support库中需要在app/build.gradle中添加相应的依赖库运行效率比ListView好很多ListView只能纵向滚动RecyclerView可以横向滚动//build.gradledependencies { implementation fileTree(dir:'libs',includes: ['*.jar']) implementation 'com.android.
2020-06-23 18:59:34
901
原创 AndroidStudio学习(五):ListView
新建ListViewTest项目//activity_main.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > &l
2020-06-23 16:28:34
980
原创 AndroidStudio学习(四):创建自定义控件
教材:第一行代码(第2版)当系统自带的控件不能满足需求时,我们也可以利用上面的继承结构来创建自定义控件。新建项目UICustomViews创建一个自定义的标题栏 一般程序中可能很多活动都需要一个这样的标题栏, 但在每个活动的布局中都编写同样的标题栏代码会导致重复, 所以可以引入布局。//创建一个布局title.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://s
2020-06-23 14:45:33
2412
原创 AndroidStudio学习(三):基本布局(LinearLayout/RelativeLayout/FrameLayout/Percent(F/R)Layout)
布局布局是一种可用于放置很多控件的容器,它可以按照一定的规律调整内部控件的位置,从而写出精美的界面;同时,布局内部也可以放置布局,通过多层布局的嵌套,我们就能完成一些比较复杂的界面实现。新建项目UILayoutTest线性布局LinearLayout将控件在线性方向上依次排列: android:orientation = " " vertical - 垂直方向 horizontal - 水平方向//修改activity_main.xml<LinearLayout xm
2020-06-22 09:39:18
722
原创 GitHub:直接上传文件夹
如何上传文件夹到github?可能错误:git 创建项目第一次上传文档出现fatal: No configured push destination. Either specify the URL from the command-line解决办法:error: failed to push some refs to ‘https://github.com/xxxx.git’解决git本地仓库与远程仓库关联出现 failed to push some refs to git的问题git报错–>
2020-06-20 17:44:48
458
1
原创 AndroidStudio学习(二):TextView/Button/EditText/ImageView/ProgressBar/AlertDialog/ProgressDialog
教材:第一行代码(第2版)新建项目UIWidgetTest:TextView//activity_main.xml<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent"
2020-06-20 16:21:35
683
原创 AndroidStudio学习:uses-permission/ImageView/RadioButton/FloatingActionButton
uses-permissionAndroid权限操作之uses-permission我们在安装Android软件的时候,系统会提示该软件所需要的权限,相对于其他系统,android的权限非常多。我们在开发软件的时候,也需要声明相应的权限,比如希望软件能发短信,需要声明软件调用短信的权限,否则软件运行的时候就会报错。Android的权限在AndroidManifest.xml文件里配置。AndroidManifest文件中有四个标签与permission有关,它们分别是 <permission
2020-06-20 08:38:42
471
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人