opencv打开摄像头并保存为本地mp4
12345678910111213141516171819202122232425import cv2# 打开摄像头url = "rtsp://admin:qwer1234!.@192.168.1.65:554"cap = cv2.VideoCapture(url)width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))fourcc = cv2.VideoWriter_fourcc(*"mp4v")out = cv2.VideoWriter('test.mp4', fourcc, 20, (width, height))while True: ret, frame = cap.read() if ret: out.write(frame) cv2.imshow('capture', frame) if cv2.waitKey ...
超详细Pyinstaller打包exe+反编译Pyinstaller打包的exe教程+防止反编译教程
https://blog.csdn.net/feelinghappy/article/details/109328697
open vn设置 (亲测通过)
https://blog.csdn.net/rockage/article/details/127190263
通过sh脚本查找某一个端口的进程并杀死
sh12345678910111213#!/bin/bashport=8080 # 将8080替换成你想要查找和杀死的端口号# 查找端口的进程IDpid=$(lsof -ti :$port)# 杀死进程if [[ -n "$pid" ]]; then echo "Killing process $pid listening on port $port" kill -9 $pidelse echo "No process listening on port $port"fi
通过sh命令打开多个终端并执行指定的命令
shell1234567891011121314151617#!/bin/shsleep 1sgnome-terminal -t "5000" -x bash -c "cd /media/nvidia/3563-3135/exhibiton/web;/usr/bin/python3 app.py;"sleep 1sgnome-terminal -t "5001" -x bash -c "cd /media/nvidia/3563-3135/exhibiton/yolo;/usr/bin/python3 detect.py;"sleep 1sgnome-terminal -t "5002" -x bash -c "cd /media/nvidia/3563-3135/exhibiton/deepsort;/usr/bin/python3 demo.py;"sleep 1sgnome-terminal -t "5003" -x bash -c &quo ...
Supervisor使用教程
官方文档:https://github.com/Supervisor/supervisor
安装1sudo apt install supervisor
配置 /etc/supervisordemo: 在 /etc/supervisor/conf.d/ 新增子进程配置文件 celery_worker.conf
12345678910111213141516171819[program:celery_worker]command=celery -A main worker -l INFO --concurrency 10priority=999 ; the relative start priority (default 999)autostart=true ; start at supervisord start (default: true)autorestart=true ; retstart at unexpected quit (default: true)startsecs=10 ...
Jetson AGX Xavier安装torch、torchvision且成功运行yolov5算法
https://blog.csdn.net/qq_40691868/article/details/114379061
agx版本的pytorch
转载:
https://blog.csdn.net/qq_41426807/article/details/124705416
ks上网:
https://elinux.org/Jetson_Zoo
检查pytorch是否有gpu
>>> import torch>>> torch.cuda.is_available()
True
js读取href中的参数函数
123456789function GetQueryValue (queryName) { var query = decodeURI(window.location.search.substring(1)); var vars = query.split("&"); for (var i = 0; i < vars.length; i++) { var pair = vars[i].split("="); if (pair[0] == queryName) { return pair[1]; } } return null;}