基于3D Gaussian Splatting与NeRF实现三维重建(使用IPhone创建数据集)

基于Spectacular AI与NeRF实现三维重建-使用IPhone创建数据集

  • 前言
  • 项目简介
  • 创建数据集
    • 扫描
    • 处理数据集
  • 解析数据集
    • Python环境
  • Windows ffmpeg 环境搭建
  • 数据集处理
  • 安装Nerfstudio
    • 需要CUDA环境
  • 依次安装依赖
    • pip install nerfstudio
  • Nerfstudio实现效果
    • 开始训练
      • 参数配置
        • 实时训练浏览

前言

本项目参考YouTube中博主(Spectacular AI
详细可了解:SpectacularAI官网
在这里插入图片描述
本文项目构建在Windows与Ubuntu中,二者在项目构建中并未有实质性的差距,可相互参考环境与参数的配置,本文即在Windows11(已配置好CUDA)中进行。
Windows下配置CUDA的方法可参考:《TensorFlow-GPU-2.4.1与CUDA安装教程》

项目简介

Spectacular AI SDK融合来自相机和IMU传感器(加速度计和陀螺仪)的数据,并输出设备的精确6自由度姿态。这被称为视觉惯性SLAM (VISLAM),它可以用于跟踪(自主)机器人和车辆,以及增强、混合和虚拟现实。SDK还包括一个映射API,可用于访问实时和离线3D重建用例的完整SLAM地图。在这里插入图片描述

创建数据集

本文使用IPhone15 Pro Max的激光雷达创建场景数据集;
官方SDK提供其他扫描场景的途径:
1.iPhone (with or without LiDAR)
2.Android (with or without ToF雷达组) (如SamsungNote/S系列)
3.OAK-D相机
4.Intel RealSense D455/D435i
5.微软Azure Kinect DK

在这里插入图片描述

扫描

开始拍摄,结束后将扫描完成的视频导入到电脑中(注意:文件可能较大)
在这里插入图片描述

处理数据集

解压录制的数据集文件,如图所示:保存数据集解压路径
在这里插入图片描述

解析数据集

下载SDK:https://github.com/SpectacularAI/sdk-examples.git
在这里插入图片描述
Python环境下建图只有两个文件:
replay_to_instant_ngp.py

import argparse
import spectacularAI
import cv2
import json
import os
import shutil
import math
import numpy as npparser = argparse.ArgumentParser()
parser.add_argument("input", help="Path to folder with session to process")
parser.add_argument("output", help="Path to output folder")
parser.add_argument("--scale", help="Scene scale, exponent of 2", type=int, default=128)
parser.add_argument("--preview", help="Show latest primary image as a preview", action="store_true")
args = parser.parse_args()# Globals
savedKeyFrames = {}
frameWidth = -1
frameHeight = -1
intrinsics = NoneTRANSFORM_CAM = np.array([[1,0,0,0],[0,-1,0,0],[0,0,-1,0],[0,0,0,1],
])TRANSFORM_WORLD = np.array([[0,1,0,0],[-1,0,0,0],[0,0,1,0],[0,0,0,1],
])def closestPointBetweenTwoLines(oa, da, ob, db):normal = np.cross(da, db)denom = np.linalg.norm(normal)**2t = ob - oata = np.linalg.det([t, db, normal]) / (denom + 1e-10)tb = np.linalg.det([t, da, normal]) / (denom + 1e-10)if ta > 0: ta = 0if tb > 0: tb = 0return ((oa + ta * da + ob + tb * db) * 0.5, denom)def resizeToUnitCube(frames):weight = 0.0centerPos = np.array([0.0, 0.0, 0.0])for f in frames:mf = f["transform_matrix"][0:3,:]for g in frames:mg = g["transform_matrix"][0:3,:]p, w = closestPointBetweenTwoLines(mf[:,3], mf[:,2], mg[:,3], mg[:,2])if w > 0.00001:centerPos += p * wweight += wif weight > 0.0: centerPos /= weightscale = 0.for f in frames:f["transform_matrix"][0:3,3] -= centerPosscale += np.linalg.norm(f["transform_matrix"][0:3,3])scale = 4.0 / (scale / len(frames))for f in frames: f["transform_matrix"][0:3,3] *= scaledef sharpness(path):img = cv2.imread(path)img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)return cv2.Laplacian(img, cv2.CV_64F).var()def onMappingOutput(output):global savedKeyFramesglobal frameWidthglobal frameHeightglobal intrinsicsif not output.finalMap:# New frames, let's save the images to diskfor frameId in output.updatedKeyFrames:keyFrame = output.map.keyFrames.get(frameId)if not keyFrame or savedKeyFrames.get(keyFrame):continuesavedKeyFrames[keyFrame] = TrueframeSet = keyFrame.frameSetif not frameSet.rgbFrame or not frameSet.rgbFrame.image:continueif frameWidth < 0:frameWidth = frameSet.rgbFrame.image.getWidth()frameHeight = frameSet.rgbFrame.image.getHeight()undistortedFrame = frameSet.getUndistortedFrame(frameSet.rgbFrame)if intrinsics is None: intrinsics = undistortedFrame.cameraPose.camera.getIntrinsicMatrix()img = undistortedFrame.image.toArray()bgrImage = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)fileName = args.output + "/tmp/frame_" + f'{frameId:05}' + ".png"cv2.imwrite(fileName, bgrImage)if args.preview:cv2.imshow("Frame", bgrImage)cv2.setWindowTitle("Frame", "Frame #{}".format(frameId))cv2.waitKey(1)else:# Final optimized posesframes = []index = 0up = np.zeros(3)for frameId in output.map.keyFrames:keyFrame = output.map.keyFrames.get(frameId)oldImgName = args.output + "/tmp/frame_" + f'{frameId:05}' + ".png"newImgName = args.output + "/images/frame_" + f'{index:05}' + ".png"os.rename(oldImgName, newImgName)cameraPose = keyFrame.frameSet.rgbFrame.cameraPose# Converts Spectacular AI camera to coordinate system used by instant-ngpcameraToWorld = np.matmul(TRANSFORM_WORLD, np.matmul(cameraPose.getCameraToWorldMatrix(), TRANSFORM_CAM))up += cameraToWorld[0:3,1]frame = {"file_path": "images/frame_" + f'{index:05}' + ".png","sharpness": sharpness(newImgName),"transform_matrix": cameraToWorld}frames.append(frame)index += 1resizeToUnitCube(frames)for f in frames: f["transform_matrix"] = f["transform_matrix"].tolist()if frameWidth < 0 or frameHeight < 0: raise Exception("Unable get image dimensions, zero images received?")fl_x = intrinsics[0][0]fl_y = intrinsics[1][1]cx = intrinsics[0][2]cy = intrinsics[1][2]angle_x = math.atan(frameWidth / (fl_x * 2)) * 2angle_y = math.atan(frameHeight / (fl_y * 2)) * 2transformationsJson = {"camera_angle_x": angle_x,"camera_angle_y": angle_y,"fl_x": fl_x,"fl_y": fl_y,"k1": 0.0,"k2": 0.0,"p1": 0.0,"p2": 0.0,"cx": cx,"cy": cy,"w": frameWidth,"h": frameHeight,"aabb_scale": args.scale,"frames": frames}with open(args.output + "/transformations.json", "w") as outFile:json.dump(transformationsJson, outFile, indent=2)def main():os.makedirs(args.output + "/images", exist_ok=True)os.makedirs(args.output + "/tmp", exist_ok=True)print("Processing")replay = spectacularAI.Replay(args.input, mapperCallback = onMappingOutput, configuration = {"globalBABeforeSave": True,              # Refine final map poses using bundle adjustment"maxMapSize": 0,                         # Unlimited map size"keyframeDecisionDistanceThreshold": 0.1 # Minimum distance between keyframes})replay.runReplay()shutil.rmtree(args.output + "/tmp")print("Done!")print("")print("You can now run instant-ngp nerfs using following command:")print("")print("    ./build/testbed --mode nerf --scene {}/transformations.json".format(args.output))if __name__ == '__main__':main()

replay_to_nerf.py

#!/usr/bin/env python
"""
Post-process data in Spectacular AI format and convert it to input
for NeRF or Gaussian Splatting methods.
"""DEPRECATION_NOTE = """
Note: the replay_to_nerf.py script has been replaced by the sai-cli
tool in Spectacular AI Python package v1.25. Prefersai-cli process [args]as a drop-in replacement ofpython replay_to_nerf.py [args]
.
"""# The code is still available and usable as a stand-alone script, see:
# https://github.com/SpectacularAI/sdk/blob/main/python/cli/process/process.pyimport_success = False
try:from spectacularAI.cli.process.process import process, define_argsimport_success = True
except ImportError as e:print(e)if not import_success:msg = """Unable to import new Spectacular AI CLI, please update to SDK version >= 1.25""""raise RuntimeError(msg)if __name__ == '__main__':import argparseparser = argparse.ArgumentParser(description=__doc__,epilog=DEPRECATION_NOTE,formatter_class=argparse.RawDescriptionHelpFormatter)define_args(parser)print(DEPRECATION_NOTE)process(parser.parse_args())

Python环境

Babel	2.14.0	
ConfigArgParse	1.7	
GitPython	3.1.40	
Jinja2	3.1.2	
Markdown	3.4.1	
MarkupSafe	2.1.2	
PyAudio	0.2.13	
PyOpenGL	3.1.7	
PySocks	1.7.1	
PyWavelets	1.4.1	
Rtree	1.1.0	
Send2Trash	1.8.2	
Shapely	1.8.5.post1	
absl-py	1.4.0	
accelerate	0.16.0	
addict	2.4.0	
ansi2html	1.9.1	
anyio	4.2.0	
appdirs	1.4.4	
argon2-cffi	23.1.0	
argon2-cffi-bindings	21.2.0	
arrow	1.3.0	
asttokens	2.4.1	
async-lru	2.0.4	
attrs	23.2.0	
av	11.0.0	
beautifulsoup4	4.11.2	
bidict	0.22.1	
bleach	6.1.0	
blinker	1.7.0	
boltons	23.1.1	
cachetools	5.3.0	
certifi	2022.12.7	
cffi	1.16.0	
chardet	5.2.0	
charset-normalizer	3.0.1	
clean-fid	0.1.35	
click	8.1.7	
clip	1.0	
clip-anytorch	2.5.0	
colorama	0.4.6	
colorlog	6.8.0	
comet-ml	3.35.5	
comm	0.2.1	
configobj	5.0.8	
contourpy	1.2.0	
cryptography	41.0.7	
cycler	0.12.1	
dash	2.14.2	
dash-core-components	2.0.0	
dash-html-components	2.0.0	
dash-table	5.0.0	
debugpy	1.8.0	
decorator	5.1.1	
defusedxml	0.7.1	
depthai	2.24.0.0	
descartes	1.1.0	
docker-pycreds	0.4.0	
docstring-parser	0.15	
dulwich	0.21.7	
einops	0.6.0	
embreex	2.17.7.post4	
everett	3.1.0	
exceptiongroup	1.2.0	
executing	2.0.1	
fastjsonschema	2.19.1	
ffmpeg	1.4	
filelock	3.9.0	
fire	0.5.0	
flask	3.0.0	
fonttools	4.47.0	
fqdn	1.5.1	
ftfy	6.1.1	
future	0.18.3	
gdown	4.7.1	
gitdb	4.0.11	
google-auth	2.16.1	
google-auth-oauthlib	1.2.0	
grpcio	1.51.3	
gsplat	0.1.0	
h11	0.14.0	
h5py	3.10.0	
httpcore	1.0.2	
httpx	0.26.0	
idna	3.4	
imageio	2.25.1	
importlib-metadata	7.0.1	
ipykernel	6.28.0	
ipython	8.19.0	
ipywidgets	8.1.1	
isoduration	20.11.0	
itsdangerous	2.1.2	
jaxtyping	0.2.25	
jedi	0.19.1	
joblib	1.3.2	
json5	0.9.14	
jsonmerge	1.9.0	
jsonpointer	2.4	
jsonschema	4.20.0	
jsonschema-specifications	2023.12.1	
jupyter-client	8.6.0	
jupyter-core	5.7.0	
jupyter-events	0.9.0	
jupyter-lsp	2.2.1	
jupyter-server	2.12.2	
jupyter-server-terminals	0.5.1	
jupyterlab	4.0.10	
jupyterlab-pygments	0.3.0	
jupyterlab-server	2.25.2	
jupyterlab-widgets	3.0.9	
k-diffusion	0.0.14	
kiwisolver	1.4.5	
kornia	0.6.10	
lazy-loader	0.1	
lightning-utilities	0.10.0	
lmdb	1.4.0	
lpips	0.1.4	
lxml	5.0.0	
mapbox-earcut	1.0.1	
markdown-it-py	3.0.0	
matplotlib	3.5.3	
matplotlib-inline	0.1.6	
mdurl	0.1.2	
mediapy	1.2.0	
mistune	3.0.2	
mpmath	1.3.0	
msgpack	1.0.7	
msgpack-numpy	0.4.8	
msvc-runtime	14.34.31931	
nbclient	0.9.0	
nbconvert	7.14.0	
nbformat	5.9.2	
nerfacc	0.5.2	
nerfstudio	0.3.4	
nest-asyncio	1.5.8	
networkx	3.0	
ninja	1.11.1.1	
nodeenv	1.8.0	
notebook-shim	0.2.3	
numpy	1.24.2	
nuscenes-devkit	1.1.11	
oauthlib	3.2.2	
open3d	0.18.0	
opencv-python	4.6.0.66	
overrides	7.4.0	
packaging	23.0	
pandas	2.1.4	
pandocfilters	1.5.0	
parso	0.8.3	
pathtools	0.1.2	
pillow	9.4.0	
pip	23.3.2	
platformdirs	4.1.0	
plotly	5.18.0	
prometheus-client	0.19.0	
prompt-toolkit	3.0.43	
protobuf	3.20.3	
psutil	5.9.7	
pure-eval	0.2.2	
pyarrow	14.0.2	
pyasn1	0.4.8	
pyasn1-modules	0.2.8	
pycocotools	2.0.7	
pycollada	0.7.2	
pycparser	2.21	
pygame	2.5.2	
pygments	2.17.2	
pyliblzfse	0.4.1	
pymeshlab	2023.12	
pyngrok	7.0.5	
pyparsing	3.1.1	
pyquaternion	0.9.9	
python-box	6.1.0	
python-dateutil	2.8.2	
python-engineio	4.8.1	
python-json-logger	2.0.7	
python-socketio	5.10.0	
pytorch-msssim	1.0.0	
pytz	2023.3.post1	
pywin32	306	
pywinpty	2.0.12	
pyyaml	6.0	
pyzmq	25.1.2	
rawpy	0.19.0	
referencing	0.32.0	
regex	2022.10.31	
requests	2.31.0	
requests-oauthlib	1.3.1	
requests-toolbelt	1.0.0	
resize-right	0.0.2	
retrying	1.3.4	
rfc3339-validator	0.1.4	
rfc3986-validator	0.1.1	
rich	13.7.0	
rpds-py	0.16.2	
rsa	4.9	
scikit-image	0.20.0rc8	
scikit-learn	1.3.2	
scipy	1.10.1	
semantic-version	2.10.0	
sentry-sdk	1.39.1	
setproctitle	1.3.2	
setuptools	69.0.3	
shtab	1.6.5	
simple-websocket	1.0.0	
simplejson	3.19.2	
six	1.16.0	
smmap	5.0.1	
sniffio	1.3.0	
soupsieve	2.4	
spectacularAI	1.26.2	
splines	0.3.0	
stack-data	0.6.3	
svg.path	6.3	
sympy	1.12	
tb-nightly	2.13.0a20230221	
tenacity	8.2.3	
tensorboard	2.15.1	
tensorboard-data-server	0.7.0	
tensorboard-plugin-wit	1.8.1	
termcolor	2.4.0	
terminado	0.18.0	
threadpoolctl	3.2.0	
tifffile	2023.2.3	
timm	0.6.7	
tinycss2	1.2.1	
tomli	2.0.1	
torch	1.13.1+cu116	
torch-fidelity	0.3.0	
torchdiffeq	0.2.3	
torchmetrics	1.2.1	
torchsde	0.2.5	
torchvision	0.14.1+cu116	
tornado	6.4	
tqdm	4.64.1	
traitlets	5.14.1	
trampoline	0.1.2	
trimesh	4.0.8	
typeguard	2.13.3	
types-python-dateutil	2.8.19.14	
typing-extensions	4.5.0	
tyro	0.6.3	
tzdata	2023.4	
uri-template	1.3.0	
urllib3	1.26.14	
viser	0.1.17	
wandb	0.13.10	
wcwidth	0.2.6	
webcolors	1.13	
webencodings	0.5.1	
websocket-client	1.3.3	
websockets	12.0	
werkzeug	3.0.1	
wheel	0.38.4	
widgetsnbextension	4.0.9	
wrapt	1.16.0	
wsproto	1.2.0	

Windows ffmpeg 环境搭建

项目必须FFmpeg
在这里插入图片描述
这里我在项目Python中直接pip安装:

pip  install ffmpeg 

这个网上教程很多,这里就不细讲了

数据集处理

这里以iPhone拍摄的数据集为例子:
将上文中提到的解压后的数据集进行编译处理,并将数据集的路径改为自己的数据集路径

python replay_to_nerf.py E:\SpectacleMapping\sdk-examples-main\python\mapping\recording_2024-01-05_12-24-00 E:\SpectacleMapping\sdk-examples-main\python\mapping\room --preview3d

在这里插入图片描述

安装Nerfstudio

需要CUDA环境

Nerfstudio 官网:https://docs.nerf.studio/quickstart/installation.html
在这里插入图片描述

依次安装依赖

在这里插入图片描述

pip install nerfstudio

pip install nerfstudio
git clone https://github.com/nerfstudio-project/nerfstudio.git
cd nerfstudio
pip install --upgrade pip setuptools
pip install -e .

Nerfstudio实现效果

注意,需要显卡的显存至少6GB以上,对显存要求极高!

开始训练

参数配置

ns-train nerfacto --data 数据集绝对地址 --vis viewer --max-num-iterations 50000

在这里插入图片描述
在这里插入图片描述

实时训练浏览

可以在浏览器中输入:https://viewer.nerf.studio/versions/23-05-15-1/?websocket_url=ws://localhost:7007
在这里插入图片描述
在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/614576.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

[足式机器人]Part3 机构运动学与动力学分析与建模 Ch00-4(2) 刚体的速度与角速度

本文仅供学习使用&#xff0c;总结很多本现有讲述运动学或动力学书籍后的总结&#xff0c;从矢量的角度进行分析&#xff0c;方法比较传统&#xff0c;但更易理解&#xff0c;并且现有的看似抽象方法&#xff0c;两者本质上并无不同。 2024年底本人学位论文发表后方可摘抄 若有…

关于树结构的数据的权限控制的算法

树结构的权限控制分两种:1、逐层加载&#xff1b;2、一次性加载 一、逐层加载 涉及的表结构 表名 T_PLAN 表字段 字段类型 是否必 须字段 说明 ID VARCHAR2(50) Y 主键 PARENT_ID VARCHAR2(50) Y 父项节点ID&#xff0c;默认根节点的父节点ID’-1’ TREEPATH VA…

前端moa gif json显示动画

JSON动画 第三方库或插件&#xff1a; 使用lottie-web库&#xff1a;将JSON文件导入&#xff0c;并在HTML中添加一个空的div作为容器&#xff0c;再调用lottie.loadAnimation()方法加载JSON文件&#xff0c;然后将其渲染到div容器中。使用bodymovin插件&#xff1a;将JSON文件…

搜索与图论第二期 BFS

前言 BFS跟DFS同样重要&#xff0c;也一定要熟练的掌握&#xff01;&#xff01;&#xff01; 一、BFS的基本内容 BFS是从根节点开始&#xff0c;沿着树(图)的宽度遍历树(图)的节点。 如果所有节点均被访问&#xff0c;则算法中止。 BFS同样属于盲目搜索。 一般用队列数据结…

shell mapfile命令(readarray命令)介绍(读取行到数组变量)(进程替换+重定向< <()、()> >)

文章目录 shell mapfile命令&#xff08;readarray命令&#xff09;介绍mapfile --help英文中文 简单使用教程创建一个测试文件使用mapfile命令读取文件打印数组内容 各选项详解1. -d delim&#xff1a;使用DELIM来终止行&#xff0c;而不是换行原理示例 2. -n count&#xff1…

Agisoft Metashape 基于影像的外部点云着色

Agisoft Metashape 基于影像的外部点云着色 文章目录 Agisoft Metashape 基于影像的外部点云着色前言一、添加照片二、对齐照片三、导入外部点云四、为点云着色五、导出彩色点云前言 本教程介绍了在Agisoft Metashape Professional中,将照片中的真实颜色应用于从不同源获取的…

一键替换SQL中gt;或lt;为<>大于小于符号或一键转换<或>为gt;lt;

一键替换SQL中>或<为<>大于小于符号或一键转换<或>为>< 一、转义字符的困扰二、解决方法三、一键替换转义符教程四、Notepad的宏功能进行转义字符的转换具有以下优点&#xff1a; 一、转义字符的困扰 在日常开发中&#xff0c;处理大量的SQL数据时&am…

使用推测解码 (Speculative Decoding) 使 Whisper 实现 2 倍的推理加速

Open AI 推出的 Whisper 是一个通用语音转录模型&#xff0c;在各种基准和音频条件下都取得了非常棒的结果。最新的 large-v3 模型登顶了 OpenASR 排行榜&#xff0c;被评为最佳的开源英语语音转录模型。该模型在 Common Voice 15 数据集的 58 种语言中也展现出了强大的多语言性…

【期末不挂科-C++考前速过系列P1】大二C++第1次过程考核(3道简述题&7道代码题)【解析,注释】

前言 大家好吖&#xff0c;欢迎来到 YY 滴C复习系列 &#xff0c;热烈欢迎&#xff01; 本章主要内容面向接触过C的老铁 主要内容含&#xff1a; 欢迎订阅 YY滴C专栏&#xff01;更多干货持续更新&#xff01;以下是传送门&#xff01; YY的《C》专栏YY的《C11》专栏YY的《Lin…

GitHub SSH 身份验证原理

HTTPS 跟 SSH 方式连接远程仓库的区别是什么&#xff1f; HTTPS和SSH是两种不同的协议&#xff0c;用于连接到远程Git仓库。它们的主要区别在于身份验证方式和连接方式&#xff1a; HTTPS&#xff1a;使用用户名和密码或者个人访问令牌&#xff08;Personal Access Token&…

SQL-修改数据

目录 DML-修改数据 删除数据 总结 &#x1f389;欢迎您来到我的MySQL基础复习专栏 ☆* o(≧▽≦)o *☆哈喽~我是小小恶斯法克&#x1f379; ✨博客主页&#xff1a;小小恶斯法克的博客 &#x1f388;该系列文章专栏&#xff1a;重拾MySQL &#x1f4dc;其他专栏&#xff1a;…

python爬虫实战(8)--获取虎pu热榜

1. 需要的类库 import requests from bs4 import BeautifulSoup import pandas as pd2. 请求地址 def fetch_data():url "https://bbs.xxx.com/" # Replace with the actual base URLresponse requests.get(url)if response.status_code 200:return response.c…

【python 的各种模块】(9) 在python使用PIL,即pillow模块

目录 1 导入PIL模块&#xff08;pillow&#xff09; 1.1 导入PIL模块 1.1.1 可用的导入形式 1.1.2 常用的导入形式 1.1.3 PIL下面的常用子模块 2 用 PIL读入&#xff0c;生成和显示图片 2.1 用 PIL.Image.open() 可以读入图片 2.2 用PIL.Image.new() 生成新图片 2.3 …

如何从多个文件夹里各提取相应数量的文件放一起到新文件夹中形成多文件夹组合

首先&#xff0c;需要用到的这个工具&#xff1a; 百度 密码&#xff1a;qwu2蓝奏云 密码&#xff1a;2r1z 说明一下情况 文件夹&#xff1a;1、2、3里面分别放置了各100张动物的图片&#xff0c;模拟实际情况的各种文件 操作&#xff1a;这里演示的是从3个文件夹里各取2张图…

移动安全-certutil

1 需求 需求1&#xff1a;获取应用文件的MD5 CertUtil -hashfile 文件路径 MD5 2 语法 C:\>certutil -?动词:-dump -- 转储配置信息或文件-dumpPFX -- 转储 PFX 结构-asn -- 分析 ASN.1 文件-decodehex -- 解码十六进制编码的…

MySQL 按日期流水号 条码 分布式流水号

有这样一个场景&#xff0c;有多台终端&#xff0c;要获取唯一的流水号&#xff0c;流水号格式是 日期0001形式&#xff0c;使用MySQL的存储过程全局锁实现这个需求。 以下是代码示例。 注&#xff1a;所有的终端连接到MySQL服务器获取流水号&#xff0c;如果获取到的是 “-1”…

软件测试|好用的pycharm插件推荐(二)—— JSON Parser

简介 PyCharm是一款强大的Python集成开发环境&#xff08;IDE&#xff09;&#xff0c;它提供了许多插件来增强开发体验。其中一个非常有用的插件是"JSON Parser"&#xff0c;它允许你在PyCharm中轻松解析和处理JSON数据。在本文中&#xff0c;我们将详细介绍如何安…

RTMO 姿态识别

RTMO 姿态识别 预测示例: # Copyright (c) OpenMMLab. All rights reserved. from argparse import ArgumentParser from typing import Dictfrom mmpose.apis.inferencers import MMPoseInferencer, get_model_aliasesfilter_args = dict(bbox_thr=0.3, nms_thr=0.3, pose_…

文件操作(与缓存相关的)相关笔记

与缓存相关就是一行一行进行读写&#xff0c;或者直接读写整个文件 1.BufferedInputStream&#xff0c;字节 1.构造方法&#xff1a; new BufferedInputStream(FileInputStream对象)&#xff1b; 2.读取文件 除了基础的read方法之外还有一个readAlllBytes方法可以返回这个文件…

linux手动安装 vscode-server

适用场景 很多时候&#xff0c;我们需要在本机&#xff08;比如windows&#xff09;通过remote ssh访问远程服务器&#xff08;一般是ubuntu&#xff09;&#xff0c;但经常出现 vscode 一直连不上远程服务器的情况&#xff0c;看一下 log&#xff1a; 这个log表示远程服务器…