taojx修改一些配置
parent
5b6ef6d6f6
commit
89746c13ca
@ -0,0 +1,18 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Python: Current File",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"program": "${file}",
|
||||
"console": "integratedTerminal",
|
||||
"cwd": "${fileDirname}",
|
||||
"justMyCode": true,
|
||||
"purpose": ["debug-in-terminal"],
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
{
|
||||
"cSpell.words": [
|
||||
"fastdeploy",
|
||||
"imread",
|
||||
"imshow",
|
||||
"rtsp",
|
||||
"yolov"
|
||||
],
|
||||
"[python]": {
|
||||
"editor.defaultFormatter": "ms-python.black-formatter"
|
||||
},
|
||||
"python.formatting.provider": "none"
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
import yaml
|
||||
from pathlib import Path
|
||||
|
||||
def get_configs(ymal_files):
|
||||
yaml_path = Path(__file__).parent / ymal_files
|
||||
def get_configs(yaml_files):
|
||||
yaml_path = Path(__file__).parent.parent / yaml_files
|
||||
with yaml_path.open("r", encoding="utf-8") as f:
|
||||
return yaml.load(f, Loader=yaml.FullLoader)
|
@ -1,9 +0,0 @@
|
||||
|
||||
|
||||
def rtsp_para(scource):
|
||||
|
||||
if scource.split('://')[0] == 'rtsp':
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,14 @@
|
||||
def is_image_file(filename):
|
||||
image_extensions = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tiff", ".webp"]
|
||||
# 获取文件扩展名并转换为小写
|
||||
file_extension = filename.split(".")[-1].lower()
|
||||
return file_extension in image_extensions
|
||||
|
||||
|
||||
def is_rtsp_or_video(source):
|
||||
if source.startswith("rtsp://"):
|
||||
return True
|
||||
|
||||
video_exts = ["mp4", "avi"]
|
||||
file_extension = source.split(".")[-1].lower()
|
||||
return file_extension in video_exts
|
Loading…
Reference in New Issue