- 博客(65)
- 问答 (1)
- 收藏
- 关注
原创 (Python)thinker在实现主、分界面显示时,分界面多余显示问题
前提,我是用类实现的分界面A,B,由主界面两个按键对应A,B出现的问题大致是这样的:我点击A,B的部分界面也显示了出来(反之亦然)检查问题的过程中发现,我在main中同时实例化了A和B,因此,我点击任意一个,在tkinter中都会将另一个在__init__方法中实现的部分界面显示出来,症结就在于tkinter在实现mainloop时,应该是只要你写了和tk有关的描述,在调用__init__.py里的mainloop方法时都会显示出来。故解决方法就是分开实例化,实现的方法也很简单,按键绑定事件写成一个
2021-01-13 08:53:20
1096
原创 FeatureNMS-- the rule whether to add p from P to D or not is adjusted
FeatureNMS算法流程图具体改进In any other case the two bounding boxes might belong to the same or to different objects—the intersection over union alone cannot be used to make a final decision. In this cas...
2020-02-20 17:32:00
649
原创 YOLOV3-损失函数及其源代码理解
YOLOV3-损失函数及其源代码理解(yolo_layer.c)讲得好https://github.com/AlexeyAB/darknet/issues/821x,y,w,h 损失原版的bbox损失为MSE,其后又GIOU,DIOU…delta即为求完损失的梯度公式对应图思路及具体求法:https://github.com/AlexeyAB/darknet/issues/22...
2020-02-20 16:24:09
1702
原创 如何从源码编译GStreamer
#!/bin/bash # you might need these additonal packages:# apt-get install bison flex libusb-1.0-0-dev libgudev-1.0-dev libxv-dev # from http://lists.freedesktop.org/archives/gstreamer-openmax/20...
2020-01-09 08:52:56
666
5
原创 CornerNet-lite(windows)训练部分关键问题
Anaconda虚拟环境下:一、环境配置:python3.7cuda10.0pytorch1.0.0需要可以留言,可以提供requirement.txtreference:强烈安利:https://qiita.com/sounansu/items/6836e5a4d81e157941c2二、注意点(1)训练自己的数据集,并不用coco的80类,需要注意的...
2019-12-02 22:36:05
1172
36
原创 关于VOC数据集迁移后path路径修改的脚本
##修改xml文件中的<path>,与实际数据路径对应##author:leo# coding=utf-8import osimport os.pathimport xml.dom.minidomfile_path_pic = "you--picture--path/JPEGImages"file_path = "you——xml--path/train"file...
2019-11-28 13:54:56
955
原创 cmake时发生了什么
一、简介 CMake是一个跨平台的安装(编译)工具,可以用简单的语句来描述所有平台的安装(编译过程)。他能够输出各种各样的makefile或者project文件,能测试编译器所支持的C++特性,类似UNIX下的automake。只是 CMake 的组态档取名为 CMakeLists.txt。Cmake 并不直接建构出最终的软件,而是产生标准的建构档(如 Unix 的 Mak...
2019-11-23 15:23:26
294
原创 关于能ping通ip 端口却不能访问的问题--网络防火墙问题
先明确iptables和UFW之间的关系才行...iptables是后端数据库,纪录着所有是否允许端口的信息 可用如下命令查看iptables -LUFW是上述数据库的前端,提供友好的,很显然很不友好....iptablesIptablesis the database of firewall rulesand is the actual firewall used ...
2019-11-16 18:13:26
13091
原创 (ROS)项目配置自己编译的opencv3.4.X
ubuntu配置opencv3.4.X配置好后,按我的路径而言在如下链接中/usr/local/include/usr/local/lib可以在如下路径找到ros的cv配置文件$ cd /opt/ros/kinetic/share/cv_bridge/cmake/$ sudo gedit cv_bridgeConfig.cmake将cv_bridgeConfig.cmake...
2019-11-16 08:45:15
833
原创 VMware workstation pro无法在windows上启动解决
Windows更新后VMware workstation pro 14便无法在windows上启动并显示如下信息按照提示信息,只要对VMware进行更新即可,其实没必要像一些教程中提示的那样删除windows更新的....只需要到VMware官网下载最新的15版本的工作站即可。下载安装后可能会有一些一下的报错无需慌张,只需要按照提示下载就可以了https://suppo...
2019-11-13 23:41:03
686
原创 python装饰器
'''记录程序运行时间的传统代码'''import timedef timer(func): def wrapper(*args,**kwds): t0 = time.time() func(*args,**kwds) t1 = time.time() print('耗时%0.3f'%(t1-t0,)) return wrapper#import time@ti...
2019-11-11 21:58:05
164
原创 NTP时间同步
NTP(Net Time Protocol)是网络时间同步协议,是用来同步网络中各个计算机的时间的协议。NTP 只考虑 UTC 时间,不考虑时区,不考虑夏令时等。NTP使用UDP,端口123。时间偏移:往返时间延迟:t0 是请求数据包传输的客户端时间戳,t1 是请求数据包回复的服务器时间戳,t2 是响应数据包传输的服务器时间戳,t3 是响应数据包回复的...
2019-10-19 19:53:51
607
原创 opencv调用摄像头摄像并进行处理时有卡顿
应当将摄像作为一个线程来进行采集数据,例程(python):import cv2import threading...cap = cv2.VideoCapture(0)...def captureFrame(): ret, frame = cap.read() thread1 = threading.Thread(target=captureFrame, ar...
2019-09-29 21:35:19
3854
2
原创 opencv-侵蚀和扩张
形态作业:形态操作将结构元素应用于输入图像并生成输出图像。最基本的形态作用是:侵蚀和扩张。消除噪音 隔离单个元素并连接图像中的不同元素。 查找图像中的强度凸点或孔扩张该操作包括将图像与某些内核进行卷积,其可以具有任何形状或尺寸,通常为正方形或圆形。内核具有定义的锚点,通常是内核的中心。当内核在图像上扫描时,我们计算由B重叠的最大像素值,并用该最大值替换锚点位置中的图像像素...
2019-09-14 15:40:13
1197
原创 opencv-滤波器
平滑(模糊)是一种简单而经常使用的图像处理操作,意图是减少噪声最常见的滤波器是线性的,输出像素的值为g(i,j)被确定为输入像素值的加权和。h(k,l)为滤波器的系数。归一化框过滤器每个输出像素是内核邻居的均值内核为:高斯滤波器 可能是最有用的过滤器(虽然不是最快的)。高斯滤波是通过将输入数组中的每个点与高斯核进行卷积来完成的,然后将它们相加以产生输出数组。只是...
2019-09-07 15:02:24
367
原创 opencv 随机生成器和文本
创建一个随机数生成器对象(RNG):RNG rng(0xFFFFFFFF)创建一个初始化为零地矩阵(黑色),指定其高度,宽度和类型: Mat image = Mat :: zeros(window_height,window_width,CV_8UC3);imshow(window_name,image); 可以尝试画一些几何图形 c = Drawing_Ran...
2019-09-05 23:30:32
193
原创 VS opencv 打开图片并转为灰度图
代码如下:#include <opencv2/opencv.hpp>using namespace cv;int main( int argc, char** argv ){ char* imageName = argv[1]; //即为./1.jpg Mat image; image = imread( imageName, IMREAD_COLOR );/...
2019-09-01 16:36:59
3575
原创 visual studio配置dlib库出现的问题总结
主要还是看官方文档(1)我使用的是windows系统,dlib包下载解压后,在编译生成dlib时使用了如下语句生成dlib.lib文件,但是再使用visual studio发现根本不能使用lib.....报如下错误USER_ERROR__inconsistent_build_configuration__see_dlib_faq_1...所以windows操作时还是使用VS生成d...
2019-09-01 15:37:38
2028
1
原创 编译QT调用的opencv库时出现的问题
[ 43%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_msmf.cpp.objIn file included from D:\opencv\opencv\sources\modules\videoio\src\cap_msmf.cpp:59:0:D:/Qt/Qt5.8.0/Tools...
2019-09-01 15:19:22
1545
原创 关于visual studio配置opencv时出现得问题
运行如下测试程序,出现如此报错:#include<opencv2/opencv.hpp>#include<iostream>using namespace cv;int main(){ Mat img = imread("C:\\Users\\ywjys\\Desktop\\1.jpg"); imshow("猫", img); waitKey(0);...
2019-08-31 08:53:05
259
原创 模板中的html如何请求flask-restfu风格的url
如上图所示我们只需要url请求是输入:http://你的ip/port/house即可flask-restful是用来做api的 flask才是快速搭建web应用的 没了restful flask也能满足应用的要求 所以添加html访问还是需要app的html例代码如下:<!DOCTYPE html><html lang="en"><hea...
2019-07-18 16:57:10
647
转载 python实现基本数据结构 链表
class Node(object): """ data:数据段 next:指针段 """ def __init__(self, value, next=Node): self.value = value self.next = next def __repr__(self): """ ...
2019-07-18 09:23:18
131
原创 pytorch的mylinear类
class Mylinear(nn.Module): def __init__(self, inp, outp): super(MyLinear, self).__init__() #require_grad = True self.w = nn.Parameter(torch.randn(outp, inp)) self....
2019-07-11 09:45:32
411
原创 pytorch 一次性forword样例代码
class Flatten(nn.Module): def __init__(self): super(Flatten, self).__init__() def forward(self, input): return input.view(input.size(0), -1)
2019-07-11 09:39:50
360
原创 注册时JSP如何给注册人发邮件
import java.util.Date;import java.util.Properties;import javax.mail.Address;import javax.mail.Message;import javax.mail.MessagingException;import javax.mail.Session;import javax.mail.Transport;...
2019-06-13 18:24:29
351
原创 树莓派flask-restful风格的服务器demo
from flask import Flaskfrom flask_restful import reqparse, Api, Resource, requestimport serialimport timeapp = Flask(__name__)api = Api(app)value1 = 'welcome'value2 = 'welcome'value3 = 'wel...
2019-06-13 17:42:55
350
转载 学生表
#include<iostream> #include<stdlib.h> #include<stdio.h> #include<string.h>#include<string>using namespace std;typedef struct BookInfo{ ///// 图书结构 int b_Code; ///...
2019-06-13 17:37:10
320
原创 C语言实现二叉排序树线索化再中序遍历
#include<stdio.h>#include<stdlib.h>#define M 1000struct ThrTreeNode;typedef struct ThrTreeNode *PThrTreeNode;struct ThrTreeNode{ int info; PThrTreeNode llink,rlink; int ltag,rt...
2019-06-02 09:18:24
353
原创 算法--排序方法的代码总结
typedef int KeyType;typedef int DataType;typedef struct { KeyType key; DataType info;}RecordNode;typedef struct { int n; RecordNode *record;}SortObject;void insertSort(SortObject *...
2019-05-13 20:13:18
235
原创 算法作业--求两个字符串的最长公共子串
/*作者:Yj*/#include<stdio.h>#include<stdlib.h>#include<string.h>//字符串的数据结构 顺序表示struct SeqString{ int MAXNUM; int n; char *c;};typedef struct SeqString *PSeqString;//创建一...
2019-05-13 17:52:45
893
原创 二叉排序树
struct BinSearchNode;typedef struct BinSearchNode *PBinSearchNode;struct BinSearchNode{ keyType key; PBinSearchNode llink,rlink;};typedef struct BinSearchNode *BinSearchTree;typedef BinSearc...
2019-05-11 15:28:19
210
原创 平衡二叉树关键代码
struct AVLNode;typedef struct AVLNode *PAVLNode;struct AVLNode { KeyType key; int bf; PAVLNode llink,rlink;};typedef struct AVLNode *AVLTree;typedef struct *PAVLTree;int avlInsert(PAVLT...
2019-05-11 15:27:37
365
原创 java super()的使用注意
class TestThread extends Thread{ private int sleepTime; public TestThread(String name) { super(name); //此处有super语句 sleepTime = (int ) (Math.random() * 6000); } public void run() { try { ...
2019-05-11 09:14:08
1109
原创 算法作业-学生表;多项式加法
实现学生类 插入删除 统计均分#include<stdio.h>#include<stdlib.h>#include<string.h>struct Student;typedef struct Student *PStudent;struct Student { char name[20]; int score; PStudent lin...
2019-05-10 16:01:05
204
转载 线性表和链表的倒置
//倒置线表void rev_seq(PSeqList palist){ DataType temp; int count, i; if(palsit->n == 0 || palist->n == 1) return ; count = palsit->n/2; for(i=0;i<count;i++){ x = palist-&g...
2019-04-28 11:20:09
1226
原创 intel NCS2计算棒在树莓派上推理自训练模型的总结
H5模型需要转换成pb文件kerash5模型转tensorflowpb文件传送门转换成功后可以利用如下图运行参考命令:python C:\Intel\computer_vision_sdk_2018.5.456\deployment_tools\model_optimizer/mo_tf.py --input_model 1.pb --date_type FP16不清楚可以运行此文件 ...
2019-04-26 00:06:29
1312
4
原创 django学习之传列表到前端html页面显示
views.pydef main_page(request): data = [1,2,3,4,5,6,7] return render(request, 'index1.html', {'data':data}) #这里传的是字典,字典的键一定要和html页面中的一致index1.html<!DOCTYPE html><html lang="en">...
2019-04-21 22:02:11
5496
3
原创 梯度下降算法简单演示
计算每一步的梯度更新def step_gradient(b_current, w_current, points, learningRate): b_gradient = 0 w_gradient = 0 N = float(len(points)) for i in range(0, len(points)): x = points[i,0] ...
2019-04-21 20:39:02
553
原创 优先队列
数据结构struct PriorityQueue{ int MAXNUM; int n; DataType *pq;};typedef struct PriorityQueue *PPriorityQueue;struct PriorityQueue{ int MAXNUM; //容量 int n; //个数 DataType *pq; //数据};向优先队列中插入一...
2019-04-19 17:48:36
371
空空如也
(Python)tkinter子界面多余显示
2021-01-12
TA创建的收藏夹 TA关注的收藏夹
TA关注的人