适用于yolov5的数据集转换
from voc dataset to coco dataset文件结构
1_name_to_num.py123456789101112131415161718import osall_ = os.listdir('all_img')count = 0for i in all_: filename = os.path.join('all_img', i) new_name = os.path.join('all_img', '{}.jpg'.format(count)) #print(filename, new_name) os.rename(filename, new_name) filename = os.path.join('all_xml', i[:-3]+'xml') new_name = os.path.join('all_xml', '{}.xml ...
搭建turn服务器
Ubuntu搭建turn服务器(webrtc ice服务器)阅读别人博客的笔记,测试了好多人的方法,最后这个成功了
原理图
安装gcc环境1which gcc
安全签名
ssl1sudo apt install openssl-devel
生成签名1openssl req -x509 -newkey rsa:2048 -keyout /etc/turn_server_pkey.pem -out /etc/turn_server_cert.pem -days 99999 -nodes
一直回车
安装libevent1wget --no-check-certificate https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz
libevent-2.1.12-stable.tar.gz
12345tar -zxvf libevent-2.1.12-stable.tar.gzcd libevent-2.1.12-stable/./c ...
ssmbuild
整合SSM来自@狂神说
准备环境:
IDEA
MySQL 5.7.19
Tomcat 9
Maven 3.6
要求:
需要熟练掌握MySQL数据库,Spring,JavaWeb及MyBatis知识,简单的前端知识;
数据库环境
创建一个存放书籍数据的数据库表1234567891011121314CREATE DATABASE `ssmbuild`;USE `ssmbuild`;DROP TABLE IF EXISTS `books`;CREATE TABLE `books` (`bookID` INT(10) NOT NULL AUTO_INCREMENT COMMENT '书id',`bookName` VARCHAR(100) NOT NULL COMMENT '书名',`bookCounts` INT(11) NOT NULL COMMENT '数量',`detail` VARCHAR(200) NOT NULL COMMENT '描述',KEY `bookID` (`bookID`)) EN ...
SpringMVC终极乱码过滤器
来自@狂神说
filter.java123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106import javax.servlet.*;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletRequestWrapper;import javax.servlet.http.HttpServletResponse;import java.io.IOException;import java.io.UnsupportedEncodingException;import java.util.Map;/*** 解决get和po ...
flask基本使用
app.py12345678910111213141516171819202122232425262728293031323334353637383940414243444546from flask import g, Flask, url_for, redirect, request, render_template, sessionfrom flask_migrate import Migratefrom exts import dbfrom decorations import login_requiredfrom models import Userimport configfrom blueprints.user import bp as user_bpfrom blueprints.device import bp as device_bpfrom blueprints.data import bp as data_bpfrom blueprints.register_requests import bp as register_requests_bpfrom bluepr ...
mybatis基本使用
来自@狂神说
mybatis-config.xml12345678910111213141516171819202122232425262728293031323334<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"><configuration> <properties resource="db.properties"/><typeAliases> <!--<typeAlias type="com.xxx.pojo.User" alias="User"></typeAlia ...
python与stm32串口通讯
win或linux通过串口与嵌入式通讯准备
插入usb并打开权限12ls /dev/ttyUSB*sudo chmod 777 /dev/ttyUSB*
python 上位机代码12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061import serial# 串口打开函数def open_ser(): port = 'com1' # 串口号 baudrate = 9600 # 波特率 try: global ser #ser = serial.Serial(port,baudrate,timeout=0.5) ser=serial.Serial("/dev/ttyUSB1",9600,timeout=0.5) #使用USB连接串行口 if(ser.isOpen()==True): print("串口打开成功") ...
rtmp-nginx
前言目的:为了实现将大疆无人机采集的视频推流到服务器端,将图像进行处理。使用公网ip,使推流服务不局限于局域网。
准备
环境腾讯云轻量服务器,操作系统为Ubuntu18.04,附带公网ip。
安装相关依赖包
123456sudo apt-get install autoconf automakesudo apt-get install libpcre3 libpcre3-devsudo apt-get install opensslsudo apt-get install libssl-devsudo apt-get install zlib1g-devsudo apt-get build-dep gcc
搭建
系统下创建安装文件夹
1234mkdir optcd optmkdir workspacecd workspace
下载nginx安装包
1wget http://nginx.org/download/nginx-1.18.0.tar.gz
下载nginx-rtmp-module
1wget https://github.com/arut/nginx-rtmp-mo ...